# not\_analyzed String search

**URL:** <https://discuss.elastic.co/t/not-analyzed-string-search/21758>\
**Category:** Elasticsearch\
**Created:** [January 21, 2015, 6:34pm UTC](https://discuss.elastic.co/t/not-analyzed-string-search/21758 "2015-01-21T18:34:24Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Messias](https://avatars.discourse-cdn.com/v4/letter/m/9de053/32.png) [@Messias](https://discuss.elastic.co/u/Messias)\
**Post date:** [January 21, 2015, 6:34pm UTC](https://discuss.elastic.co/t/not-analyzed-string-search/21758/1 "2015-01-21T18:34:24Z")

</div>

Hi,

I have the following issue when I search on a not\_analyzed String.

Mapping:  
filename: {  
type: "string",  
index: "not\_analyzed"  
}

field: "filename"  
value: "Stream\_Flash\_Video\_129518.log"

query\_string: filename:_lash_ -- get results  
query\_string: filename:_Flash_ -- get no results  
query\_string: filename:_flash_ -- get no results  
query\_string: filename:_129518_ -- get results

Why does filename:_Flash_ get no results?  
I dont understand the the logic that ES use. If I have a string with this  
value.  
And i use a regex ._Flush._ (what is sthe same as _Flush_) then it will  
match.

How is it possible to search this value with a query\_string?

On an analyzed filed it works.  
Best regards  
Messias

--  
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+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/f434f7da-2328-43bc-b113-06be660fd489%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/f434f7da-2328-43bc-b113-06be660fd489%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![johtani](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/johtani/32/44956_2.png) [@johtani](https://discuss.elastic.co/u/johtani)\
**Post date:** [January 22, 2015, 3:07am UTC](https://discuss.elastic.co/t/not-analyzed-string-search/21758/2 "2015-01-22T03:07:57Z")

</div>

Hi Messias,

You should set “lowercase\_expanded\_terms” param to false.  
Default it true.  
See : [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/query-dsl-query-string-query.html#query-dsl-query-string-query)

“query\_string” query is changed automatically query-terms to lower-case in some cases.  
i.e. wildcard, prefix, fuzzy…

* * *

Jun Ohtani  
[johtani@gmail.com](mailto:johtani@gmail.com)  
blog : [http://blog.johtani.info](http://blog.johtani.info)  
twitter : [http://twitter.com/johtani](http://twitter.com/johtani)

> 2015/01/22 3:34、Messias [schubert.torsten82@gmail.com](mailto:schubert.torsten82@gmail.com) のメール：
> 
> Hi,
> 
> I have the following issue when I search on a not\_analyzed String.
> 
> Mapping:  
> filename: {  
> type: "string",  
> index: "not\_analyzed"  
> }
> 
> field: "filename"  
> value: "Stream\_Flash\_Video\_129518.log"
> 
> query\_string: filename:_lash_ -- get results  
> query\_string: filename:_Flash_ -- get no results  
> query\_string: filename:_flash_ -- get no results  
> query\_string: filename:_129518_ -- get results
> 
> Why does filename:_Flash_ get no results?  
> I dont understand the the logic that ES use. If I have a string with this value.  
> And i use a regex ._Flush._ (what is sthe same as _Flush_) then it will match.
> 
> How is it possible to search this value with a query\_string?
> 
> On an analyzed filed it works.  
> Best regards  
> Messias
> 
> --  
> 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+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/f434f7da-2328-43bc-b113-06be660fd489%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/f434f7da-2328-43bc-b113-06be660fd489%40googlegroups.com).  
> For more options, visit [https://groups.google.com/d/optout](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+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/B70A9D24-2180-4F18-B6C5-2F8653B4BB68%40gmail.com](https://groups.google.com/d/msgid/elasticsearch/B70A9D24-2180-4F18-B6C5-2F8653B4BB68%40gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 12:37am UTC](https://discuss.elastic.co/t/not-analyzed-string-search/21758/3 "2017-07-06T00:37:22Z")

</div>


