You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Chris Hostetter <ho...@fucit.org> on 2011/05/19 23:58:09 UTC
Re: solr sorting on multiple conditions, please help
: sort=query({!v="area_id: 78153"}) desc, score desc
:
: What I want to achieve is sort by if there is a match with area_id, then
: sort by the actual score
I think you can use the "map" function here to map all scores greater then
zero (matching docs) to some fixed value. something like this should
work...
qq=area_id:78153
sort=map(query($qq,-1),0,99999999,1) desc, score desc
http://wiki.apache.org/solr/FunctionQuery#map
-Hoss