lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Re: Generating Query for Multiple Clauses in a Single Field
Date Thu, 30 Jul 2009 07:42:53 GMT

: I am trying to create a query, that first will return a set
: of results, then
: it will give a boost to the results that have all the
: keyword entered by the user.

If I understand you correctly: User will enter multiple keywords. Lets say a b c d. And you
want documents - that contains/have all of the keywords (a b c d) - get higher scores (boosted).
In other words if there are some documents in the collection that have all (a b c d), you
want to see them at the top of the result set. And result set may contain/retrieve documents
that have one or two of the keywords at the end of list. Am i correct?

If that's you want, you don't need to do anything special. Lucene does it by default. Use
default operator OR. The more query terms appears in a document, the more relevant that document
is to the query.


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

View raw message