# Cyrillic symbols and query with prefix

**URL:** <https://discuss.elastic.co/t/cyrillic-symbols-and-query-with-prefix/54332>\
**Category:** Elasticsearch\
**Created:** [June 29, 2016, 8:48pm UTC](https://discuss.elastic.co/t/cyrillic-symbols-and-query-with-prefix/54332 "2016-06-29T20:48:29Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![klimvv](https://avatars.discourse-cdn.com/v4/letter/k/74df32/32.png) [@klimvv](https://discuss.elastic.co/u/klimvv)\
**Post date:** [June 29, 2016, 8:48pm UTC](https://discuss.elastic.co/t/cyrillic-symbols-and-query-with-prefix/54332/1 "2016-06-29T20:48:29Z")

</div>

Hello! Help me, please, to solve such problem. I use this query

> res = es.search(index='sinki', doc\_type='dwg', body={"query":  
> {  
> "bool": {  
> "must": [  
> {  
> "match": {"dwgobj": "комплекс оборудования"}  
> },  
> {  
> "prefix": {"dwgnum": "154244"}  
> }  
> ]  
> }  
> }  
> })

and it works correctly while prefix contains digits and eng symbols, but it doesn't work if there is cyrillic symbols (ex: "Д154244")  
In mappings I set  
\> "dwgnum": {"type": "string", "index": "not\_analyzed"}

Can you help me?

---

<div class="post-metadata">

**Author:** ![jpountz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jpountz/32/45836_2.png) [@jpountz](https://discuss.elastic.co/u/jpountz)\
**Post date:** [July 4, 2016, 9:08am UTC](https://discuss.elastic.co/t/cyrillic-symbols-and-query-with-prefix/54332/2 "2016-07-04T09:08:58Z")

</div>

I think the issue here is not as much about cyrillic characters as it is about lowercasing? Prefix queries (and multi-term queries in general) expect you to search for terms the way they are encoded in the index. Since the default analysis chain performs lowercasing, you should rather be searching for "д154244" (the first character is u0414, not u0434 as in your example).

Note that we are working on making it a bit less trappy by automatically normalizing text when generating prefix/wildcard/fuzzy queries so that elasticsearch would have done the lowercasing itself in that case: [https://issues.apache.org/jira/browse/LUCENE-7355](https://issues.apache.org/jira/browse/LUCENE-7355).

---

<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 5, 2017, 10:38pm UTC](https://discuss.elastic.co/t/cyrillic-symbols-and-query-with-prefix/54332/3 "2017-07-05T22:38:33Z")

</div>


