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 Fri, 03 Nov 2006 11:16:53 GMT
Yes! I modified the example to be compliant with 2.1 api, and I added
the hits.score() call, for each discovered results.

It works!

     [java] Hits for "freedom" were found in quotes by:
     [java]   1. Mohandas Gandhi with score = 0.53033006
     [java]   2. Ayn Rand with score = 0.25
     [java]   3. Friedrich Hayek with score = 0.1875

     [java] Hits for "free" were found in quotes by:
     [java]   1. Ayn Rand with score = 0.5986179

     [java] Hits for "progress or achievements" were found in quotes by:
     [java]   1. Theodore Roosevelt with score = 0.14965448
     [java]   2. Friedrich Hayek with score = 0.11224086


I will start from this, for my purposes.

Thank you for all the hints.

Michele



On 11/3/06, Michele Amoretti <amoretti@ce.unipr.it> wrote:
> http://javatechniques.com/public/java/docs/basics/lucene-memory-search.html
>
> is this good? it seems to be good..
>
> On 11/3/06, Michele Amoretti <amoretti@ce.unipr.it> wrote:
> > Ok, sorry I did not read it in depth.
> >
> > Now, where can I find an example of:
> >
> > - building the RAMDirectory
> > - scoring all documents against the query?
> >
> > thanks
> >
> > On 11/3/06, Chris Hostetter <hossman_lucene@fucit.org> wrote:
> > >
> > > : I have a question: is the score for a document different if I have
> > > : only that document in my index, or if I have N documents?
> > > : If the answer is yes, I will put all N documents together, otherwise I
> > > : will evaluate them one by one.
> > >
> > > as i said before, yes it does...
> > >
> > > >> For most of the various types of Queries that exist in Lucene, the
> > > >> score is very dependent on how common the Terms involved are in the
> > > >> Corpus as a whole -- if your Corpus consists of only 1 Document, then
> > > >> your scores are going to be relatively meaningless.
> > >
> > > ...you will see a big difference between an index containing 1 doc, and an
> > > index containing 10 docs which all match your query, and an index
> > > containing 100000 docs.
> > >
> > > I believe Doron already suggested you take a look at the Document
> > > explainaing how Lucene's Scoring works correct? ...
> > >
> > >        http://lucene.apache.org/java/docs/scoring.html
> > >
> > >
> > > -Hoss
> > >
> > >
> > > ---------------------------------------------------------------------
> > > 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
> >
>
>
> --
> Michele Amoretti, Ph.D.
> Distributed Systems Group
> Dipartimento di Ingegneria dell'Informazione
> Università degli Studi di Parma
> http://www.ce.unipr.it/people/amoretti
>


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