Belsen
Belsen

Reputation: 323

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?

Upvotes: 0

Views: 1003

Answers (1)

arun
arun

Reputation: 11023

With edismax, you can do this:

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

which is a function query.

Ref:

Upvotes: 1

Related Questions