Reputation: 604
My solr webrequest looks like this
http://XXX.XX.XX.XX:8080/search/select?q=bay cities&defType=dismax&qf=screenname^10+screenname1^100.0+comments^50+tagwords^10+spottype^40+spotscene^50+spotscenecategory^50&bq=locationid:22878^40&mm=1&start=0&rows=40reccount desc&fq=locationid:22878 OR query:"{!bbox}"&sfield=location&pt=34.0194543, -118.4911912&d=8&fl=profileid,screenname1,reccount,score,locationid&sort=score desc
Here i am using &sort=score desc
Now iam looking like @sort=sum(log(popularity),score) desc
But i use like this its giving me error
sort param could not be parsed as a query, and is not a field that exists in the index: sum(log(popularity),score)
Upvotes: 3
Views: 11693
Reputation: 546
I had the same problem, I fixed this using this:
&sort=score desc, sum(log(popularity))
Upvotes: 2
Reputation: 12495
The issue, I think, is that score
is a pseudofield and not a field that is actually indexed. Maybe you can try to use Relevance Functions in place of score
(if you're using Solr 4.0). However, I think what you're trying to do is to boost the score based on popularity
. In that case you'll want to look here:
http://wiki.apache.org/solr/SolrRelevancyFAQ#How_can_I_change_the_score_of_a_document_based_on_the_.2Avalue.2A_of_a_field_.28say.2C_.22popularity.22.29
Upvotes: 3