You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-dev@lucene.apache.org by insaneyogi3008 <in...@gmail.com> on 2009/12/08 00:36:55 UTC

Inconsistent Search Results for different flavors of same search term

Hello, 

I was performing a search on different versions of the term "San Jose" on my
Solr Instance ,  the differing versions being :

san jose(all lowercase)
San jose(One uppercase) 
San Jose (Capital first letters)
SAN JOSE (ALL Caps)

each of these phrases return a different number of "hits" back as response
objects . for example

san jose returns -> <result name="response" numFound="0" start="0">
San jose returns -><result name="response" numFound="4" start="0">
San Jose returns -><result name="response" numFound="16" start="0">
SAN JOSE returns -> <result name="response" numFound="853" start="0">

How do I make my search not case sensitive?
-- 
View this message in context: http://old.nabble.com/Inconsistent-Search-Results-for-different-flavors-of-same-search-term-tp26686294p26686294.html
Sent from the Solr - Dev mailing list archive at Nabble.com.


Re: Inconsistent Search Results for different flavors of same search term

Posted by Tom Hill <so...@worldware.com>.
Look at http://wiki.apache.org/solr/AnalyzersTokenizersTokenFilters.

But before you make changes, get familiar with the analysis section of the
admin interface:

http://localhost:8983/solr/admin/analysis.jsp?highlight=on

Of course, adjust the path for your server.

This will let you see what the analyzers are doing at index and query time,
and is VERY helpful in understanding the analysis process.

Tom


On Mon, Dec 7, 2009 at 3:36 PM, insaneyogi3008 <in...@gmail.com> wrote:

>
> Hello,
>
> I was performing a search on different versions of the term "San Jose" on
> my
> Solr Instance ,  the differing versions being :
>
> san jose(all lowercase)
> San jose(One uppercase)
> San Jose (Capital first letters)
> SAN JOSE (ALL Caps)
>
> each of these phrases return a different number of "hits" back as response
> objects . for example
>
> san jose returns -> <result name="response" numFound="0" start="0">
> San jose returns -><result name="response" numFound="4" start="0">
> San Jose returns -><result name="response" numFound="16" start="0">
> SAN JOSE returns -> <result name="response" numFound="853" start="0">
>
> How do I make my search not case sensitive?
> --
> View this message in context:
> http://old.nabble.com/Inconsistent-Search-Results-for-different-flavors-of-same-search-term-tp26686294p26686294.html
> Sent from the Solr - Dev mailing list archive at Nabble.com.
>
>

Re: Inconsistent Search Results for different flavors of same search term

Posted by Erick Erickson <er...@gmail.com>.
First, this is the devloper's list, I think this question
would be better suited to the user's list.

You get searches to be case insensitive by
indexing and searching with an analyzer that, say,
lowercases. If you post on the user's list, please
include the analyzer definitions for the fields in
question *and* your query. From your email, I
can't tell if, for instance, you're even searching
against the same field for both terms. i.e. if you're
searching something like title:san jose then san
would go against the title field while jose would go
against the default search field...

If you want to be really thorough, also post the results
of your query with &debugQuery=on....

Schema browser in your SOLR admin page might
help, and Luke can be used to examin what's actually in
your index.

Best
Erick

On Mon, Dec 7, 2009 at 6:36 PM, insaneyogi3008 <in...@gmail.com> wrote:

>
> Hello,
>
> I was performing a search on different versions of the term "San Jose" on
> my
> Solr Instance ,  the differing versions being :
>
> san jose(all lowercase)
> San jose(One uppercase)
> San Jose (Capital first letters)
> SAN JOSE (ALL Caps)
>
> each of these phrases return a different number of "hits" back as response
> objects . for example
>
> san jose returns -> <result name="response" numFound="0" start="0">
> San jose returns -><result name="response" numFound="4" start="0">
> San Jose returns -><result name="response" numFound="16" start="0">
> SAN JOSE returns -> <result name="response" numFound="853" start="0">
>
> How do I make my search not case sensitive?
> --
> View this message in context:
> http://old.nabble.com/Inconsistent-Search-Results-for-different-flavors-of-same-search-term-tp26686294p26686294.html
> Sent from the Solr - Dev mailing list archive at Nabble.com.
>
>

Re: Inconsistent Search Results for different flavors of same search term

Posted by Pradeep Pujari <Pr...@rocketmail.com>.
I resolved this kind of situations by a) while indexing converted to lower case in DIH and also converting free text keywords to lowercase in the client code before sending it to Solr.

pradeep.

--- On Mon, 12/7/09, insaneyogi3008 <in...@gmail.com> wrote:

> From: insaneyogi3008 <in...@gmail.com>
> Subject: Inconsistent Search Results for different flavors of same search term
> To: solr-dev@lucene.apache.org
> Date: Monday, December 7, 2009, 3:36 PM
> 
> Hello, 
> 
> I was performing a search on different versions of the term
> "San Jose" on my
> Solr Instance ,  the differing versions being :
> 
> san jose(all lowercase)
> San jose(One uppercase) 
> San Jose (Capital first letters)
> SAN JOSE (ALL Caps)
> 
> each of these phrases return a different number of "hits"
> back as response
> objects . for example
> 
> san jose returns -> <result name="response"
> numFound="0" start="0">
> San jose returns -><result name="response"
> numFound="4" start="0">
> San Jose returns -><result name="response"
> numFound="16" start="0">
> SAN JOSE returns -> <result name="response"
> numFound="853" start="0">
> 
> How do I make my search not case sensitive?
> -- 
> View this message in context: http://old.nabble.com/Inconsistent-Search-Results-for-different-flavors-of-same-search-term-tp26686294p26686294.html
> Sent from the Solr - Dev mailing list archive at
> Nabble.com.
> 
>