You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by ritesh kumar <im...@outlook.com> on 2017/09/06 05:57:35 UTC

Phrase boosting on multiple fields

I have a situation where I have to apply phrase boosting on multiple fields. I am using Edismax as query parser.
For instance, I am accepting a keyword (phrase) from the user and I want the doc with the exact phrase to be on the top of the resultant list. The problem is, there are multiple fields to be queried upon.
I could find some assistance from the code below but again it works on a single field only.

q=java+design+patterns&defType=edismax&qf=name&pf2=name^30&ps=0

Any kind of suggestion would be helpful.

Best,

Ritesh Kumar



Re: Phrase boosting on multiple fields

Posted by ANNAMANENI RAVEENDRA <a....@gmail.com>.
Just pass qf=field1,field2,field3&pf=field1,firld2,field3

Like that you can add as many field as you want


On Wed, 6 Sep 2017 at 2:41 AM, ritesh kumar <im...@outlook.com>
wrote:

> I have a situation where I have to apply phrase boosting on multiple
> fields. I am using Edismax as query parser.
> For instance, I am accepting a keyword (phrase) from the user and I want
> the doc with the exact phrase to be on the top of the resultant list. The
> problem is, there are multiple fields to be queried upon.
> I could find some assistance from the code below but again it works on a
> single field only.
>
> q=java+design+patterns&defType=edismax&qf=name&pf2=name^30&ps=0
>
> Any kind of suggestion would be helpful.
>
> Best,
>
> Ritesh Kumar
>
>
>