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 geeky2 <ge...@hotmail.com> on 2013/04/29 17:40:28 UTC

why does "*" affect case sensitivity of query results

hello,

environment: solr 3.5


problem statement: when query has "*" appended, it turns case sensitive.

assumption: query should NOT be case sensitive

actual value in database at time of index: 4387828BULK

here is a snapshot of what works and does not work.

what works:

  itemModelNoExactMatchStr:4387828bULk (and any variation of upper and lower
case letters for *bulk*)

  itemModelNoExactMatchStr:4387828bu*
  itemModelNoExactMatchStr:4387828bul*
  itemModelNoExactMatchStr:4387828bulk*


what does NOT work:

 itemModelNoExactMatchStr:4387828BU*
 itemModelNoExactMatchStr:4387828BUL*
 itemModelNoExactMatchStr:4387828BULK*


below are the specifics of my field and fieldType

  <field name="itemModelNoExactMatchStr" type="text_exact" indexed="true"
stored="true"/>


    <fieldType name="text_exact" class="solr.TextField"
positionIncrementGap="100">
      <analyzer type="index">
        <tokenizer class="solr.KeywordTokenizerFactory"/>
        <filter class="solr.LowerCaseFilterFactory"/>
        <filter class="solr.TrimFilterFactory"/>
      </analyzer>
      <analyzer type="query">
        <tokenizer class="solr.KeywordTokenizerFactory"/>
        <filter class="solr.LowerCaseFilterFactory"/>
      </analyzer>
    </fieldType>

thx
mark





--
View this message in context: http://lucene.472066.n3.nabble.com/why-does-affect-case-sensitivity-of-query-results-tp4059801.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: why does "*" affect case sensitivity of query results

Posted by Alexandre Rafalovitch <ar...@gmail.com>.
http://wiki.apache.org/solr/MultitermQueryAnalysis

Sorry, not for your version of Solr.

Regards,
   Alex.
Personal blog: http://blog.outerthoughts.com/
LinkedIn: http://www.linkedin.com/in/alexandrerafalovitch
- Time is the quality of nature that keeps events from happening all
at once. Lately, it doesn't seem to be working.  (Anonymous  - via GTD
book)


On Mon, Apr 29, 2013 at 11:40 AM, geeky2 <ge...@hotmail.com> wrote:
> hello,
>
> environment: solr 3.5
>
>
> problem statement: when query has "*" appended, it turns case sensitive.
>
> assumption: query should NOT be case sensitive
>
> actual value in database at time of index: 4387828BULK
>
> here is a snapshot of what works and does not work.
>
> what works:
>
>   itemModelNoExactMatchStr:4387828bULk (and any variation of upper and lower
> case letters for *bulk*)
>
>   itemModelNoExactMatchStr:4387828bu*
>   itemModelNoExactMatchStr:4387828bul*
>   itemModelNoExactMatchStr:4387828bulk*
>
>
> what does NOT work:
>
>  itemModelNoExactMatchStr:4387828BU*
>  itemModelNoExactMatchStr:4387828BUL*
>  itemModelNoExactMatchStr:4387828BULK*
>
>
> below are the specifics of my field and fieldType
>
>   <field name="itemModelNoExactMatchStr" type="text_exact" indexed="true"
> stored="true"/>
>
>
>     <fieldType name="text_exact" class="solr.TextField"
> positionIncrementGap="100">
>       <analyzer type="index">
>         <tokenizer class="solr.KeywordTokenizerFactory"/>
>         <filter class="solr.LowerCaseFilterFactory"/>
>         <filter class="solr.TrimFilterFactory"/>
>       </analyzer>
>       <analyzer type="query">
>         <tokenizer class="solr.KeywordTokenizerFactory"/>
>         <filter class="solr.LowerCaseFilterFactory"/>
>       </analyzer>
>     </fieldType>
>
> thx
> mark
>
>
>
>
>
> --
> View this message in context: http://lucene.472066.n3.nabble.com/why-does-affect-case-sensitivity-of-query-results-tp4059801.html
> Sent from the Solr - User mailing list archive at Nabble.com.

Re: why does "*" affect case sensitivity of query results

Posted by geeky2 <ge...@hotmail.com>.
hello erik,

thank you for the info - yes - i did notice ;)

one more reason for us to upgrade from 3.5.

thx
mark




--
View this message in context: http://lucene.472066.n3.nabble.com/why-does-affect-case-sensitivity-of-query-results-tp4059801p4060000.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: why does "*" affect case sensitivity of query results

Posted by Erick Erickson <er...@gmail.com>.
Actually, look at the referenced JIRA
https://issues.apache.org/jira/browse/SOLR-2438 and you'll see it's
changed in 3.6.

Best
Erick

On Mon, Apr 29, 2013 at 9:36 AM, geeky2 <ge...@hotmail.com> wrote:
> here is the jira link:
>
> https://issues.apache.org/jira/browse/SOLR-219
>
>
>
>
>
> --
> View this message in context: http://lucene.472066.n3.nabble.com/why-does-affect-case-sensitivity-of-query-results-tp4059801p4059814.html
> Sent from the Solr - User mailing list archive at Nabble.com.

Re: why does "*" affect case sensitivity of query results

Posted by geeky2 <ge...@hotmail.com>.
here is the jira link:

https://issues.apache.org/jira/browse/SOLR-219





--
View this message in context: http://lucene.472066.n3.nabble.com/why-does-affect-case-sensitivity-of-query-results-tp4059801p4059814.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: why does "*" affect case sensitivity of query results

Posted by geeky2 <ge...@hotmail.com>.
was looking in Smiley's book on page 129 and 130.

from the book,

>>
No text analysis is performed on the search word containing the wildcard,
not even lowercasing. So if you want to find a word starting with Sma, then
sma* is required instead of Sma*, assuming the index side of the field's
type
includes lowercasing. This shortcoming is tracked on SOLR-219. Moreover,
if the field that you want to use the wildcard query on is stemmed in the
analysis, then smashing* would not find the original text Smashing because
the stemming process transforms this to smash. Consequently, don't stem.
<<

thx
mark




--
View this message in context: http://lucene.472066.n3.nabble.com/why-does-affect-case-sensitivity-of-query-results-tp4059801p4059812.html
Sent from the Solr - User mailing list archive at Nabble.com.