What you want is:
    All results within the area and whatever results the
QueryElevateComponent adds, sorted by some relevance function.

If this is it, you can get the results, with the elevated output, and
do a second query with all of the ids, sorted by distance. This second
query would not use the filter query.

On Thu, Apr 29, 2010 at 4:04 AM, Oliver Beattie <oli...@obeattie.com> wrote:
> Just wondering if anyone had any further thoughts on how I might do this?
>
> On 26 April 2010 19:18, Oliver Beattie <oli...@obeattie.com> wrote:
>
>> Hi Grant,
>>
>> Thanks for getting back to me. Yes, indeed, #1 is exactly what I'm looking
>> for. Results are already ranked by distance (among other things), but we
>> need the ability to manually include a certain result in the set. They
>> wouldn't usually match, because they fall outside the radius of the filter
>> query we use. Most of the resulting score comes from function queries (we
>> have a number of metrics that rank listings [price, feedback score, etc]),
>> so the score from the text search doesn't have *that much* bearing on the
>> outcome. So, yeah, basically, I'm looking for a way to include results that
>> don't match, but have Solr calculate its score as it would if it did match
>> the filter query. Sorry for being so unclear and rambling a bit, I'm
>> struggling to articulate what we want in a clear manner!
>>
>> —Oliver
>>
>>
>>
>> On 26 April 2010 19:13, Grant Ingersoll <gsing...@apache.org> wrote:
>>
>>>
>>> On Apr 26, 2010, at 7:53 AM, Oliver Beattie wrote:
>>>
>>> > Hi all,
>>> >
>>> > I'm currently writing an application that uses Solr, and we'd like to
>>> use
>>> > something like the QueryElevationComponent, without having to specify
>>> which
>>> > results appear top. For example, what we really need is a way to say
>>> "for
>>> > this search, include these results as part of the result set, and rank
>>> them
>>> > as you normally would". We're using a filter to specify which results we
>>> > want included (which is distance-based), but we really want to be able
>>> to
>>> > explicitly include certain results in certain queries (i.e. we want to
>>> > include a listing more than 5 miles away from a particular location for
>>> > certain queries).
>>> >
>>> > Is this possible? Any help would be really appreciated :)
>>>
>>>
>>> I'm not following the "rank them as you normally would" part.  If Solr
>>> were already finding them, then they would already be ranked and showing up
>>> in the results and you wouldn't need to "hardcode" them, right?  So, that
>>> leaves a couple of cases:
>>>
>>> 1. Including results that don't match
>>> 2. Elevating results that do match
>>>
>>> In your case, it sounds like you mostly just want #1.  And, based on the
>>> context (distance search) perhaps you want those results sorted by distance?
>>>  Otherwise, how else would you know where to inject the results?
>>>
>>> The QueryElevationComponent can include the results, although, I must
>>> admit, I'm not 100% certain on what happens to injected results given
>>> sorting.
>>>
>>>
>>> --------------------------
>>> Grant Ingersoll
>>> http://www.lucidimagination.com/
>>>
>>> Search the Lucene ecosystem using Solr/Lucene:
>>> http://www.lucidimagination.com/search
>>>
>>>
>>
>



-- 
Lance Norskog
goks...@gmail.com

Reply via email to