[EMAIL PROTECTED] 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 - http://lucene.apache.org/java/docs/scoring.html - 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 -
http://lucene.apache.org/java/docs/api/org/apache/lucene/store/RAMDirectory.html
 - 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.
http://lucene.apache.org/java/docs/api/org/apache/lucene/index/memory/package-summary.html

Doron


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to