You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@solr.apache.org by "Gajjar, Jigar" <ga...@oclc.org> on 2023/03/22 15:02:07 UTC

Multiple index combined boost using boost query

Hi All,


I want to apply multiple Index combined boost.

if(query({!terms f=au v='living' cache=false}),10.0,1) AND if(query({!terms f=ti v='living' cache=false}),10.0,1)

My requirement is, if my term ‘living’ matching both field au and ti both in same document then only add a boost to record.

Can anyone help my providing correct way to writing such boost query.

Thanks,
Jigar Gajjar



Re: Multiple index combined boost using boost query

Posted by Mikhail Khludnev <mk...@apache.org>.
Perhaps
if(query($qq),10.0,1)&qq=+{!terms f=au v='living' cache=false} +{!terms
f=ti v='living' cache=false}
Note, the syntax is really fragile, any subtle change may break it.


On Wed, Mar 22, 2023 at 6:04 PM Gajjar, Jigar <ga...@oclc.org> wrote:

> Hi All,
>
>
> I want to apply multiple Index combined boost.
>
> if(query({!terms f=au v='living' cache=false}),10.0,1) AND
> if(query({!terms f=ti v='living' cache=false}),10.0,1)
>
> My requirement is, if my term ‘living’ matching both field au and ti both
> in same document then only add a boost to record.
>
> Can anyone help my providing correct way to writing such boost query.
>
> Thanks,
> Jigar Gajjar
>
>
>

-- 
Sincerely yours
Mikhail Khludnev
https://t.me/MUST_SEARCH
A caveat: Cyrillic!