lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <>
Subject Re: Match "best one" from list
Date Fri, 13 Jun 2008 22:25:08 GMT

:   BESTOF( "apple"^10, "orange"^9, "pear"^8, "peach"^8, "grapes"^2 )
: So ideally in this field we want to find "apple", but would accept one of
: the other pre-defined alternatives as a match. If the document field
: contains apples it scores higher than if it only contains oranges, but a
: document with apples AND oranges only has apples taken into consideration,

take a look at DisjunctionMaxQuery.  I'm 90% certain it's exactly what 
you're talking about.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message