lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From James Huang <>
Subject Re: Sort by relevance+distance
Date Sun, 18 Sep 2005 19:39:56 GMT

--- Jeff Rodenburg <> wrote:

> trimming the post further:
> On 9/18/05, James Huang <> wrote:
> > 
> > >The problem is quite generic, I believe. What I
> like to do is similar to 
> > LIA-ch6, i.e. to find a "good Chinese Hunan-style
> restaurant near me." I 
> > prefer Hunan-style; however, if a good Human-style
> one is 12 miles, where 
> > there is a Shanghai-style only 2 miles, I may want
> to take that instead. So 
> > it's not a simple multi-sorting problem, it's an
> empirical ordering and the 
> > parameters may have to be experimented. Thus far,
> I'm happy with that 
> > formula I gave earlier.
> Now I have to find a way to customize the scoring
> during search (using Hits, 
> > not customized HitsCollector). Help is desparately
> needed here!
> > 
> The typical approach (from what I know) to
> implementing an affect on scoring 
> is to do field boosting. The difficulty in this
> scenario is the distance 
> factor, which sounds as if it's determined at
> run-time, plus the trickiness 
> of field boosting based on the values of the field.
> I've looked at this as 
> well, and it's not a simple problem to solve.
> How are you determining if something is "near me"?
> Is it a calculation at 
> run-time, i.e. latitude, longitude, and geometric
> math? What options do you 
> have to determine distance?

Yes, the distance is calculated at runtime, based on
longitude/latitude. Field score boosting doesn't seem
to apply. In fact, there are other dynamic factors in
addition to distance to determine the order of search

So the question is, is there a way to overriding score
calculation at runtime? In the lucene/search package,
I see interfaces like Scorer, Weight and methods like
Query.createWeight(). This looks promising.


Yahoo! Mail - PC Magazine Editors' Choice 2005

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message