lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Philippe <mailer.tho...@gmail.com>
Subject Sort by the number of matching fields
Date Thu, 21 Jan 2010 14:15:49 GMT
Hi everyone,

I want to sort my results independent from my query string. Matching 
"documents" should be ordered by the number of fields containing a 
specific String.

Let's assume my query returns 2 Documents:

Doc1 contains 5 "ID"-fields (1,2,3,4,5)
Doc2 contains 3 "ID"-fields (5,6,7)

I'm more interested in documents containing the ids (5,6) so Document2 
should be ranked higher than Document1.

What would be the best way to perform this?

Regards,
    Philippe

---------------------------------------------------------------------
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