lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lisa Lee <>
Subject How can I get document's top n raw score?
Date Fri, 01 Feb 2008 11:46:12 GMT

I need know document's top n raw score & term.

For example,

If one document have {apple, banana, coconut} terms, and I need top 2 score
in the document.

Simple way is just search all term in the document and sort the score - like
as below.

first, search about 'apple' term then write the score using IndexSearcher,
Query, Hits, Document and Explanation class.
second, as same way, search about term 'banana'.
third, as same way, search about term 'coconut'. 
last, compare these score and find out top 2 high score term and score.

It is no problem if number of documents are small.
But, I handle over the 1,000,000 documents and over the 20,000,000 terms.

Is there any way solve this problem more quickly?

I use 2.2.0 ver lucene.
View this message in context:
Sent from the Lucene - Java Users mailing list archive at

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

View raw message