lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "wille@tegenaria.com" <wi...@tegenaria.com>
Subject Re: Implement custom score
Date Wed, 22 Sep 2004 09:06:55 GMT
Yes thanks,
I implemented my own Similarity class that returns 1.0f from lengthNorm()
and idf() then I use setBoost when writing the document. However I get some
small round errors. When I boost with 0.7 that document gets the score
0.625. I've found that this has to do with the encode/decode norm in
Simliarity. Should I do anything about it? or does'nt it matter?

/William

> You need your own Similarity implementation and you need to set it as
> shown in this javadoc:
>
http://jakarta.apache.org/lucene/docs/api/org/apache/lucene/search/Similarit
y.html
> 
> Otis
> 
> --- "wille@tegenaria.com" <wille@tegenaria.com> wrote:
> 
> > Hi,
> > I know this is probably a common question and I've found a couple of
> > posts
> > about it in the archive but none with a complete answer. If there is
> > one
> > please point me to it! 
> > 
> > The question is that I want to discard the default scoring and
> > implement my
> > own. I want all the the hits to be sorted after popularity (a field)
> > and
> > not by anything else. How can I do this? What classes and methods do
> > I have
> > to change?
> > 
> > thanks,
> > William  
> > 
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: lucene-user-help@jakarta.apache.org
> > 
> > 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: lucene-user-help@jakarta.apache.org
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org


Mime
View raw message