Scott Davies wrote:
> It's trivial if you construct your query tree manually, which you'll
> probably have to do for your security purposes (as opposed to using
> one of the existing query parsers)...the first argument to TermQuery's
> constructor is which field to search.
I found out that I'll need a query that looks like this:
"(group_id:#{group_id} AND private_content:#{search_term}) OR
(public_content:#{search_term})"
The query parser seems to generate a BooleanQuery at the top-level. I
spent several hours reading the book and the API, but I could not find a
way to generate 'OR' boolean queries. The API only allows :must,
:must_not and :should. How can I construct an OR query like the one above?
_______________________________________________
Ferret-talk mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/ferret-talk