Have a look at the DisjunctionMaxQuery class. I don't think it is
exactly what you are looking for, but it might give you some ideas on
how to proceed, as it sounds similar to what you are trying to do.
Hope this helps,
Grant
On Aug 13, 2007, at 2:20 PM, Walt Stoneburner wrote:
Here's a scenario I just ran into, though I don't know how to make
Lucene do it (or even if it can).
I have two lists; to keep things simply lets assume (A B C D E F G)
and (X Y).
I want to form a query so that when matches appear from both lists,
results rank higher, than if many elements matched from just one.
That is, a document that matches a many terms of list one, such as A B
C D E F, ranks lower than a document that matches just one term from
each list, A X.
It is not the case that the second list weights more. It's just as
equal as the first.
So, for instance, a match of X Y, all of list two, would rank less
than a match of A X, which had hits in both.
Is this even possible, or does Lucene not have facilities for lists,
sets, groups, or whatever makes sense to call them?
-Walt Stoneburner, [EMAIL PROTECTED]
http://www.wwco.com/~wls/blog/
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------
Grant Ingersoll
http://lucene.grantingersoll.com
Lucene Helpful Hints:
http://wiki.apache.org/lucene-java/BasicsOfPerformance
http://wiki.apache.org/lucene-java/LuceneFAQ
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]