My nomination for "best undocumented feature" is this: you can pass an
array to :with.
By using an array you can generate complex boolean conditions.
For example:
To search for variety is "pine OR redwood"
Tree.search "sapling", :with => {:variety => 'pine redwood'}
To search for variety is "(pine OR redwood) AND (evergreen)"
Tree.search "sapling", :with => [['variety', 'pine redwood'],
['variety', 'evergreen']]
It took me a while to figure that out. I hope it helps someone else.
Browsing the archives, it seems that this question has been asked in
the past, although answered unsatisfactorily.
-elijah
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---