I've been experimenting with boolean queries to find out their real meaning.
If you want to submit a query and would like the returned hits to be documents in which ALL the query terms appear, is it necessary to construct a boolean query adding a clause for each term in the query: booleanQuery.add(term, true, false) ?
After some experiments, it seems that the Query returned by the QueryParser given a String of query terms, is really a query that will return documents with ANY of the query terms. Can anyone tell me for sure?
Thanks,
Melissa
If you want to submit a query and would like the returned hits to be documents in which ALL the query terms appear, is it necessary to construct a boolean query adding a clause for each term in the query: booleanQuery.add(term, true, false) ?
After some experiments, it seems that the Query returned by the QueryParser given a String of query terms, is really a query that will return documents with ANY of the query terms. Can anyone tell me for sure?
Thanks,
Melissa