Solr uppercase inside phrase query

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

Solr uppercase inside phrase query

Chien Nguyen
Hi, everyone!
I'm getting trouble with query data from solr. When i query with key "iPhone Se" it shows results, key "iPhone se" same, but i query "iphone se", there is no result. I used LowerCaseFilterFactory in both index and query analyzer . What's wrong with my schema? please let me see. Thank so much!
Here my schema with field search:

<fieldType name="text_general" class="solr.TextField" positionIncrementGap="100">
      <analyzer type="index">
        <tokenizer class="solr.StandardTokenizerFactory"/>
       
               
        <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt"/>
        <filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="1" catenateNumbers="1" catenateAll="0" splitOnCaseChange="1"/>
       
        <filter class="solr.LowerCaseFilterFactory"/>
        <filter class="solr.KeywordMarkerFilterFactory" protected="protwords.txt"/>
        <filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
        <filter class="solr.ICUFoldingFilterFactory"/>
     </analyzer>
     <analyzer type="query">
        <tokenizer class="solr.StandardTokenizerFactory"/>
       

        <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt"/>
        <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="true"/>
        <filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1 catenateWords="0" catenateNumbers="0" catenateAll="0" splitOnCaseChange="1"/>

        <filter class="solr.LowerCaseFilterFactory"/>
        <filter class="solr.ICUFoldingFilterFactory"/>
        <filter class="solr.KeywordMarkerFilterFactory" protected="protwords.txt"/>
        <filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
      </analyzer>
    </fieldType>
Reply | Threaded
Open this post in threaded view
|

Re: Solr uppercase inside phrase query

Susheel Kumar-3
Make generateWordParts to 0 and see your self in the Analysis tab the
results...

On Fri, May 26, 2017 at 3:19 AM, Chien Nguyen <[hidden email]> wrote:

> Hi, everyone!
> I'm getting trouble with query data from solr. When i query with key
> "iPhone
> Se" it shows results, key "iPhone se" same, but i query "iphone se", there
> is no result. I used LowerCaseFilterFactory in both index and query
> analyzer
> . What's wrong with my schema? please let me see. Thank so much!
> Here my schema with field search:
>
> <fieldType name="text_general" class="solr.TextField"
> positionIncrementGap="100">
>       <analyzer type="index">
>         <tokenizer class="solr.StandardTokenizerFactory"/>
>
>
>         <filter class="solr.StopFilterFactory" ignoreCase="true"
> words="stopwords.txt"/>
>         <filter class="solr.WordDelimiterFilterFactory"
> generateWordParts="1"
> generateNumberParts="1" catenateWords="1" catenateNumbers="1"
> catenateAll="0" splitOnCaseChange="1"/>
>
>         <filter class="solr.LowerCaseFilterFactory"/>
>         <filter class="solr.KeywordMarkerFilterFactory"
> protected="protwords.txt"/>
>         <filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
>         <filter class="solr.ICUFoldingFilterFactory"/>
>      </analyzer>
>      <analyzer type="query">
>         <tokenizer class="solr.StandardTokenizerFactory"/>
>
>
>         <filter class="solr.StopFilterFactory" ignoreCase="true"
> words="stopwords.txt"/>
>         <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt"
> ignoreCase="true" expand="true"/>
>         <filter class="solr.WordDelimiterFilterFactory"
> generateWordParts="1"
> generateNumberParts="1 catenateWords="0" catenateNumbers="0"
> catenateAll="0"
> splitOnCaseChange="1"/>
>
>         <filter class="solr.LowerCaseFilterFactory"/>
>         <filter class="solr.ICUFoldingFilterFactory"/>
>         <filter class="solr.KeywordMarkerFilterFactory"
> protected="protwords.txt"/>
>         <filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
>       </analyzer>
>     </fieldType>
>
>
>
> --
> View this message in context: http://lucene.472066.n3.
> nabble.com/Solr-uppercase-inside-phrase-query-tp4337403.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>
Reply | Threaded
Open this post in threaded view
|

Re: Solr uppercase inside phrase query

Susheel Kumar-3
I mean splitOnCaseChange.

On Fri, May 26, 2017 at 9:26 AM, Susheel Kumar <[hidden email]>
wrote:

> Make generateWordParts to 0 and see your self in the Analysis tab the
> results...
>
> On Fri, May 26, 2017 at 3:19 AM, Chien Nguyen <[hidden email]>
> wrote:
>
>> Hi, everyone!
>> I'm getting trouble with query data from solr. When i query with key
>> "iPhone
>> Se" it shows results, key "iPhone se" same, but i query "iphone se", there
>> is no result. I used LowerCaseFilterFactory in both index and query
>> analyzer
>> . What's wrong with my schema? please let me see. Thank so much!
>> Here my schema with field search:
>>
>> <fieldType name="text_general" class="solr.TextField"
>> positionIncrementGap="100">
>>       <analyzer type="index">
>>         <tokenizer class="solr.StandardTokenizerFactory"/>
>>
>>
>>         <filter class="solr.StopFilterFactory" ignoreCase="true"
>> words="stopwords.txt"/>
>>         <filter class="solr.WordDelimiterFilterFactory"
>> generateWordParts="1"
>> generateNumberParts="1" catenateWords="1" catenateNumbers="1"
>> catenateAll="0" splitOnCaseChange="1"/>
>>
>>         <filter class="solr.LowerCaseFilterFactory"/>
>>         <filter class="solr.KeywordMarkerFilterFactory"
>> protected="protwords.txt"/>
>>         <filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
>>         <filter class="solr.ICUFoldingFilterFactory"/>
>>      </analyzer>
>>      <analyzer type="query">
>>         <tokenizer class="solr.StandardTokenizerFactory"/>
>>
>>
>>         <filter class="solr.StopFilterFactory" ignoreCase="true"
>> words="stopwords.txt"/>
>>         <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt"
>> ignoreCase="true" expand="true"/>
>>         <filter class="solr.WordDelimiterFilterFactory"
>> generateWordParts="1"
>> generateNumberParts="1 catenateWords="0" catenateNumbers="0"
>> catenateAll="0"
>> splitOnCaseChange="1"/>
>>
>>         <filter class="solr.LowerCaseFilterFactory"/>
>>         <filter class="solr.ICUFoldingFilterFactory"/>
>>         <filter class="solr.KeywordMarkerFilterFactory"
>> protected="protwords.txt"/>
>>         <filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
>>       </analyzer>
>>     </fieldType>
>>
>>
>>
>> --
>> View this message in context: http://lucene.472066.n3.nabble
>> .com/Solr-uppercase-inside-phrase-query-tp4337403.html
>> Sent from the Solr - User mailing list archive at Nabble.com.
>>
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Solr uppercase inside phrase query

Erick Erickson
WordDelimiterFilterFactory is probably your issue, but it _should_ be
working in the exact example you gave. Did you by chance
change _anything_ without re-indexing? Susheel's comment about
looking at the analysis page is an excellent one.

Also add &debug=query and insure that you're searching against the
field you think you are think you are.

Best,
Erick

On Fri, May 26, 2017 at 6:26 AM, Susheel Kumar <[hidden email]> wrote:

> I mean splitOnCaseChange.
>
> On Fri, May 26, 2017 at 9:26 AM, Susheel Kumar <[hidden email]>
> wrote:
>
>> Make generateWordParts to 0 and see your self in the Analysis tab the
>> results...
>>
>> On Fri, May 26, 2017 at 3:19 AM, Chien Nguyen <[hidden email]>
>> wrote:
>>
>>> Hi, everyone!
>>> I'm getting trouble with query data from solr. When i query with key
>>> "iPhone
>>> Se" it shows results, key "iPhone se" same, but i query "iphone se", there
>>> is no result. I used LowerCaseFilterFactory in both index and query
>>> analyzer
>>> . What's wrong with my schema? please let me see. Thank so much!
>>> Here my schema with field search:
>>>
>>> <fieldType name="text_general" class="solr.TextField"
>>> positionIncrementGap="100">
>>>       <analyzer type="index">
>>>         <tokenizer class="solr.StandardTokenizerFactory"/>
>>>
>>>
>>>         <filter class="solr.StopFilterFactory" ignoreCase="true"
>>> words="stopwords.txt"/>
>>>         <filter class="solr.WordDelimiterFilterFactory"
>>> generateWordParts="1"
>>> generateNumberParts="1" catenateWords="1" catenateNumbers="1"
>>> catenateAll="0" splitOnCaseChange="1"/>
>>>
>>>         <filter class="solr.LowerCaseFilterFactory"/>
>>>         <filter class="solr.KeywordMarkerFilterFactory"
>>> protected="protwords.txt"/>
>>>         <filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
>>>         <filter class="solr.ICUFoldingFilterFactory"/>
>>>      </analyzer>
>>>      <analyzer type="query">
>>>         <tokenizer class="solr.StandardTokenizerFactory"/>
>>>
>>>
>>>         <filter class="solr.StopFilterFactory" ignoreCase="true"
>>> words="stopwords.txt"/>
>>>         <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt"
>>> ignoreCase="true" expand="true"/>
>>>         <filter class="solr.WordDelimiterFilterFactory"
>>> generateWordParts="1"
>>> generateNumberParts="1 catenateWords="0" catenateNumbers="0"
>>> catenateAll="0"
>>> splitOnCaseChange="1"/>
>>>
>>>         <filter class="solr.LowerCaseFilterFactory"/>
>>>         <filter class="solr.ICUFoldingFilterFactory"/>
>>>         <filter class="solr.KeywordMarkerFilterFactory"
>>> protected="protwords.txt"/>
>>>         <filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
>>>       </analyzer>
>>>     </fieldType>
>>>
>>>
>>>
>>> --
>>> View this message in context: http://lucene.472066.n3.nabble
>>> .com/Solr-uppercase-inside-phrase-query-tp4337403.html
>>> Sent from the Solr - User mailing list archive at Nabble.com.
>>>
>>
>>
Reply | Threaded
Open this post in threaded view
|

Re: Solr uppercase inside phrase query

Chien Nguyen
In reply to this post by Susheel Kumar-3
Many thank. I will try it
Reply | Threaded
Open this post in threaded view
|

Re: Solr uppercase inside phrase query

Chien Nguyen
In reply to this post by Susheel Kumar-3
Many thank. I will try it.
Reply | Threaded
Open this post in threaded view
|

Re: Solr uppercase inside phrase query

arobinski
Did you manage to solve the problem? I have the same problem and would like
to know a solution.


Chien Nguyen wrote
> Many thank. I will try it.





--
Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html