lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yonik Seeley" <ysee...@gmail.com>
Subject Re: Sort problematics
Date Thu, 18 May 2006 21:01:56 GMT
On 5/18/06, Marcus Falck <marcus.falck@observer.se> wrote:

> If i use lucene default implementation of the TermScorer and search for
>
> "you" OR "her"
>
> The term scorer will give higher score on documents containing both terms. This is a
problem (in our application) since in this case want the same score on documents as long as
they contain 1 of the terms

If this is your problem, it has nothing to do with "sorting" (using
Lucene terminology) but scoring.  There are numbers of ways:

1) Change Similarity.coord()  (read the JavaDoc for Similarity)
2) DisjunctionMaxQuery
3) query "you" and "her" separately and use the union of the results

-Yonik
http://incubator.apache.org/solr Solr, the open-source Lucene search server

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message