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 Yasufumi Mizoguchi <ya...@gmail.com> on 2019/01/24 03:30:35 UTC

Per-field slop param in eDisMax

Hi,

I am struggling to set per-field slop param in eDisMax query parser with
Solr 6.0 and 7.6.
What I want to do with eDixMax is similar to following in the default query
parser.

* Query string : "aaa bbb"
* Target fields : fieldA(TextField), fieldB(TextField)

q=fieldA:"aaa bbb"~2 OR fieldB:"aaa bbb"~5

Anyone have good ideas?

Thanks,
Yasufumi.

Re: Per-field slop param in eDisMax

Posted by Yasufumi Mizoguchi <ya...@gmail.com>.
Hi, Elizabeth

Thank you for replying me.
I tried your idea and it looked fine.

Thanks,
Yasufumi.

2019年1月24日(木) 22:52 Elizabeth Haubert <eh...@opensourceconnections.com>:

> To do this you specify the slop on each field when you specify the
> pf/pf2/pf3 parameters:
> pf:fieldA~2 fieldB~5
>
> I'll try to add an example to the documentation here:
>
> https://lucene.apache.org/solr/guide/7_6/the-extended-dismax-query-parser.html#using-slop
>
> Elizabeth
>
> On Wed, Jan 23, 2019 at 10:30 PM Yasufumi Mizoguchi <
> yasufumi0410@gmail.com>
> wrote:
>
> > Hi,
> >
> > I am struggling to set per-field slop param in eDisMax query parser with
> > Solr 6.0 and 7.6.
> > What I want to do with eDixMax is similar to following in the default
> query
> > parser.
> >
> > * Query string : "aaa bbb"
> > * Target fields : fieldA(TextField), fieldB(TextField)
> >
> > q=fieldA:"aaa bbb"~2 OR fieldB:"aaa bbb"~5
> >
> > Anyone have good ideas?
> >
> > Thanks,
> > Yasufumi.
> >
>

Re: [SPAM] Re: Per-field slop param in eDisMax

Posted by David Hastings <ha...@gmail.com>.
Also the order matters, it would be a different result set than
"a tnf"~2

On Thu, Jan 24, 2019 at 10:53 AM David Hastings <
hastings.recursive@gmail.com> wrote:

> it allows two words or less to be matched in a phrase in-between "tnf" and
> "a"
> so it will match
> "tnf a"
> "tnf aword1 a"
> "tnf aword1 aword2 a"
>
> On Thu, Jan 24, 2019 at 10:45 AM Danilo Tomasoni <to...@cosbi.eu>
> wrote:
>
>> And what does
>>
>> q:         f2:"tnf α"~2
>>
>> f.f2.qf:  titles study_brief_title
>>
>>
>> means with edismax?
>>
>>
>> it raises different results from
>>
>> q:         f2:"tnf α"
>>
>>
>> On 24/01/19 14:51, Elizabeth Haubert wrote:
>> > To do this you specify the slop on each field when you specify the
>> > pf/pf2/pf3 parameters:
>> > pf:fieldA~2 fieldB~5
>> >
>> > I'll try to add an example to the documentation here:
>> >
>> https://lucene.apache.org/solr/guide/7_6/the-extended-dismax-query-parser.html#using-slop
>> >
>> > Elizabeth
>> >
>> > On Wed, Jan 23, 2019 at 10:30 PM Yasufumi Mizoguchi <
>> yasufumi0410@gmail.com>
>> > wrote:
>> >
>> >> Hi,
>> >>
>> >> I am struggling to set per-field slop param in eDisMax query parser
>> with
>> >> Solr 6.0 and 7.6.
>> >> What I want to do with eDixMax is similar to following in the default
>> query
>> >> parser.
>> >>
>> >> * Query string : "aaa bbb"
>> >> * Target fields : fieldA(TextField), fieldB(TextField)
>> >>
>> >> q=fieldA:"aaa bbb"~2 OR fieldB:"aaa bbb"~5
>> >>
>> >> Anyone have good ideas?
>> >>
>> >> Thanks,
>> >> Yasufumi.
>> >>
>> --
>> Danilo Tomasoni
>> COSBI
>>
>> As for the European General Data Protection Regulation 2016/679 on the
>> protection of natural persons with regard to the processing of personal
>> data, we inform you that all the data we possess are object of treatement
>> in the respect of the normative provided for by the cited GDPR.
>>
>> It is your right to be informed on which of your data are used and how;
>> you may ask for their correction, cancellation or you may oppose to their
>> use by written request sent by recorded delivery to The Microsoft Research
>> – University of Trento Centre for Computational and Systems Biology Scarl,
>> Piazza Manifattura 1, 38068 Rovereto (TN), Italy.
>>
>>

Re: [SPAM] Re: Per-field slop param in eDisMax

Posted by David Hastings <ha...@gmail.com>.
it allows two words or less to be matched in a phrase in-between "tnf" and
"a"
so it will match
"tnf a"
"tnf aword1 a"
"tnf aword1 aword2 a"

On Thu, Jan 24, 2019 at 10:45 AM Danilo Tomasoni <to...@cosbi.eu> wrote:

> And what does
>
> q:         f2:"tnf α"~2
>
> f.f2.qf:  titles study_brief_title
>
>
> means with edismax?
>
>
> it raises different results from
>
> q:         f2:"tnf α"
>
>
> On 24/01/19 14:51, Elizabeth Haubert wrote:
> > To do this you specify the slop on each field when you specify the
> > pf/pf2/pf3 parameters:
> > pf:fieldA~2 fieldB~5
> >
> > I'll try to add an example to the documentation here:
> >
> https://lucene.apache.org/solr/guide/7_6/the-extended-dismax-query-parser.html#using-slop
> >
> > Elizabeth
> >
> > On Wed, Jan 23, 2019 at 10:30 PM Yasufumi Mizoguchi <
> yasufumi0410@gmail.com>
> > wrote:
> >
> >> Hi,
> >>
> >> I am struggling to set per-field slop param in eDisMax query parser with
> >> Solr 6.0 and 7.6.
> >> What I want to do with eDixMax is similar to following in the default
> query
> >> parser.
> >>
> >> * Query string : "aaa bbb"
> >> * Target fields : fieldA(TextField), fieldB(TextField)
> >>
> >> q=fieldA:"aaa bbb"~2 OR fieldB:"aaa bbb"~5
> >>
> >> Anyone have good ideas?
> >>
> >> Thanks,
> >> Yasufumi.
> >>
> --
> Danilo Tomasoni
> COSBI
>
> As for the European General Data Protection Regulation 2016/679 on the
> protection of natural persons with regard to the processing of personal
> data, we inform you that all the data we possess are object of treatement
> in the respect of the normative provided for by the cited GDPR.
>
> It is your right to be informed on which of your data are used and how;
> you may ask for their correction, cancellation or you may oppose to their
> use by written request sent by recorded delivery to The Microsoft Research
> – University of Trento Centre for Computational and Systems Biology Scarl,
> Piazza Manifattura 1, 38068 Rovereto (TN), Italy.
>
>

Re: [SPAM] Re: Per-field slop param in eDisMax

Posted by Danilo Tomasoni <to...@cosbi.eu>.
And what does

q:         f2:"tnf α"~2

f.f2.qf:  titles study_brief_title


means with edismax?


it raises different results from

q:         f2:"tnf α"


On 24/01/19 14:51, Elizabeth Haubert wrote:
> To do this you specify the slop on each field when you specify the
> pf/pf2/pf3 parameters:
> pf:fieldA~2 fieldB~5
>
> I'll try to add an example to the documentation here:
> https://lucene.apache.org/solr/guide/7_6/the-extended-dismax-query-parser.html#using-slop
>
> Elizabeth
>
> On Wed, Jan 23, 2019 at 10:30 PM Yasufumi Mizoguchi <ya...@gmail.com>
> wrote:
>
>> Hi,
>>
>> I am struggling to set per-field slop param in eDisMax query parser with
>> Solr 6.0 and 7.6.
>> What I want to do with eDixMax is similar to following in the default query
>> parser.
>>
>> * Query string : "aaa bbb"
>> * Target fields : fieldA(TextField), fieldB(TextField)
>>
>> q=fieldA:"aaa bbb"~2 OR fieldB:"aaa bbb"~5
>>
>> Anyone have good ideas?
>>
>> Thanks,
>> Yasufumi.
>>
-- 
Danilo Tomasoni
COSBI

As for the European General Data Protection Regulation 2016/679 on the protection of natural persons with regard to the processing of personal data, we inform you that all the data we possess are object of treatement in the respect of the normative provided for by the cited GDPR.

It is your right to be informed on which of your data are used and how; you may ask for their correction, cancellation or you may oppose to their use by written request sent by recorded delivery to The Microsoft Research – University of Trento Centre for Computational and Systems Biology Scarl, Piazza Manifattura 1, 38068 Rovereto (TN), Italy.


Re: Per-field slop param in eDisMax

Posted by Elizabeth Haubert <eh...@opensourceconnections.com>.
To do this you specify the slop on each field when you specify the
pf/pf2/pf3 parameters:
pf:fieldA~2 fieldB~5

I'll try to add an example to the documentation here:
https://lucene.apache.org/solr/guide/7_6/the-extended-dismax-query-parser.html#using-slop

Elizabeth

On Wed, Jan 23, 2019 at 10:30 PM Yasufumi Mizoguchi <ya...@gmail.com>
wrote:

> Hi,
>
> I am struggling to set per-field slop param in eDisMax query parser with
> Solr 6.0 and 7.6.
> What I want to do with eDixMax is similar to following in the default query
> parser.
>
> * Query string : "aaa bbb"
> * Target fields : fieldA(TextField), fieldB(TextField)
>
> q=fieldA:"aaa bbb"~2 OR fieldB:"aaa bbb"~5
>
> Anyone have good ideas?
>
> Thanks,
> Yasufumi.
>