the first thing I'd try would be FunctionQueries, see:
http://wiki.apache.org/solr/FunctionQuery.

Be a little careful. You have disjoint conditions, i.e.
one or the other should be used so you'll have two
function queries, basically expressing
if (age < 20 years)
if (age >= 20 years)

The one that _doesn't_ apply should return 1, not 0
since it'll be multiplied by the score.

Best
Erick

On Thu, Jul 11, 2013 at 11:03 AM, Vineel <vine...@visionsoft-inc.com> wrote:
>
>
> Here is the structure of the solr document
>
>    <doc>
>      <str name="latlong">52.401790,4.936660</str>
>      <date name="dateOfBirth">1993-12-09T00:00:00Z</date>
>    </doc>
>
> would like to search for document's based on the following weighted
> criteria..
>
>     - distance 0-10miles weight 40
>     - distance 10miles and above weight 20
>     - Age 0-20years weight 20
>     - Age 20years and above weight 10
>
> wondering what are the recommended approaches to build SOLR queries for
> this?
>
> Thanks
> -Vineel
>
>
>
>
> --
> View this message in context: 
> http://lucene.472066.n3.nabble.com/How-to-boost-relevance-based-on-distance-and-age-tp4077330.html
> Sent from the Solr - User mailing list archive at Nabble.com.

Reply via email to