Or if you want case insensitive search use a match query
<http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/query-dsl-match-query.html>
.

On Mon, Sep 15, 2014 at 11:47 AM, joergpra...@gmail.com <
joergpra...@gmail.com> wrote:

> I assume you use the standard analyzer which uses by default a token
> filter "lowercase".
>
> Just use a custom analyzer, without "lowercase" token filter, and you will
> get case-sensitive search.
>
> Jörg
>
> On Mon, Sep 15, 2014 at 5:44 PM, John Smith <java.dev....@gmail.com>
> wrote:
>
>> Using ES 1.3.2
>>
>> The current application I'm building only uses term queries for exact
>> matches.
>>
>> Example query
>>
>>   "query": {
>>     "term": {
>>       "logType": "abc"
>>     }
>>
>>
>> The field logType is pulled from external DB as all caps so for instance
>> ABC
>>
>> If i send the query
>>
>>   "query": {
>>     "term": {
>>       "logType": "ABC"
>>     }
>>
>>
>> I get no results.
>>
>> If I send the query
>>
>>   "query": {
>>     "term": {
>>       "logType": "abc"
>>     }
>>
>> I get results.
>>
>> So does this mean I need to toLower the input before building the query
>> or there's an ES way of doing this?
>>
>> Thanks
>>
>>
>>
>>
>>  --
>> You received this message because you are subscribed to the Google Groups
>> "elasticsearch" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to elasticsearch+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/elasticsearch/8fec1f56-1a59-4d17-bb01-f2ecd62bfbb4%40googlegroups.com
>> <https://groups.google.com/d/msgid/elasticsearch/8fec1f56-1a59-4d17-bb01-f2ecd62bfbb4%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "elasticsearch" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to elasticsearch+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/elasticsearch/CAKdsXoHi-483Tgf5DmwXEfKrGRye1vjvGU4jFL0o8guNsGBaCw%40mail.gmail.com
> <https://groups.google.com/d/msgid/elasticsearch/CAKdsXoHi-483Tgf5DmwXEfKrGRye1vjvGU4jFL0o8guNsGBaCw%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to elasticsearch+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/CAPmjWd3q6SNUP6gBDADV802JGSZyO0M6%2BDKP%2BBvBNRwaEr8p0A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to