Query on autoGeneratePhraseQueries

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

Query on autoGeneratePhraseQueries

Shubham Goswami
*Hi all,*

I am a beginner to solr framework and I am trying to implement
*autoGeneratePhraseQueries* property in a fieldtype of type=text_general, i
kept the property value as true and restarted the solr server but still it
is not taking my two words query like(Black company) as a phrase without
double quotes and returning the results only for Black.

         Can somebody please help me to understand what am i missing ?
Following is my Schema.xml file code and i am using solr 7.5 version.
<fieldType name="text_general" class="solr.TextField"
positionIncrementGap="100" multiValued="true"
autoGeneratePhraseQueries="true">
    <analyzer type="index">
      <tokenizer class="solr.StandardTokenizerFactory"/>=
      <filter class="solr.StopFilterFactory" words="stopwords.txt"
ignoreCase="true"/>
      <filter class="solr.LowerCaseFilterFactory"/>
    </analyzer>
    <analyzer type="query">
      <tokenizer class="solr.StandardTokenizerFactory"/>
      <filter class="solr.StopFilterFactory" words="stopwords.txt"
ignoreCase="true"/>
      <filter class="solr.SynonymGraphFilterFactory" expand="true"
ignoreCase="true" synonyms="synonyms.txt"/>
      <filter class="solr.LowerCaseFilterFactory"/>
    </analyzer>
  </fieldType>


--
*Thanks & Regards*
Shubham Goswami
Enterprise Software Engineer
*HotWax Systems*
*Enterprise open source experts*
cell: +91-7803886288
office: 0731-409-3684
http://www.hotwaxsystems.com
Reply | Threaded
Open this post in threaded view
|

Re: Query on autoGeneratePhraseQueries

kshitij tyagi
Hi,

Try debugging your solr query and understand how it gets parsed. Try using
"debug=true" for the same

On Tue, Oct 15, 2019 at 12:58 PM Shubham Goswami <[hidden email]>
wrote:

> *Hi all,*
>
> I am a beginner to solr framework and I am trying to implement
> *autoGeneratePhraseQueries* property in a fieldtype of type=text_general, i
> kept the property value as true and restarted the solr server but still it
> is not taking my two words query like(Black company) as a phrase without
> double quotes and returning the results only for Black.
>
>          Can somebody please help me to understand what am i missing ?
> Following is my Schema.xml file code and i am using solr 7.5 version.
> <fieldType name="text_general" class="solr.TextField"
> positionIncrementGap="100" multiValued="true"
> autoGeneratePhraseQueries="true">
>     <analyzer type="index">
>       <tokenizer class="solr.StandardTokenizerFactory"/>=
>       <filter class="solr.StopFilterFactory" words="stopwords.txt"
> ignoreCase="true"/>
>       <filter class="solr.LowerCaseFilterFactory"/>
>     </analyzer>
>     <analyzer type="query">
>       <tokenizer class="solr.StandardTokenizerFactory"/>
>       <filter class="solr.StopFilterFactory" words="stopwords.txt"
> ignoreCase="true"/>
>       <filter class="solr.SynonymGraphFilterFactory" expand="true"
> ignoreCase="true" synonyms="synonyms.txt"/>
>       <filter class="solr.LowerCaseFilterFactory"/>
>     </analyzer>
>   </fieldType>
>
>
> --
> *Thanks & Regards*
> Shubham Goswami
> Enterprise Software Engineer
> *HotWax Systems*
> *Enterprise open source experts*
> cell: +91-7803886288
> office: 0731-409-3684
> http://www.hotwaxsystems.com
>
Reply | Threaded
Open this post in threaded view
|

Re: Query on autoGeneratePhraseQueries

Shubham Goswami
Hi kshitij

Thanks for the reply!
I tried to debug it and found that raw query(black company) has parsed as
two separate queries
black and company and returning the results based on black query instead of
this it should have
got parsed as a single phrase query like("black company") because i am using
autoGeneratedPhraseQuery.
Do you have any idea about this please correct me if i am wrong.

Thanks
Shubham

On Tue, Oct 15, 2019 at 1:58 PM kshitij tyagi <[hidden email]>
wrote:

> Hi,
>
> Try debugging your solr query and understand how it gets parsed. Try using
> "debug=true" for the same
>
> On Tue, Oct 15, 2019 at 12:58 PM Shubham Goswami <
> [hidden email]>
> wrote:
>
> > *Hi all,*
> >
> > I am a beginner to solr framework and I am trying to implement
> > *autoGeneratePhraseQueries* property in a fieldtype of
> type=text_general, i
> > kept the property value as true and restarted the solr server but still
> it
> > is not taking my two words query like(Black company) as a phrase without
> > double quotes and returning the results only for Black.
> >
> >          Can somebody please help me to understand what am i missing ?
> > Following is my Schema.xml file code and i am using solr 7.5 version.
> > <fieldType name="text_general" class="solr.TextField"
> > positionIncrementGap="100" multiValued="true"
> > autoGeneratePhraseQueries="true">
> >     <analyzer type="index">
> >       <tokenizer class="solr.StandardTokenizerFactory"/>=
> >       <filter class="solr.StopFilterFactory" words="stopwords.txt"
> > ignoreCase="true"/>
> >       <filter class="solr.LowerCaseFilterFactory"/>
> >     </analyzer>
> >     <analyzer type="query">
> >       <tokenizer class="solr.StandardTokenizerFactory"/>
> >       <filter class="solr.StopFilterFactory" words="stopwords.txt"
> > ignoreCase="true"/>
> >       <filter class="solr.SynonymGraphFilterFactory" expand="true"
> > ignoreCase="true" synonyms="synonyms.txt"/>
> >       <filter class="solr.LowerCaseFilterFactory"/>
> >     </analyzer>
> >   </fieldType>
> >
> >
> > --
> > *Thanks & Regards*
> > Shubham Goswami
> > Enterprise Software Engineer
> > *HotWax Systems*
> > *Enterprise open source experts*
> > cell: +91-7803886288
> > office: 0731-409-3684
> > http://www.hotwaxsystems.com
> >
>


--
*Thanks & Regards*
Shubham Goswami
Enterprise Software Engineer
*HotWax Systems*
*Enterprise open source experts*
cell: +91-7803886288
office: 0731-409-3684
http://www.hotwaxsystems.com
Reply | Threaded
Open this post in threaded view
|

Re: Re: Query on autoGeneratePhraseQueries

Audrey Lorberfeld - Audrey.Lorberfeld@ibm.com
I'm not sure how your config file is setup, but I know that the way we do multi-token synonyms is to have the sow (split on whitespace) parameter set to False while using the edismax parser. I'm not sure if this would work with PhraseQueries , but it might be worth a try!

In our config file we do something like this:

<requestHandler name="/w3search_test" class="solr.SearchHandler">
        <lst name="defaults">
            <str name="defType">edismax</str>
            <float name="tie">1.0</float>
            <str name="echoParams">explicit</str>
            <int name="rows">100</int>
            <str name="df">content_en</str>
            <str name="wt">w3json_en</str>
            <str name="sow">false</str>
        </lst>
 </requestHandler>

You can read a bit about the parameter here: https://opensourceconnections.com/blog/2018/02/20/edismax-and-multiterm-synonyms-oddities/ 

Best,
Audrey

--
Audrey Lorberfeld
Data Scientist, w3 Search
IBM
[hidden email]
 

On 10/15/19, 5:50 AM, "Shubham Goswami" <[hidden email]> wrote:

    Hi kshitij
   
    Thanks for the reply!
    I tried to debug it and found that raw query(black company) has parsed as
    two separate queries
    black and company and returning the results based on black query instead of
    this it should have
    got parsed as a single phrase query like("black company") because i am using
    autoGeneratedPhraseQuery.
    Do you have any idea about this please correct me if i am wrong.
   
    Thanks
    Shubham
   
    On Tue, Oct 15, 2019 at 1:58 PM kshitij tyagi <[hidden email]>
    wrote:
   
    > Hi,
    >
    > Try debugging your solr query and understand how it gets parsed. Try using
    > "debug=true" for the same
    >
    > On Tue, Oct 15, 2019 at 12:58 PM Shubham Goswami <
    > [hidden email]>
    > wrote:
    >
    > > *Hi all,*
    > >
    > > I am a beginner to solr framework and I am trying to implement
    > > *autoGeneratePhraseQueries* property in a fieldtype of
    > type=text_general, i
    > > kept the property value as true and restarted the solr server but still
    > it
    > > is not taking my two words query like(Black company) as a phrase without
    > > double quotes and returning the results only for Black.
    > >
    > >          Can somebody please help me to understand what am i missing ?
    > > Following is my Schema.xml file code and i am using solr 7.5 version.
    > > <fieldType name="text_general" class="solr.TextField"
    > > positionIncrementGap="100" multiValued="true"
    > > autoGeneratePhraseQueries="true">
    > >     <analyzer type="index">
    > >       <tokenizer class="solr.StandardTokenizerFactory"/>=
    > >       <filter class="solr.StopFilterFactory" words="stopwords.txt"
    > > ignoreCase="true"/>
    > >       <filter class="solr.LowerCaseFilterFactory"/>
    > >     </analyzer>
    > >     <analyzer type="query">
    > >       <tokenizer class="solr.StandardTokenizerFactory"/>
    > >       <filter class="solr.StopFilterFactory" words="stopwords.txt"
    > > ignoreCase="true"/>
    > >       <filter class="solr.SynonymGraphFilterFactory" expand="true"
    > > ignoreCase="true" synonyms="synonyms.txt"/>
    > >       <filter class="solr.LowerCaseFilterFactory"/>
    > >     </analyzer>
    > >   </fieldType>
    > >
    > >
    > > --
    > > *Thanks & Regards*
    > > Shubham Goswami
    > > Enterprise Software Engineer
    > > *HotWax Systems*
    > > *Enterprise open source experts*
    > > cell: +91-7803886288
    > > office: 0731-409-3684
    > > https://urldefense.proofpoint.com/v2/url?u=http-3A__www.hotwaxsystems.com&d=DwIBaQ&c=jf_iaSHvJObTbx-siA1ZOg&r=_8ViuZIeSRdQjONA8yHWPZIBlhj291HU3JpNIx5a55M&m=Zi9beGF58BzJUNUdCkeW0pwliKwq9vdTSh0V_lR0734&s=FhSkJBcmYw_bfHgq1enzuYQeOZwKHzlP9h4VwTZSL5E&e= 
    > >
    >
   
   
    --
    *Thanks & Regards*
    Shubham Goswami
    Enterprise Software Engineer
    *HotWax Systems*
    *Enterprise open source experts*
    cell: +91-7803886288
    office: 0731-409-3684
    https://urldefense.proofpoint.com/v2/url?u=http-3A__www.hotwaxsystems.com&d=DwIBaQ&c=jf_iaSHvJObTbx-siA1ZOg&r=_8ViuZIeSRdQjONA8yHWPZIBlhj291HU3JpNIx5a55M&m=Zi9beGF58BzJUNUdCkeW0pwliKwq9vdTSh0V_lR0734&s=FhSkJBcmYw_bfHgq1enzuYQeOZwKHzlP9h4VwTZSL5E&e= 
   

Reply | Threaded
Open this post in threaded view
|

Re: Re: Query on autoGeneratePhraseQueries

rohankasat
Also check ,
pf , pf2 , pf3
ps , ps2, ps3 parameters for phrase searches.

Regards,
Rohan K

On Tue, Oct 15, 2019 at 6:41 AM Audrey Lorberfeld -
[hidden email] <[hidden email]> wrote:

> I'm not sure how your config file is setup, but I know that the way we do
> multi-token synonyms is to have the sow (split on whitespace) parameter set
> to False while using the edismax parser. I'm not sure if this would work
> with PhraseQueries , but it might be worth a try!
>
> In our config file we do something like this:
>
> <requestHandler name="/w3search_test" class="solr.SearchHandler">
>         <lst name="defaults">
>             <str name="defType">edismax</str>
>             <float name="tie">1.0</float>
>             <str name="echoParams">explicit</str>
>             <int name="rows">100</int>
>             <str name="df">content_en</str>
>             <str name="wt">w3json_en</str>
>             <str name="sow">false</str>
>         </lst>
>  </requestHandler>
>
> You can read a bit about the parameter here:
> https://opensourceconnections.com/blog/2018/02/20/edismax-and-multiterm-synonyms-oddities/
>
> Best,
> Audrey
>
> --
> Audrey Lorberfeld
> Data Scientist, w3 Search
> IBM
> [hidden email]
>
>
> On 10/15/19, 5:50 AM, "Shubham Goswami" <[hidden email]>
> wrote:
>
>     Hi kshitij
>
>     Thanks for the reply!
>     I tried to debug it and found that raw query(black company) has parsed
> as
>     two separate queries
>     black and company and returning the results based on black query
> instead of
>     this it should have
>     got parsed as a single phrase query like("black company") because i am
> using
>     autoGeneratedPhraseQuery.
>     Do you have any idea about this please correct me if i am wrong.
>
>     Thanks
>     Shubham
>
>     On Tue, Oct 15, 2019 at 1:58 PM kshitij tyagi <
> [hidden email]>
>     wrote:
>
>     > Hi,
>     >
>     > Try debugging your solr query and understand how it gets parsed. Try
> using
>     > "debug=true" for the same
>     >
>     > On Tue, Oct 15, 2019 at 12:58 PM Shubham Goswami <
>     > [hidden email]>
>     > wrote:
>     >
>     > > *Hi all,*
>     > >
>     > > I am a beginner to solr framework and I am trying to implement
>     > > *autoGeneratePhraseQueries* property in a fieldtype of
>     > type=text_general, i
>     > > kept the property value as true and restarted the solr server but
> still
>     > it
>     > > is not taking my two words query like(Black company) as a phrase
> without
>     > > double quotes and returning the results only for Black.
>     > >
>     > >          Can somebody please help me to understand what am i
> missing ?
>     > > Following is my Schema.xml file code and i am using solr 7.5
> version.
>     > > <fieldType name="text_general" class="solr.TextField"
>     > > positionIncrementGap="100" multiValued="true"
>     > > autoGeneratePhraseQueries="true">
>     > >     <analyzer type="index">
>     > >       <tokenizer class="solr.StandardTokenizerFactory"/>=
>     > >       <filter class="solr.StopFilterFactory" words="stopwords.txt"
>     > > ignoreCase="true"/>
>     > >       <filter class="solr.LowerCaseFilterFactory"/>
>     > >     </analyzer>
>     > >     <analyzer type="query">
>     > >       <tokenizer class="solr.StandardTokenizerFactory"/>
>     > >       <filter class="solr.StopFilterFactory" words="stopwords.txt"
>     > > ignoreCase="true"/>
>     > >       <filter class="solr.SynonymGraphFilterFactory" expand="true"
>     > > ignoreCase="true" synonyms="synonyms.txt"/>
>     > >       <filter class="solr.LowerCaseFilterFactory"/>
>     > >     </analyzer>
>     > >   </fieldType>
>     > >
>     > >
>     > > --
>     > > *Thanks & Regards*
>     > > Shubham Goswami
>     > > Enterprise Software Engineer
>     > > *HotWax Systems*
>     > > *Enterprise open source experts*
>     > > cell: +91-7803886288
>     > > office: 0731-409-3684
>     > >
> https://urldefense.proofpoint.com/v2/url?u=http-3A__www.hotwaxsystems.com&d=DwIBaQ&c=jf_iaSHvJObTbx-siA1ZOg&r=_8ViuZIeSRdQjONA8yHWPZIBlhj291HU3JpNIx5a55M&m=Zi9beGF58BzJUNUdCkeW0pwliKwq9vdTSh0V_lR0734&s=FhSkJBcmYw_bfHgq1enzuYQeOZwKHzlP9h4VwTZSL5E&e=
>     > >
>     >
>
>
>     --
>     *Thanks & Regards*
>     Shubham Goswami
>     Enterprise Software Engineer
>     *HotWax Systems*
>     *Enterprise open source experts*
>     cell: +91-7803886288
>     office: 0731-409-3684
>
> https://urldefense.proofpoint.com/v2/url?u=http-3A__www.hotwaxsystems.com&d=DwIBaQ&c=jf_iaSHvJObTbx-siA1ZOg&r=_8ViuZIeSRdQjONA8yHWPZIBlhj291HU3JpNIx5a55M&m=Zi9beGF58BzJUNUdCkeW0pwliKwq9vdTSh0V_lR0734&s=FhSkJBcmYw_bfHgq1enzuYQeOZwKHzlP9h4VwTZSL5E&e=
>
>
> --

*Regards,Rohan Kasat*
Reply | Threaded
Open this post in threaded view
|

Re: Re: Query on autoGeneratePhraseQueries

Shubham Goswami
Hi Rohan/Audrey

I have implemented the sow=false property with eDismax Query parser but
still it does not has any effect
on the query as it is still parsing as separate terms instead of phrased
one.

On Tue, Oct 15, 2019 at 8:25 PM Rohan Kasat <[hidden email]> wrote:

> Also check ,
> pf , pf2 , pf3
> ps , ps2, ps3 parameters for phrase searches.
>
> Regards,
> Rohan K
>
> On Tue, Oct 15, 2019 at 6:41 AM Audrey Lorberfeld -
> [hidden email] <[hidden email]> wrote:
>
> > I'm not sure how your config file is setup, but I know that the way we do
> > multi-token synonyms is to have the sow (split on whitespace) parameter
> set
> > to False while using the edismax parser. I'm not sure if this would work
> > with PhraseQueries , but it might be worth a try!
> >
> > In our config file we do something like this:
> >
> > <requestHandler name="/w3search_test" class="solr.SearchHandler">
> >         <lst name="defaults">
> >             <str name="defType">edismax</str>
> >             <float name="tie">1.0</float>
> >             <str name="echoParams">explicit</str>
> >             <int name="rows">100</int>
> >             <str name="df">content_en</str>
> >             <str name="wt">w3json_en</str>
> >             <str name="sow">false</str>
> >         </lst>
> >  </requestHandler>
> >
> > You can read a bit about the parameter here:
> >
> https://opensourceconnections.com/blog/2018/02/20/edismax-and-multiterm-synonyms-oddities/
> >
> > Best,
> > Audrey
> >
> > --
> > Audrey Lorberfeld
> > Data Scientist, w3 Search
> > IBM
> > [hidden email]
> >
> >
> > On 10/15/19, 5:50 AM, "Shubham Goswami" <[hidden email]>
> > wrote:
> >
> >     Hi kshitij
> >
> >     Thanks for the reply!
> >     I tried to debug it and found that raw query(black company) has
> parsed
> > as
> >     two separate queries
> >     black and company and returning the results based on black query
> > instead of
> >     this it should have
> >     got parsed as a single phrase query like("black company") because i
> am
> > using
> >     autoGeneratedPhraseQuery.
> >     Do you have any idea about this please correct me if i am wrong.
> >
> >     Thanks
> >     Shubham
> >
> >     On Tue, Oct 15, 2019 at 1:58 PM kshitij tyagi <
> > [hidden email]>
> >     wrote:
> >
> >     > Hi,
> >     >
> >     > Try debugging your solr query and understand how it gets parsed.
> Try
> > using
> >     > "debug=true" for the same
> >     >
> >     > On Tue, Oct 15, 2019 at 12:58 PM Shubham Goswami <
> >     > [hidden email]>
> >     > wrote:
> >     >
> >     > > *Hi all,*
> >     > >
> >     > > I am a beginner to solr framework and I am trying to implement
> >     > > *autoGeneratePhraseQueries* property in a fieldtype of
> >     > type=text_general, i
> >     > > kept the property value as true and restarted the solr server but
> > still
> >     > it
> >     > > is not taking my two words query like(Black company) as a phrase
> > without
> >     > > double quotes and returning the results only for Black.
> >     > >
> >     > >          Can somebody please help me to understand what am i
> > missing ?
> >     > > Following is my Schema.xml file code and i am using solr 7.5
> > version.
> >     > > <fieldType name="text_general" class="solr.TextField"
> >     > > positionIncrementGap="100" multiValued="true"
> >     > > autoGeneratePhraseQueries="true">
> >     > >     <analyzer type="index">
> >     > >       <tokenizer class="solr.StandardTokenizerFactory"/>=
> >     > >       <filter class="solr.StopFilterFactory"
> words="stopwords.txt"
> >     > > ignoreCase="true"/>
> >     > >       <filter class="solr.LowerCaseFilterFactory"/>
> >     > >     </analyzer>
> >     > >     <analyzer type="query">
> >     > >       <tokenizer class="solr.StandardTokenizerFactory"/>
> >     > >       <filter class="solr.StopFilterFactory"
> words="stopwords.txt"
> >     > > ignoreCase="true"/>
> >     > >       <filter class="solr.SynonymGraphFilterFactory"
> expand="true"
> >     > > ignoreCase="true" synonyms="synonyms.txt"/>
> >     > >       <filter class="solr.LowerCaseFilterFactory"/>
> >     > >     </analyzer>
> >     > >   </fieldType>
> >     > >
> >     > >
> >     > > --
> >     > > *Thanks & Regards*
> >     > > Shubham Goswami
> >     > > Enterprise Software Engineer
> >     > > *HotWax Systems*
> >     > > *Enterprise open source experts*
> >     > > cell: +91-7803886288
> >     > > office: 0731-409-3684
> >     > >
> >
> https://urldefense.proofpoint.com/v2/url?u=http-3A__www.hotwaxsystems.com&d=DwIBaQ&c=jf_iaSHvJObTbx-siA1ZOg&r=_8ViuZIeSRdQjONA8yHWPZIBlhj291HU3JpNIx5a55M&m=Zi9beGF58BzJUNUdCkeW0pwliKwq9vdTSh0V_lR0734&s=FhSkJBcmYw_bfHgq1enzuYQeOZwKHzlP9h4VwTZSL5E&e=
> >     > >
> >     >
> >
> >
> >     --
> >     *Thanks & Regards*
> >     Shubham Goswami
> >     Enterprise Software Engineer
> >     *HotWax Systems*
> >     *Enterprise open source experts*
> >     cell: +91-7803886288
> >     office: 0731-409-3684
> >
> >
> https://urldefense.proofpoint.com/v2/url?u=http-3A__www.hotwaxsystems.com&d=DwIBaQ&c=jf_iaSHvJObTbx-siA1ZOg&r=_8ViuZIeSRdQjONA8yHWPZIBlhj291HU3JpNIx5a55M&m=Zi9beGF58BzJUNUdCkeW0pwliKwq9vdTSh0V_lR0734&s=FhSkJBcmYw_bfHgq1enzuYQeOZwKHzlP9h4VwTZSL5E&e=
> >
> >
> > --
>
> *Regards,Rohan Kasat*
>


--
*Thanks & Regards*
Shubham Goswami
Enterprise Software Engineer
*HotWax Systems*
*Enterprise open source experts*
cell: +91-7803886288
office: 0731-409-3684
http://www.hotwaxsystems.com
Reply | Threaded
Open this post in threaded view
|

Re: Query on autoGeneratePhraseQueries

Shawn Heisey-2
On 10/16/2019 7:14 AM, Shubham Goswami wrote:
> I have implemented the sow=false property with eDismax Query parser but
> still it does not has any effect
> on the query as it is still parsing as separate terms instead of phrased
> one.

We have seen reports that when sow=false, which is the default setting
since Solr 7.0, autoGeneratePhraseQueries does not work.  Try setting
sow=true and see whether you get the results you expect.

I do not know whether this behavior is a bug or if it is expected.

Thanks,
Shawn
Reply | Threaded
Open this post in threaded view
|

Re: Query on autoGeneratePhraseQueries

Michael Gibney
Going to back to the initial question, the wording is a little ambiguous
and it occurs to me that it's possible there's a misunderstanding of what
autoGeneratePhraseQueries does. It really only auto-generates phrase
*subqueries*. To use the example from the initial request, a query like
(black company) would always generate a non-phrase query (respecting mm,
q.op, etc. -- but in any case not a top-level phrase query), regardless of
the setting of autoGeneratePhraseQueries.

autoGeneratePhraseQueries (when set to true) only kicks in (in different
ways depending on analysis chain, and setting of "sow") for a query like
(the black-company manufactures), which would be transformed to something
more like (the "black company" manufactures). The idea is that there's some
extra indication that the two words should be bundled together for purposes
of querying.

If you want to auto-generate a top-level phrase query, some other approach
would be called for.

Apologies if this is obvious and/or not helpful, Shubham!

On Wed, Oct 16, 2019 at 10:10 AM Shawn Heisey <[hidden email]> wrote:

> On 10/16/2019 7:14 AM, Shubham Goswami wrote:
> > I have implemented the sow=false property with eDismax Query parser but
> > still it does not has any effect
> > on the query as it is still parsing as separate terms instead of phrased
> > one.
>
> We have seen reports that when sow=false, which is the default setting
> since Solr 7.0, autoGeneratePhraseQueries does not work.  Try setting
> sow=true and see whether you get the results you expect.
>
> I do not know whether this behavior is a bug or if it is expected.
>
> Thanks,
> Shawn
>
Reply | Threaded
Open this post in threaded view
|

Re: Query on autoGeneratePhraseQueries

Shubham Goswami
Hi Michael/Shawn

Thanks for the response.
Michael you are right, autoGeneratePhraseQueries works for the query like
Black-company
with the setting of Sow=true.
Thanks for your great support.

Best
Shubham

On Wed, Oct 16, 2019 at 9:22 PM Michael Gibney <[hidden email]>
wrote:

> Going to back to the initial question, the wording is a little ambiguous
> and it occurs to me that it's possible there's a misunderstanding of what
> autoGeneratePhraseQueries does. It really only auto-generates phrase
> *subqueries*. To use the example from the initial request, a query like
> (black company) would always generate a non-phrase query (respecting mm,
> q.op, etc. -- but in any case not a top-level phrase query), regardless of
> the setting of autoGeneratePhraseQueries.
>
> autoGeneratePhraseQueries (when set to true) only kicks in (in different
> ways depending on analysis chain, and setting of "sow") for a query like
> (the black-company manufactures), which would be transformed to something
> more like (the "black company" manufactures). The idea is that there's some
> extra indication that the two words should be bundled together for purposes
> of querying.
>
> If you want to auto-generate a top-level phrase query, some other approach
> would be called for.
>
> Apologies if this is obvious and/or not helpful, Shubham!
>
> On Wed, Oct 16, 2019 at 10:10 AM Shawn Heisey <[hidden email]> wrote:
>
> > On 10/16/2019 7:14 AM, Shubham Goswami wrote:
> > > I have implemented the sow=false property with eDismax Query parser but
> > > still it does not has any effect
> > > on the query as it is still parsing as separate terms instead of
> phrased
> > > one.
> >
> > We have seen reports that when sow=false, which is the default setting
> > since Solr 7.0, autoGeneratePhraseQueries does not work.  Try setting
> > sow=true and see whether you get the results you expect.
> >
> > I do not know whether this behavior is a bug or if it is expected.
> >
> > Thanks,
> > Shawn
> >
>


--
*Thanks & Regards*
Shubham Goswami
Enterprise Software Engineer
*HotWax Systems*
*Enterprise open source experts*
cell: +91-7803886288
office: 0731-409-3684
http://www.hotwaxsystems.com