Hi Canvas The delta index accumulates anything within the threshold you've set in your define_index block. If it's 1 minute, then yes, you'll need to run the task every 1 minute (or less). It will merge the changes in automatically, though (using my version, anyway - I think it's a separate rake call in Ed's fork), so things that have passed beyond the threshold will be in the core index due to the merge.
Cheers -- Pat On 07/01/2009, at 7:04 AM, Canvas wrote: > > Hi Pat, > > It seems to me that delta index can not accumulate and only catches > data in within the the time set in threshold. Any data older than that > will be gone from delta_index. Therefore in your example, "rake > thinking_sphinx:merge" also needs to be called every 1 minute to make > sure delta index is merged into the main index. Otherwise, changes > that are older than 1 mintue will be in neither delta index nor in the > main index. Am I right? The reason I am asking this is that I want to > clarify my understanding about delta index. Thanks a lot. > > > Cheers > - > Canvas > > > On Jan 6, 2:47 am, Pat Allan <[email protected]> wrote: >> Hi Canvas >> >> The delayed_delta approach still requires the boolean field, so >> that's >> not going to work out for you. >> >> I think the best option at the moment, if you want something >> continuous, is set up a script that runs constantly, looping on >> something like the following: >> >> loop do >> `rake thinking_sphinx:index:delta` >> sleep(2) >> end >> >> Which will take a two second break after every index. You could then >> also set your threshold down to, say, 1 minute. This will keep your >> delta indexes pretty small. You should be able to do this with my >> version or Ed's fork. >> >> Cheers >> >> -- >> Pat >> >> On 06/01/2009, at 4:03 AM, Canvas wrote: >> >> >> >> >> >>> Hi Jorg >> >>> I call delta-indexing manually only on my development machine for >>> testing purpose. It's actually called automatically in a backend >>> daemon roughly every 20 seconds. I came up with a new rake command >>> "thinking_sphinx:delta_and_merge" which calls "ts_index(index, >>> true)" >>> and "ts_merge(index)". It seems working fine now. But I am not sure >>> this is the correct approach or not. Thanks. >> >>> Hi Pat, >> >>> I can not go with the default setup because I am using views instead >>> of tables, I can not add a updatable "delta" column into a view. As >>> for delayed_job approach, does it support the timestamp based delta >>> index on a view? Can you please explain a little bit how the delayed >>> delta approach works? If the delayed delta approach meet my >>> requirement, I will for sure switch back to the newest main version. >>> Thank you very much for your information. >> >>> Cheers, >>> -- >> >>> Canvas- Hide quoted text - >> >> - Show quoted text - > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
