lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Strokin, Eugene " <>
Subject Case Insensitive Sting
Date Tue, 04 Oct 2011 19:22:33 GMT
Hello, I know that this topic was already discussed, but I want to make sure I understood it
I need to have a field for email of a user. I should be able to find a document(s) by this
field, and it should be exact match, and case insensitive.
Based on that I've found from previous discussions, I couldn't use solr.StrField class, but
should use solr.TextField class instead.
Also, I've suspect very match that later the requirements could change and I should be able
to store not an email as identifier, but some free text, potentially with spaces, and some
other white spaces, and still should be able to do exact case insensitive match.
So I come up with such type:

    <fieldType name="string_ci" class="solr.TextField"
        sortMissingLast="true" omitNorms="true">
            <filter class="solr.LowerCaseFilterFactory" />

So, if I have a document with a field of such type, and it would contain value like this:
"ABC 123 xyz"
A "xyz" query shouldn't return the document, nor "xyz 123 ABC" query, but "abc 123 XYZ" should.
Am I correct in my assumption, or am I missing something?

Any comments are appreciated,
Thank you,
Eugene S.

View raw message