The issue is absolute ordering (sort) and influencing (boosting). Here's an example....
score no boosts popularity doc1 100 1 doc2 75 2 doc3 10 3 Sorting by popularity asc will return doc1, doc2, doc3 Sorting by popularity desc will return doc3, doc2, doc1 It doesn't matter at all what the score is. When sorting by popularity ascending will sort in this order if the score of doc3 is 10,000 and the score of doc1 is 100. sorting totally overrides ranking. Boosting, on the other hand, only changes order if you sort by score (which is the default, "ranking"). So sorting by score desc would return doc1, doc2, doc3. Now, say you boost the docs such that you add 50 to the score for doc2. The returned order would be doc2, doc1, doc3. The deal here is that boosting changes the _score_, but doesn't impose an absolute ordering. Sorting by the value in a field imposes an absolute, unchanging ordering. Best, Erick On Tue, May 27, 2014 at 12:30 AM, manju16832003 <manju16832...@gmail.com> wrote: > Hi Erick, > > Your explanation leads me to one question :-) > > if > */select?q=featured:true^100&fq=make:toyota&sort=featured_date desc,price > asc* > > The above query, without edismax, works well because, If I'm not mistaken > its boosting document by value method. > > So I'm boosting all my documents with the value featured=true and all those > documents would be sorted by their featured date in descending order (Latest > featured documents) and price (lower to higher). > > My question is, > If we were to boost the documents based on a value, how could we make sure > the order of the documents? > > For example : > https://wiki.apache.org/solr/SolrRelevancyFAQ > defType=dismax&qf=text&q=supervillians&bf=popularity > > In the above case, all the documents that contains the word *popularity* > would be on top depends on their score. > > However, I want to order the documents by certain criteria that contains the > word popularity.... So we would have to use *sort* to order the documents. > > if we say, boosting has no or almost no effect if we use sort, then whats > the contradiction story between *sort* and *boost* > > :-) would be interesting to know the answer > > > > -- > View this message in context: > http://lucene.472066.n3.nabble.com/Applying-boosting-for-keyword-search-tp4137523p4138241.html > Sent from the Solr - User mailing list archive at Nabble.com.