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 10:59:19 GMT
Thanks for the reply,
I've looked in to the search method that takes a Sort object as argument.
As I understand it the sorting is only done on the best matches (100 by
default)? I don't want the default score to have any impact at all. I want
to sort all hits on popularity not just the best matches. 

/William  
  
> Actually what William should use is the new Sort facility to order  
> results by a field.  Doing this with a Similarity would be much  
> trickier.  Look at the IndexSearcher.sort() methods which take a Sort  
> and follow the Javadocs from there.  Let us know if you have any  
> questions on sorting.
> 
> It would be best if you represent your 'popularity' field as an integer  
> (or at least numeric) since sorting by String uses more memory.
> 
> 	Erik
> 
> 
> On Sep 22, 2004, at 4:52 AM, Otis Gospodnetic wrote:
> 
> > 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/ 
> > Similarity.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
> 
> 


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