Okay, next step requires some editing....

vendor/plugins/thinking_sphinx/vendor/after_commit/lib/after_commit/ 
connection_adapters.rb
In trigger_after_commit_callbacks, comment out the begin/rescue/end,  
so if errors are happening in there we'll see them.

Then:
Expense 
.create 
  :amount 
= 
 > 
1 
, :creator_id 
=>1, :business_id=>1, :due_date=>Date.today, :title=>'hello world'

-- 
Pat

On 17/02/2009, at 12:34 PM, Steven Bristol wrote:

>
> On Mon, Feb 16, 2009 at 8:25 PM, Pat Allan <p...@freelancing- 
> gods.com> wrote:
>>
>> Okay, now things have gotten officially confusing. The record is
>> getting its delta flag set, and the global settings shouldn't stop
>> delta indexing... but we're not seeing anything happen when you force
>> the indexing...
>>
>> If you repeat the last set of steps, then jump out of script/console
>> and run the following:
>> indexer --config config/development.sphinx.conf --rotate  
>> expense_delta
>>
>> And then back into script/console:
>> client = Riddle::Client.new "localhost", 11002
>> client.query "", "expense_delta"
>>
>
>
>
>
>>> e =  
>>> Expense 
>>> .new 
>>>  :amount 
>>> = 
>>> > 
>>> 1 
>>> , :creator_id 
>>> =>1, :business_id=>1, :due_date=>Date.today, :title=>'hello world'
> => #<Expense id: nil, amount: #<BigDecimal:36dd18b8,'1.0',1(4)>,
> bank_account_id: nil, title: "hello world", 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 
>>> .send 
>>> (:should_toggle_delta 
>>> ?)                                                           => true
>>> e 
>>> .save 
>>>                                                                             
>>>       = 
>>> > true
>>> e 
>>> .delta 
>>>                                                                             
>>>      = 
>>> > true
>
> --other term:
> $ indexer --config config/development.sphinx.conf --rotate  
> expense_delta
> Sphinx 0.9.8.1-release (r1533)
> Copyright (c) 2001-2008, Andrew Aksyonoff
>
> using config file 'config/development.sphinx.conf'...
> indexing index 'expense_delta'...
> collected 4 docs, 0.0 MB
> collected 0 attr values
> sorted 0.0 Mvalues, 100.0% done
> sorted 0.0 Mhits, 100.0% done
> total 4 docs, 31 bytes
> total 0.014 sec, 2180.18 bytes/sec, 281.31 docs/sec
> rotating indices: succesfully sent SIGHUP to searchd (pid=1127).
>
>
>
> --back in script/console:
>>> client = Riddle::Client.new "localhost",  
>>> 3312                                           => #<Riddle::Client: 
>>> 0x45c13a72 @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=3312>
>>> client.query "",  
>>> "expense_delta 
>>> "                                                        =>  
>>> {:matches 
>>> = 
>>> > 
>>> [{:doc 
>>> = 
>>> > 
>>> 129713 
>>> , :weight 
>>> =>1, :index=>0, :attributes=>{"sphinx_internal_id"=>16214,  
>>> "class_crc"=>3800544314, "subclass_crcs"=>[3800544314],  
>>> "sphinx_deleted"=>0}},  
>>> {:doc 
>>> = 
>>> > 
>>> 129721 
>>> , :weight 
>>> =>1, :index=>1, :attributes=>{"sphinx_internal_id"=>16215,  
>>> "class_crc"=>3800544314, "subclass_crcs"=>[3800544314],  
>>> "sphinx_deleted"=>0}},  
>>> {:doc 
>>> = 
>>> > 
>>> 129729 
>>> , :weight 
>>> =>1, :index=>2, :attributes=>{"sphinx_internal_id"=>16216,  
>>> "class_crc"=>3800544314, "subclass_crcs"=>[3800544314],  
>>> "sphinx_deleted"=>0}},  
>>> {:doc 
>>> = 
>>> > 
>>> 129737 
>>> , :weight 
>>> =>1, :index=>3, :attributes=>{"sphinx_internal_id"=>16217,  
>>> "class_crc"=>3800544314, "subclass_crcs"=>[3800544314],  
>>> "sphinx_deleted"=>0}}], :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=>4, :total_found=>4, :time=>0.02}
>>> e.id
> => 16217
>
> >


--~--~---------~--~----~------------~-------~--~----~
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