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