Am I correct that delta indexes don't use the 'where' conditions of the main index?
Here's an example, my model defines indexing like this: define_index do indexes :content has created_at where 'deleted_at IS NULL' set_property :delta => true end The deleted_at attribute is used for soft-deletion of the model. I have two records, both having content containing the word 'test' and both with deleted_at NULL. I run rake ts:in to build the index and then rake ts:start to get things going In a console I do MyModel.search 'test' and correctly receive two results I then update the deleted_at attribute of one of the records, setting it to Time.current and save The delta index is updated without error I do MyModel.search 'test' but it still returns two results Rebuilding the index with rake ts:in does remove the deleted record and then search returns the expected result I can obviously work around this using attributes and filters (or even toggle_deleted), but wanted to make sure I wasn't missing a more obvious solution first! Thanks, Rob --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
