lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From James Huang <metapr...@yahoo.com>
Subject Re: Sort by relevance+distance
Date Sun, 18 Sep 2005 14:24:39 GMT
--- Erik Hatcher <erik@ehatchersolutions.com> wrote:

> Get back to using your DistanceComparatorSource, and
> couple that with  
> a SortField.FIELD_SCORE, like this:
> 
> Sort sort = new Sort(new SortField[] {new
> SortField("location",
>          new DistanceComparatorSource(<whatever args
> you need>)),  
> SortField.FIELD_SCORE});

Thanks!

Does the order of thest two fields matter? I mean,
with your code, would distance take precedence over
relevance? Anyway, I'll try it out and play with
ordering and such.

-James

> 
>      Erik
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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