Thinking Sphinx - Delta indexing doesn't work
Asked Answered
F

3

5

In my app, I need every new record to be added to the index instantly (not after rake ts:index). If I understand it correctly delta indexing is what I'm looking for. So, I added delta column to every table I'm indexing with Sphinx, set the default value to false and added set_property :delta => true to every define_index block; then ran rake ts:index and rake ts:restart. However, the "instant" indexing doesn't seem to work. When testing in console I create a new record, save it and try to search it but won't get it back (after I run rake ts:index it works just fine). Am I doing something wrong here?

Filip answered 5/5, 2009 at 9:40 Comment(0)
F
6

thank you for your efforts. After some pretty long exploration I found out that I just forgot to run the migration (which set the default value for delta columns to false). Now, I should get some minus points for such a stupid mistake. Sorry for bothering you and thank you once again.

Filip answered 6/5, 2009 at 6:31 Comment(2)
No way on the minus points. Somebody else will make the same mistake and now they can google and find the solution. Your pain is someone else's gain.Coelostat
No kidding! Three years later I come along and I have the same question.Absentminded
D
2

I'm having a similar problem with delta indexing not working...actually it works in my dev environment but not production. I'm confused by the statements at the beginning of the post which indicate that the default value for delta should be false. In the thinking sphinx doc at http://freelancing-god.github.com/ts/en/deltas.html it states the default value should be true:

def self.up
  add_column :articles, :delta, :boolean, :default => true,
    :null => false
end

Am I missing something?

Thanks!

Desmonddesmoulins answered 26/1, 2010 at 4:58 Comment(1)
same doubt for me tooTold
B
0

do you use rake ts:conf after to correctly generate the config file ?

You can check then the config file generated to see if there is both SQL requests (the standard and the delta) in the config file.

We use it without problem.

Beghtol answered 5/5, 2009 at 19:20 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.