Re: Query on autoGeneratePhraseQueries
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 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 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
Re: Query on autoGeneratePhraseQueries
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 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 >
Re: Query on autoGeneratePhraseQueries
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
Re: Re: Query on autoGeneratePhraseQueries
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 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 - > audrey.lorberf...@ibm.com 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: > > > > > > > > edismax > > 1.0 > > explicit > > 100 > > content_en > > w3json_en > > false > > > > > > > > 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 > > audrey.lorberf...@ibm.com > > > > > > On 10/15/19, 5:50 AM, "Shubham Goswami" > > 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 < > > kshitij.shopcl...@gmail.com> > > 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 < > > > shubham.gosw...@hotwax.co> > > > 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. > > > > > > > positionIncrementGap="100" multiValued="true" > > > > autoGeneratePhraseQueries="true"> > > > > > > > > = > > > >words="stopwords.txt" > > > > ignoreCase="true"/> > > > > > > > > > > > > > > > > > > > >words="stopwords.txt" > > > > ignoreCase="true"/> > > > >expand="true" > > > > ignoreCase="true" synonyms="synonyms.txt"/> > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > *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=DwIBaQ=jf_iaSHvJObTbx-siA1ZOg=_8ViuZIeSRdQjONA8yHWPZIBlhj291HU3JpNIx5a55M=Zi9beGF58BzJUNUdCkeW0pwliKwq9vdTSh0V_lR0734=FhSkJBcmYw_bfHgq1enzuYQeOZwKHzlP9h4VwTZSL5E= > > > > > > > > > > > > > -- > > *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=DwIBaQ=jf_iaSHvJObTbx-siA1ZOg=_8ViuZIeSRdQjONA8yHWPZIBlhj291HU3JpNIx5a55M=Zi9beGF58BzJUNUdCkeW0pwliKwq9vdTSh0V_lR0734=FhSkJBcmYw_bfHgq1enzuYQeOZwKHzlP9h4VwTZSL5E= > > > > > > -- > > *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
Re: Re: Query on autoGeneratePhraseQueries
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 - audrey.lorberf...@ibm.com 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: > > > > edismax > 1.0 > explicit > 100 > content_en > w3json_en > false > > > > 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 > audrey.lorberf...@ibm.com > > > On 10/15/19, 5:50 AM, "Shubham Goswami" > 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 < > kshitij.shopcl...@gmail.com> > 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 < > > shubham.gosw...@hotwax.co> > > 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. > > > > > positionIncrementGap="100" multiValued="true" > > > autoGeneratePhraseQueries="true"> > > > > > > = > > >> > ignoreCase="true"/> > > > > > > > > > > > > > > >> > ignoreCase="true"/> > > >> > ignoreCase="true" synonyms="synonyms.txt"/> > > > > > > > > > > > > > > > > > > -- > > > *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=DwIBaQ=jf_iaSHvJObTbx-siA1ZOg=_8ViuZIeSRdQjONA8yHWPZIBlhj291HU3JpNIx5a55M=Zi9beGF58BzJUNUdCkeW0pwliKwq9vdTSh0V_lR0734=FhSkJBcmYw_bfHgq1enzuYQeOZwKHzlP9h4VwTZSL5E= > > > > > > > > -- > *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=DwIBaQ=jf_iaSHvJObTbx-siA1ZOg=_8ViuZIeSRdQjONA8yHWPZIBlhj291HU3JpNIx5a55M=Zi9beGF58BzJUNUdCkeW0pwliKwq9vdTSh0V_lR0734=FhSkJBcmYw_bfHgq1enzuYQeOZwKHzlP9h4VwTZSL5E= > > > -- *Regards,Rohan Kasat*
Re: Re: Query on autoGeneratePhraseQueries
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: edismax 1.0 explicit 100 content_en w3json_en false 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 audrey.lorberf...@ibm.com On 10/15/19, 5:50 AM, "Shubham Goswami" 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 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 < > shubham.gosw...@hotwax.co> > 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. > > > positionIncrementGap="100" multiValued="true" > > autoGeneratePhraseQueries="true"> > > > > = > >> ignoreCase="true"/> > > > > > > > > > >> ignoreCase="true"/> > >> ignoreCase="true" synonyms="synonyms.txt"/> > > > > > > > > > > > > -- > > *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=DwIBaQ=jf_iaSHvJObTbx-siA1ZOg=_8ViuZIeSRdQjONA8yHWPZIBlhj291HU3JpNIx5a55M=Zi9beGF58BzJUNUdCkeW0pwliKwq9vdTSh0V_lR0734=FhSkJBcmYw_bfHgq1enzuYQeOZwKHzlP9h4VwTZSL5E= > > > -- *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=DwIBaQ=jf_iaSHvJObTbx-siA1ZOg=_8ViuZIeSRdQjONA8yHWPZIBlhj291HU3JpNIx5a55M=Zi9beGF58BzJUNUdCkeW0pwliKwq9vdTSh0V_lR0734=FhSkJBcmYw_bfHgq1enzuYQeOZwKHzlP9h4VwTZSL5E=
Re: Query on autoGeneratePhraseQueries
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 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 < > shubham.gosw...@hotwax.co> > 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. > > > positionIncrementGap="100" multiValued="true" > > autoGeneratePhraseQueries="true"> > > > > = > >> ignoreCase="true"/> > > > > > > > > > >> ignoreCase="true"/> > >> ignoreCase="true" synonyms="synonyms.txt"/> > > > > > > > > > > > > -- > > *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
Re: Query on autoGeneratePhraseQueries
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 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. > positionIncrementGap="100" multiValued="true" > autoGeneratePhraseQueries="true"> > > = >ignoreCase="true"/> > > > > >ignoreCase="true"/> >ignoreCase="true" synonyms="synonyms.txt"/> > > > > > > -- > *Thanks & Regards* > Shubham Goswami > Enterprise Software Engineer > *HotWax Systems* > *Enterprise open source experts* > cell: +91-7803886288 > office: 0731-409-3684 > http://www.hotwaxsystems.com >