If you have deltas defined, then the indexing should happen already - you don't need to run define_indexes or index_delta.
Can you show us what data you're using in the new record, and what your test search query is? -- Pat On 11/11/2011, at 12:43 AM, Strafe wrote: > Step 1. I have premade records which are indexed initially. > > irb(main):001:0> Hardware.last > => #<Hardware id: 3, [...] delta: false > > > Step 2. I create a new record > > irb(main):001:0> Hardware.last > => #<Hardware id: 4, [...] delta: true > > > Step 3. I checked for defined indexes > > irb(main):003:0> Hardware.define_indexes > => true > > Step 4. I check out delta index > > irb(main):004:0> Hardware.index_delta > Sphinx 2.0.1-beta (r2792) > Copyright (c) 2001-2011, Andrew Aksyonoff > Copyright (c) 2008-2011, Sphinx Technologies Inc (http:// > sphinxsearch.com) > > using config file 'C:/ruby192/cec_inventory/config/ > development.sphinx.conf'... > indexing index 'hardware_delta'... > WARNING: collect_hits: mem_limit=0 kb too low, increasing to 14592 kb > collected 1 docs, 0.0 MB > sorted 0.0 Mhits, 100.0% done > total 1 docs, 18 bytes > total 0.060 sec, 295 bytes/sec, 16.44 docs/sec > total 2 reads, 0.000 sec, 0.0 kb/call avg, 0.0 msec/call avg > total 9 writes, 0.000 sec, 0.1 kb/call avg, 0.0 msec/call avg > rotating indices: succesfully sent SIGHUP to searchd (pid=1824). > => [#<ThinkingSphinx::Deltas::DefaultDelta:0x414b910 [........] ] > > > > Here is my define index block > > define_index do > # fields > indexes equipment_manufacturer, :sortable => true > indexes equipment_model, :sortable => true > indexes serial_number > indexes equipment_building > indexes equipment_location > > set_property :delta => true > has created_at, updated_at > end > > > > Let me know if you need anything else. > > > > On Nov 9, 9:58 pm, Pat Allan <[email protected]> wrote: >> Hi >> >> Could you run us through how you're testing the deltas in the command line? >> It's worth noting that Sphinx takes a second to load the new data, so don't >> run a search *straight* after creating a new object - I usually use `sleep >> 0.5` in my tests to account for this. >> >> Also, can you provide the full define_index block? >> >> Cheers >> >> -- >> Pat >> >> On 10/11/2011, at 4:22 AM, Strafe wrote: >> >> >> >> >> >> >> >>> I know this has been covered before, but I couldn't find something in >>> the other documents which helped me, so I thought i'd make a thread >>> here. >> >>> So im running Rails 3.0.9 on Ruby 1.9.2. >> >>> Thinking Sphinx worked great, then I decided I wanted to implement >>> Delta Indexes. >> >>> So I added the column to my model >> >>> :delta, :boolean, :default => true, :null => false >> >>> Then I added the property to my model >> >>> define_index do >>> set_property :delta => true >>> end >> >>> Then I ran my migrations >> >>> Then I ran a rake ts:rebuild >> >>> Started my rails server, and everything seemed to be working. >> >>> However, when I create or destroy objects they do not appear in the >>> search. >> >>> It would seem that everything is working fine, the delta index is in >>> the model, it's set to true when I create a record. I see the Sphinx >>> stuff in the console without errors when I create a record. >> >>> And when I run the index_delta command in the IRB it seems to find all >>> the new records. >> >>>> Hardware.index_delta >>> Sphinx 2.0.1-beta (r2792) >>> Copyright (c) 2001-2011, Andrew Aksyonoff >>> Copyright (c) 2008-2011, Sphinx Technologies Inc (http:// >>> sphinxsearch.com) >> >>> using config file 'C:/ruby192/cec_inventory/config/ >>> development.sphinx.conf'... >>> indexing index 'hardware_delta'... >>> WARNING: collect_hits: mem_limit=0 kb too low, increasing to 14592 kb >>> collected 2 docs, 0.0 MB >>> sorted 0.0 Mhits, 100.0% done >>> total 2 docs, 31 bytes >>> total 0.038 sec, 803 bytes/sec, 51.86 docs/sec >>> total 2 reads, 0.000 sec, 0.0 kb/call avg, 0.0 msec/call avg >>> total 9 writes, 0.000 sec, 0.1 kb/call avg, 0.0 msec/call avg >>> rotating indices: succesfully sent SIGHUP to searchd (pid=7772). >>> [delta index stuff here] >> >>> Even if i run a ts:reindex when the searchd is running, it doesnt find >>> the new records, it only set's their delta to false. They don't show >>> up. The only way I can get them to show is if I run a ts:rebuild. >> >>> Can you guys help me? Sorry If i accidentally left out some details. >> >>> -- >>> 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 >>> athttp://groups.google.com/group/thinking-sphinx?hl=en. > > -- > 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. > -- 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.
