Search code examples
solrsolr-boost

Solr field boosting with boost field and score value


I am using solr 4.10. I have a boost field in Solr schema that is updated after 24 hours according to some log analysis. Its default value is zero. I have to order document according to this value. But when document have a value zero then they should be ordered according to score.

Just for explainantion. Suppose 10 documents are retrieved. Out of those 10, 4 documents have value other than default. Now I want that these documents should be ordered according to boost value. And remaning 6 documents should be ordered according to score value.

What should be its query ? Please give some details as I am not too familiar with SOLR.


Solution

  • You should try to first sort with respect to boost and then sort with respect to score. It should work and fulfill your requirements