boost query

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

boost query

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 .
Reply | Threaded
Open this post in threaded view
|

Re: boost query

Erik Hatcher-4
This blog I wrote will help.   Let us know how it goes.  

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

       Erik

> On Dec 7, 2018, at 01:31, Midas A <[hidden email]> wrote:
>
> 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 .
Reply | Threaded
Open this post in threaded view
|

Re: boost query

Midas A
Thanks Erik.
Please confirm
if keyword = "nokia"
*bq=_val_:%22payload(vals_dpf,noika)%22&defType=edismax*
*wil this query work for me ?.*





On Fri, Dec 7, 2018 at 12:12 PM Erik Hatcher <[hidden email]> wrote:

> This blog I wrote will help.   Let us know how it goes.
>
>      https://lucidworks.com/2017/09/14/solr-payloads/
>
>        Erik
>
> > On Dec 7, 2018, at 01:31, Midas A <[hidden email]> wrote:
> >
> > 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 .
>
Reply | Threaded
Open this post in threaded view
|

Re: boost query

Erik Hatcher-4
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

> On Dec 7, 2018, at 02:19, Midas A <[hidden email]> wrote:
>
> Thanks Erik.
> Please confirm
> if keyword = "nokia"
> *bq=_val_:%22payload(vals_dpf,noika)%22&defType=edismax*
> *wil this query work for me ?.*
>
>
>
>
>
>> On Fri, Dec 7, 2018 at 12:12 PM Erik Hatcher <[hidden email]> wrote:
>>
>> This blog I wrote will help.   Let us know how it goes.
>>
>>     https://lucidworks.com/2017/09/14/solr-payloads/
>>
>>       Erik
>>
>>> On Dec 7, 2018, at 01:31, Midas A <[hidden email]> wrote:
>>>
>>> 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 .
>>