0
votes

I want to sort document by relevancy i.e. First all docs having "Burj Khalifa" in title and then in summary field? and sort by publishdate as well. means latest documents must have high score.

criteria is like sort by score with publishdate

http://localhost:8080/solr/select?sort=score+desc,publishdate+desc&q=Burj Khalifa

1
Good for you. let us know when you have a question regarding this... - Adrian Grigore
@Adrian Grigore and other closers: this is a perfectly valid question, even though not very clearly written. Please don't vote to close just because you don't understand the topic. - Mauricio Scheffer
And please refrain from making such patronising comments, they don't help anyone and they hurt your reputation (your real one) - Mauricio Scheffer

1 Answers

2
votes

I think you don't want sorting in this case, as it defines a strict ordering on the result set. Instead, I'd use DisMax with a FunctionQuery (see here to boost newer documents) and the qf parameter to boost the title field.

You'll have to play a bit with the boost values to get optimal results.