Okay, error's gone, which is good, but nothing's happening for the  
delta, so here's some more code to check in script/console:

ThinkingSphinx.updates_enabled?
ThinkingSphinx.deltas_enabled?
ThinkingSphinx.suppress_delta_output?
e = Expense.new :amount=>1, :creator_id=>1, :business_id=>1, :due_date  
=> Date.today
e.changed?
e.new_record?
e.save
e.changed?
e.new_record?

Cheers

-- 
Pat

On 17/02/2009, at 3:21 AM, Steven Bristol wrote:

>
> On Mon, Feb 16, 2009 at 2:45 AM, Pat Allan <p...@freelancing- 
> gods.com> wrote:
>>
>> Hi Steven
>>
>> Sorry (again) for the delay.
>>
>> Going by the error when you call Expense.index_delta(e), it looks  
>> like
>> you're not using the latest TS (because I can't find "indexes" in the
>> file it mentions at all, let alone on the line given). If you could
>> update, run the code again, and let's see what the output is this  
>> time
>> around.
>>
>> Cheers
>>
>> --
>> Pat
>>
>
>
> I ran the following in dev, with the latest code from github. I ran
> this under mysql and not jruby.
>
>
>>> e =  
>>> Expense.new :amount=>1, :creator_id=>1, :business_id=>1, :due_date  
>>> => Date.today
> => #<Expense id: nil, amount: #<BigDecimal:637a324,'0.1E1',4(8)>,
> bank_account_id: nil, title: nil, check_number: nil, created_at: nil,
> creator_id: 1, updated_at: nil, updater_id: nil, notes: nil,
> business_id: 1, date: nil, expense_category_id: nil, contractor_id:
> nil, employee_id: nil, paid_date: nil, is_paid: nil, transfer_fund_id:
> nil, payee_id: nil, due_date: "2009-02-16", client_id: nil,
> repeater_id: nil, repeated_template: false, bank_statement_id: nil,
> delta: false, regex_title: nil, template_name: nil>
>>> e.save
> => true
>>> e.send(:should_toggle_delta?)
> => false
>>> Expense.index_delta(e)
> => true
>>> client = Riddle::Client.new "localhost", 11101
> => #<Riddle::Client:0x62cc92c @retry_count=0, @match_mode=:all,
> @group_function=:day, @index_weights={}, @weights=[], @cut_off=0,
> @max_matches=1000, @field_weights={}, @group_by="", @timeout=0,
> @anchor={}, @sort_by="", @port=11101, @queue=[], @group_distinct="",
> @max_query_time=0, @filters=[], @offset=0, @retry_delay=0,
> @sort_mode=:relevance, @server="localhost", @group_clause="@group
> desc", @rank_mode=:proximity_bm25, @id_range=0..0, @limit=20>
>>> client.query "", "expense_delta"
> => {:total_found=>0, :attributes=>{"sphinx_deleted"=>1,
> "subclass_crcs"=>1073741825, "class_crc"=>1, "sphinx_internal_id"=>1},
> :matches=>[], :fields=>["amount", "title", "check_number", "notes",
> "business_id", "client_name", "payee_name", "employee_name",
> "contractor_name", "expense_category_name"], :words=>{}, :status=>0,
> :time=>0.009, :attribute_names=>["sphinx_internal_id", "class_crc",
> "subclass_crcs", "sphinx_deleted"], :total=>0}
>
> >


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Thinking Sphinx" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/thinking-sphinx?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to