solrsolr-boost

Boost document in Solr


i'd like to boost documents in solr only if a certain field has a fixed value for example:

i'd like to boost all documents that have the value of the field colour set to "yellow"

bf=colour:yellow^10

Is it possible?


Solution

  • With edismax, you can do this:

    bf=if(exists(query({!v='colour:yellow'})),10,1)
    

    which is a function query.

    Ref: