Nested BooleanQuery?
Posted
by KailZhang
on Stack Overflow
See other posts from Stack Overflow
or by KailZhang
Published on 2010-05-13T09:18:43Z
Indexed on
2010/05/13
9:24 UTC
Read the original article
Hit count: 132
lucene
I'm using a BooleanQuery to combine several queries. I find that if I add a BooleanQuery to the BooleanQuery, then no result is returned. The added BooleanQuery is a MUST_NOT one, like -city_id:100.
But as lucene's spec says, BooleanQuery could be nested, which I think means it's okay to add such BooleanQuery. Now I have to get all clauses from the BooleanQuery to be added, and then add them to the container BooleanQuery one by one.
I'm a bit confused. Anybody could help? Thank you very much!
© Stack Overflow or respective owner