# Is the text provided to a wildcard query analyzed?

**URL:** <https://discuss.elastic.co/t/is-the-text-provided-to-a-wildcard-query-analyzed/59851>\
**Category:** Elasticsearch\
**Created:** [September 6, 2016, 8:21am UTC](https://discuss.elastic.co/t/is-the-text-provided-to-a-wildcard-query-analyzed/59851 "2016-09-06T08:21:27Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![vchalmel](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vchalmel/32/11681_2.png) [@vchalmel](https://discuss.elastic.co/u/vchalmel)\
**Post date:** [September 6, 2016, 8:21am UTC](https://discuss.elastic.co/t/is-the-text-provided-to-a-wildcard-query-analyzed/59851/1 "2016-09-06T08:21:27Z")

</div>

I plan to use wildcard queries on analyzed text fields using asciifolding (to get rid of french accents) and lowercase.

My first tests show e.g.  
matches for `"wildcard": { "ar_titre.raw": { "value": "nomme*" } }` but no matches for `"wildcard": { "ar_titre.raw": { "value": "nommé*" } }`

Does that mean that when using wildcard (or prefix) queries, the text provided to "value" is not analyzed ? Or Is that a bug ?

---

<div class="post-metadata">

**Author:** ![tanguy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tanguy/32/6030_2.png) [@tanguy](https://discuss.elastic.co/u/tanguy)\
**Post date:** [September 6, 2016, 8:25am UTC](https://discuss.elastic.co/t/is-the-text-provided-to-a-wildcard-query-analyzed/59851/2 "2016-09-06T08:25:01Z")

</div>

Hi,

Yes, the value is not analyzed (see [Wildcard Query | Elasticsearch Guide [2.4] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/2.4/query-dsl-wildcard-query.html))

> Matches documents that have fields matching a wildcard expression (not  
> analyzed)

Also, wildcard prefix query can be slow because it needs to iterate over many terms. Maybe can you use Ngram instead? [Edge NGram Tokenizer | Elasticsearch Guide [2.4] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/2.4/analysis-edgengram-tokenizer.html#_example_5)

---

<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:22pm UTC](https://discuss.elastic.co/t/is-the-text-provided-to-a-wildcard-query-analyzed/59851/3 "2017-07-05T22:22:22Z")

</div>


