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 "Krishnan, Deepti (NIH/OD) [C]" <de...@nih.gov> on 2018/07/20 14:33:16 UTC

Exact Phrase search not returning results.

Hi,

We are working on a .net application using Solr. When we initially launched the site we were using the 5.5.3 version and last sprint we updated it to the 7.3.1 version. Everything is working fine ass expected expect for one feature.

The exact phrase search does not return any value for some search criteria, and this used to work fine with the older version. Based on our research, those search terms with stop words and more than one word following it is not working.

The field has been defined as a text_general type in the schema and below are the tokenizers and filters used during indexing and querying.

[cid:image001.jpg@01D42015.107F3080]

Eg.


  *   "PROMOTING SCHOOL READINESS AMONG LOW-INCOME FAMILIES" - This works. No stop wods
  *   "national institutes of health" - This works as well. Notice that there is a stop word (of) but only one word following it
  *   "Structure of choroid plexus" - Does not work. Notice there are more than 2 words following the stop word(of)
  *   "Health and Human Services" - This doesn't work but "Health and Human" works.

Please let me know if there is something I am missing and if something is unclear or you need to reach out to me to discuss further.

Thanks,
Deepti


Re: Exact Phrase search not returning results.

Posted by Tim Casey <tc...@gmail.com>.
Deepti,

I am going to guess the analyzer part of the .net application is cutting
off the last token.
If you try the queries on the console of the running solr cluster, what do
you get?  If you dump that specific field for all the docs, can you find it
with grep?

tim


On Fri, Jul 20, 2018 at 10:56 AM Krishnan, Deepti (NIH/OD) [C] <
deepti.krishnan@nih.gov> wrote:

> Hi,
>
>
>
> We are working on a .net application using Solr. When we initially
> launched the site we were using the 5.5.3 version and last sprint we
> updated it to the 7.3.1 version. Everything is working fine ass expected
> expect for one feature.
>
>
>
> The exact phrase search does not return any value for some search
> criteria, and this used to work fine with the older version. Based on our
> research, those search terms with stop words and more than one word
> following it is not working.
>
>
>
> The field has been defined as a text_general type in the schema and below
> are the tokenizers and filters used during indexing and querying.
>
>
>
>
>
> Eg.
>
>
>
>    - “PROMOTING SCHOOL READINESS AMONG LOW-INCOME FAMILIES” – This works.
>    No stop wods
>    - “national institutes of health” – This works as well. Notice that
>    there is a stop word (of) but only one word following it
>    - “Structure of choroid plexus” – Does not work. Notice there are more
>    than 2 words following the stop word(of)
>    - "Health and Human Services" – This doesn’t work but “Health and
>    Human” works.
>
>
>
> Please let me know if there is something I am missing and if something is
> unclear or you need to reach out to me to discuss further.
>
>
>
> Thanks,
>
> Deepti
>
>

Re: Exact Phrase search not returning results.

Posted by Shawn Heisey <ap...@elyograg.org>.
On 7/20/2018 8:33 AM, Krishnan, Deepti (NIH/OD) [C] wrote:
>
> We are working on a .net application using Solr. When we initially
> launched the site we were using the 5.5.3 version and last sprint we
> updated it to the 7.3.1 version. Everything is working fine ass
> expected expect for one feature.
>
>  
>
> The exact phrase search does not return any value for some search
> criteria, and this used to work fine with the older version. Based on
> our research, those search terms with stop words and more than one
> word following it is not working.
>
>  
>
> The field has been defined as a text_general type in the schema and
> below are the tokenizers and filters used during indexing and querying.
>

Your image did not make it to the list.  Can't see it.

To test a theory, try adding a sow parameter set to true to the
request.  I have no idea how to do this in a .net application, but if it
were a URL in a browser, you would add "&sow=true" (without the quotes)
to the URL.

If that works, I am not sure whether it's a bug or not, but you'll have
a workaround.  The sow parameter was added in one of the 6.x releases
with the default value set to true.  In 7.0, the default value was
changed to false.  The parameter is shorthand for "split on whitespace".

When sow=false, phrase queries do not appear to work correctly.

https://lucene.apache.org/solr/guide/7_4/the-standard-query-parser.html#standard-query-parser-parameters

Thanks,
Shawn


Re: Exact Phrase search not returning results.

Posted by Steve Rowe <sa...@gmail.com>.
Hi Deepti,

Your schema snippet didn’t make it to the list.  Please repost as inline text rather than an image.

--
Steve
www.lucidworks.com

> On Jul 20, 2018, at 10:33 AM, Krishnan, Deepti (NIH/OD) [C] <de...@nih.gov> wrote:
> 
> Hi,
>  
> We are working on a .net application using Solr. When we initially launched the site we were using the 5.5.3 version and last sprint we updated it to the 7.3.1 version. Everything is working fine ass expected expect for one feature.
>  
> The exact phrase search does not return any value for some search criteria, and this used to work fine with the older version. Based on our research, those search terms with stop words and more than one word following it is not working.
>  
> The field has been defined as a text_general type in the schema and below are the tokenizers and filters used during indexing and querying.
>  
> 
>  
> Eg. 
>  
> 	• “PROMOTING SCHOOL READINESS AMONG LOW-INCOME FAMILIES” – This works. No stop wods 
> 	• “national institutes of health” – This works as well. Notice that there is a stop word (of) but only one word following it
> 	• “Structure of choroid plexus” – Does not work. Notice there are more than 2 words following the stop word(of)
> 	• "Health and Human Services" – This doesn’t work but “Health and Human” works.
>  
> Please let me know if there is something I am missing and if something is unclear or you need to reach out to me to discuss further.
>  
> Thanks,
> Deepti