Discussion:
boost query
Midas A
2018-12-07 06:31:19 UTC
Permalink
I have a field at my schema named *val_dpf* . I want that *val_dpf* should
have payloaded values. i.e.

noika|0.46 mobile|0.37 samsung|0.19 redmi|0.22

When a user searches for a keyword i.e. nokia I want to add 0.46 to usual
score. If user searches for samsung, 0.19 should be added .

how can i achieve this .
Erik Hatcher
2018-12-07 06:42:40 UTC
Permalink
This blog I wrote will help. Let us know how it goes.

https://lucidworks.com/2017/09/14/solr-payloads/

Erik
Post by Midas A
I have a field at my schema named *val_dpf* . I want that *val_dpf* should
have payloaded values. i.e.
noika|0.46 mobile|0.37 samsung|0.19 redmi|0.22
When a user searches for a keyword i.e. nokia I want to add 0.46 to usual
score. If user searches for samsung, 0.19 should be added .
how can i achieve this .
Midas A
2018-12-07 07:19:08 UTC
Permalink
Thanks Erik.
Please confirm
if keyword = "nokia"
*bq=_val_:%22payload(vals_dpf,noika)%22&defType=edismax*
*wil this query work for me ?.*
Post by Erik Hatcher
This blog I wrote will help. Let us know how it goes.
https://lucidworks.com/2017/09/14/solr-payloads/
Erik
Post by Midas A
I have a field at my schema named *val_dpf* . I want that *val_dpf*
should
Post by Midas A
have payloaded values. i.e.
noika|0.46 mobile|0.37 samsung|0.19 redmi|0.22
When a user searches for a keyword i.e. nokia I want to add 0.46 to usual
score. If user searches for samsung, 0.19 should be added .
how can i achieve this .
Erik Hatcher
2018-12-07 13:01:09 UTC
Permalink
Only way to know is to try! ;)

You have a typo on “noika”. I’d use ‘bf’ instead of bq so as to specify the function without the _val_ stuff.

Erik
Post by Midas A
Thanks Erik.
Please confirm
if keyword = "nokia"
*bq=_val_:%22payload(vals_dpf,noika)%22&defType=edismax*
*wil this query work for me ?.*
Post by Erik Hatcher
This blog I wrote will help. Let us know how it goes.
https://lucidworks.com/2017/09/14/solr-payloads/
Erik
Post by Midas A
I have a field at my schema named *val_dpf* . I want that *val_dpf*
should
Post by Midas A
have payloaded values. i.e.
noika|0.46 mobile|0.37 samsung|0.19 redmi|0.22
When a user searches for a keyword i.e. nokia I want to add 0.46 to usual
score. If user searches for samsung, 0.19 should be added .
how can i achieve this .
Loading...