Yonik Seeley wrote:
See BooleanQuery.setMinimumNumberShouldMatch()
There isn't currently any QueryParser support, so you have to create
the query pragmatically.
Thanks Yonik for your quick response; that is exactly what I was looking
for. Next time I'll check the docs a little more closely. I am
generating the queries programatically already so it should be fairly
straightforward to add that call.
Thanks again,
Ryan
-Yonik
http://incubator.apache.org/solr Solr, the open-source Lucene search server
On 10/6/06, Ryan Heinen <[EMAIL PROTECTED]> wrote:
Hello,
If I want make sure that only documents that contain at least two of the
N TermQueries A, B, C, and D (N=4) are considered matches, what is the
best way to approach this? I know I can expand it out into several
boolean clauses like so:
(+A +B) (+A +C) (+A +D) (+B +C) (+B +D) (+C +D)
But unfortunately that doesn't really scale well as N increases. Also a
solution where the minimum number of clauses to match is variable would
be ideal.
Does anyone know of a way to accomplish this?
Thanks,
Ryan
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]