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
On 14/02/2009, at 1:26 AM, Steven Bristol wrote:
>
> On Wed, Feb 11, 2009 at 9:21 PM, Pat Allan <p...@freelancing-
> gods.com> wrote:
>>
>> Hmm, okay. What version of Rails are you using, and what's the output
>> of the following:
>>
>> e = Expense.new :amount=>1, :creator_id=>1, :business_id=>1
>> e.due_date = Date.today
>> e.save
>> e.send(:should_toggle_delta?)
>> Expense.index_delta(e)
>> client = Riddle::Client.new "localhost", 11002
>> client.query "", "expense_delta"
>>
>
>
> Using rails 2.2.2.
>
> Here is the output:
>
>
>>> e =
>>> Expense
>>> .new
>>> :amount=>1, :creator_id=>1, :business_id=>1, :due_date=>Date.today
> => #<Expense id: nil, amount: #<BigDecimal:ae4c118,'1.0',1(4)>,
> bank_account_id: nil, title: nil, date: nil, check_number: nil,
> created_at: nil, creator_id: 1, updated_at: nil, updater_id: nil,
> notes: nil, business_id: 1, 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-13", client_id: nil,
> repeater_id: nil, repeated_template: false, bank_statement_id: nil,
> template_name: nil, delta: false, regex_title: nil>
>>> e.save
> => true
>>> e.send(:should_toggle_delta?)
> => false
>>> Expense.index_delta(e)
> NoMethodError: undefined method `indexes' for
> ThinkingSphinx::Deltas::DefaultDelta:Class
> from /var/rails/lessaccounting/releases/20090212193900/vendor/
> plugins/thinking-sphinx/lib/thinking_sphinx/deltas/default_delta.rb:
> 25:in
> `index'
> from /var/rails/lessaccounting/releases/20090212193900/vendor/
> plugins/thinking-sphinx/lib/thinking_sphinx/active_record/delta.rb:
> 45:in
> `index_delta'
> from (irb):5
>>> client = Riddle::Client.new "localhost", 11002
> => #<Riddle::Client:0x1df07586 @group_distinct="", @filters=[],
> @weights=[], @limit=20, @retry_count=0, @field_weights={}, @anchor={},
> @cut_off=0, @group_clause="@group desc", @retry_delay=0,
> @sort_mode=:relevance, @timeout=0, @max_query_time=0,
> @match_mode=:all, @id_range=0..0, @group_function=:day, @sort_by="",
> @max_matches=1000, @group_by="", @rank_mode=:proximity_bm25,
> @offset=0, @queue=[], @index_weights={}, @server="localhost",
> @port=11002>
>>> client.query "", "expense_delta"
> => {:matches=>[], :fields=>["amount", "title", "check_number",
> "notes", "business_id", "client_name", "payee_name", "employee_name",
> "contractor_name", "expense_category_name"],
> :attributes=>{"sphinx_internal_id"=>1, "class_crc"=>1,
> "subclass_crcs"=>1073741825, "sphinx_deleted"=>1},
> :attribute_names=>["sphinx_internal_id", "class_crc", "subclass_crcs",
> "sphinx_deleted"], :words=>{}, :status=>0, :total=>0, :total_found=>0,
> :time=>0.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
-~----------~----~----~----~------~----~------~--~---