lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shahak Nagiel <snag...@yahoo.com>
Subject QueryParser.Operator with BooleanQuery
Date Mon, 18 Nov 2013 18:35:12 GMT
Initially, I queried our (v4.4) index with a single MultiFieldQueryParser and Operator.AND
to ensure that all search terms appeared in the results.

Since then, however, we've needed to query more flexibly, using a BooleanQuery to merge several
subqueries (in order to apply different analyzers to different fields/field groups).  As
a result, we've had to switch to Operator.OR, since there was no guarantee that all search
terms would apply to/match every clause of the boolean query.

Consequently, there's more "noise" in the returned results, since many of them don't contain
ALL the original search terms.

So, is there a way to enforce this AND/MUST policy in a cumulative sense across all subqueries
(i.e. filter out results which don't match all search terms)?

Thanks!

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message