1

in my solr call i want to boost all queries that have the word "mobile" in the longtext.

My call looks like this:

&q=*my_query*&defType=edismax&qf=xtitleLow_stringS^20++xartnumLow_stringS&ps=2&bq=xtitleLow_stringS:(*mobile*)^40

when i use the Boost query like this:

&bq=xtitleLow_stringS:"mobile"^40

it will work for fulltext but i just want to boost a query that contains it. I thought i can use the "*" contain to especially search for it. But it doesen't work, is there a mistake in my syntax?

thank you!

lvollmer
  • 1,418
  • 2
  • 13
  • 32

1 Answers1

0

The syntax of the boost query seems incorrect in my opinion. The "*" wildcard can only be used in a query when preceded by the word "text".

e.g. &bq=xtitleLow_stringS:text:mobile^40

To boost all queries that contain the word "mobile", you can write as:

&bq=xtitleLow_stringS:mobile^40

This should boost any query that contains the word "mobile" in the xtitleLow_stringS field by 40 factor.

Akhilesh Kumar
  • 4,127
  • 1
  • 11
  • 10
  • Thank you, but when i use it doesen't work. my field looks like this: "xtitleLow_stringS": "mobile station 15x23mm" when i use the query like this: &bq=xtitleLow_stringS:mobile^40 it won't work it just works when i use it like this: &bq=xtitleLow_stringS:mobile station 15x23mm^40 – lvollmer Feb 02 '23 at 08:39