Excerpts from Carl Worth's message of Wed Aug 26 18:24:36 -0400 2009: > So what I want is for anytime a message is changed such that it no > longer meets the current search criteria, it is immediately removed > from the search results. I think that means simply implementing the > is_relevant? method for SearcResultsMode where there is currently just > the following comment: > > ## a proper is_relevant? method requires some way of asking ferret > ## if an in-memory object satisfies a query. i'm not sure how to do > ## that yet. in the worst case i can make an in-memory index, add > ## the message, and search against it to see if i have > 0 results, > ## but that seems pretty insane. > > That single-message index and search sounds exactly like what I want, > and not insane at all. Has someone attempted this and found a > performance issue? (In which case, I would think we just need to fix > that performance bug.) Or is it simply a matter of nobody having tried > to code this up yet? (In which case, I'll try, and I'll be glad for > any pointers that anyone can give me on how to go about creating an > in-memory index and searching on it.)
We had a thread a while back about applying label changes immediately and I think the consensus was that that's a good idea. Doing this could simplify a great deal of thread-index-mode code because a fast is_relevant? could be implemented using existing index operations without the special cases for archiving/etc and without creating an inmemory database. I have a patch I plan to mail out soon that makes changing labels with Xapian much quicker, so that should help. It'd be great if you decide to tackle this. _______________________________________________ sup-talk mailing list sup-talk@rubyforge.org http://rubyforge.org/mailman/listinfo/sup-talk