lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michele Amoretti" <amore...@ce.unipr.it>
Subject Re: simple (?) question about scoring
Date Thu, 02 Nov 2006 22:10:13 GMT
Ok I am trying the MemoryIndex, but when compiling I have the
following erro message:

package org.apache.lucene.index.memory does not exist

Is it not included in the lucene .jar?

I currently have the latest lucene binaries.

Moreover:

parse(java.lang.String) in org.apache.lucene.queryParser.QueryParser
cannot be applied to
(java.lang.String,java.lang.String,org.apache.lucene.analysis.Analyzer)
    [javac]     float score =
index.search(QueryParser.parse("information", "content", analyzer));



Michele


On 11/2/06, Doron Cohen <DORONC@il.ibm.com> wrote:
> michele.amoretti@gmail.com 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: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>


-- 
Michele Amoretti, Ph.D.
Distributed Systems Group
Dipartimento di Ingegneria dell'Informazione
Università degli Studi di Parma
http://www.ce.unipr.it/people/amoretti

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