lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Doron Cohen <>
Subject Re: simple (?) question about scoring
Date Thu, 02 Nov 2006 20:01:39 GMT wrote on 02/11/2006 06:36:48:
> .. the following operation:
> given a Query and a Document, return the score
> .. I would like a method which returns the score directly.
> .. Btw, I do not have an index, I have 1 Document, and 1 Query.

Lucene scoring - - uses
pre-computed statistics, location info, and the number of documents in the
index (1 in your case). So some preparation is required before a
(stand-alone) document can be scored against a query.

You could create a single-document in-memory index, with RAMDirectory -
 - then you can search and score against that single document index.

Perhaps also MemoryIndex would be useful for you - in Lucene's contrib - I
never used it, but it seems very relevant to your question.


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

View raw message