On 3/1/07, Chris Muller <chris@funkyobjects.org> wrote:
Hi Brent!

I think you've cleverly solved your own question..  By indexing the reversed value, its no different than a keyword index where you can already query on the presence of multiple keywords, as in:
...

 
You don't even need a separate "reversed" index, just add two entries (the forward and reversed) for each object added to the collection.
 
Actually, wouldn't this give you wrong results?  That is, if in the normal collection you had "foobar" and "rabbit" and searched for '%bar', I think you would get back both "foobar" and "rabbit" (since it would match on raboof and rabbit, right?).
 
So, for safety, I would still suggest having 2 collections - or maybe tagging the collection with a notice if it is a reversed value or not.
 
-ChrisC