i've build a query in solr that looks like this:
https://local.solr.com/solr/select?omitHeader=true&wt=json&json.nl=flat&q=*:*&fq=xtitleLow_stringS:*1002*+OR+xartnumLow_stringS:*1002*
I want to search in solr with the query "1002" for results. I didn't work it out how to search both fields with the normal query so i used the filter query.
But i can't boost the results so im kind of lost on this point. How to build this as a query so i can boost some of the fields?
thank you.
You can try with the
edismaxhandler provided by Solr. This allows to use list of fields to query. It has option to give separate weights for each of the field for scoring them differently.The above query will search for
1002in each of the mentioned fields. It will be also adding a boost of 20x to any hits in thextitleLow_stringSfield.Please find the documentation link here for more details