I am attempting to boost documents in Apache Solr based on multiple field values using the DisMax query parser. Since this has to be a multiplicative boost, I can't use bq. Specifically, I want to boost documents that have city values of "Mumbai," "Kolkata," and "Bengaluru" by a factor of 5. However, my current approach doesn't seem to work for boosting multiple cities, even though it works fine for a single city.
For boosting a single city (e.g., "Mumbai"), I am using the following query term, which successfully boosts the corresponding documents:
&boost=map(query({!dismax qf=city v="'Mumbai'" pf=""}),0,0,1,5)
However, when I attempt to boost multiple cities using the OR operator, as shown in the query term below, it doesn't seem to have any effect:
&boost=map(query({!dismax qf=city v="'Mumbai' OR 'Kolkata' OR 'Bengaluru'" pf=""}),0,0,1,5)
I suspect that there might be a syntax error or an issue with the query structure when boosting multiple cities. Is there a correct syntax or alternative approach to achieve the desired boost for multiple city values?
I would greatly appreciate any guidance or suggestions on how to correctly boost documents based on multiple city values using the DisMax query parser with the OR operator.