lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joel Halbert <>
Subject Query to always prefer adjacent terms.
Date Tue, 13 Sep 2011 13:26:25 GMT
Hi Folks,

What is the simplest method of constructing a multi term query such that
the highest scoring document(s) is always that which contain all terms
in the query adjacent to each other?

i.e. if I search for "federal reserve" I would prefer documents that
contain "Ben Bernake is the chairman of the federal reserve" to score
higher than "the federal government is going to reserve ...".

I'd rather not do this as two separate queries.


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

View raw message