# Wild Card Search on Analyzed fields

**URL:** <https://discuss.elastic.co/t/wild-card-search-on-analyzed-fields/57597>\
**Category:** Elasticsearch\
**Created:** [August 9, 2016, 12:47pm UTC](https://discuss.elastic.co/t/wild-card-search-on-analyzed-fields/57597 "2016-08-09T12:47:25Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![premkumar3438](https://avatars.discourse-cdn.com/v4/letter/p/f19dbf/32.png) [@premkumar3438](https://discuss.elastic.co/u/premkumar3438)\
**Post date:** [August 9, 2016, 12:47pm UTC](https://discuss.elastic.co/t/wild-card-search-on-analyzed-fields/57597/1 "2016-08-09T12:47:25Z")

</div>

We are unable to provide wildcard based search on anlyzed fields

We want to impliment starts with and endswith functionality for the fields  
Consider the following document  
{  
"fid": 175764,  
"eval": null,  
"tval": "multi Layered mobile screen",  
"sval": null,  
"cval": null,  
"ival": "",  
"nval": "",  
"modd": "2014-01-01",  
"modu": "polaris virtusa"  
}

Here field "tval" uses statndard analyzer for indexing  
if user serches for tval = "^multi layered", above document to be return as it starts with same set of terms  
if user serches for tval = "mobile screen^", above document to be return as it ends with same set of terms

We are unable to implement above functionality on analyzed fields  
is there any way to achieve this ?

Note : using ES 2.2

---

<div class="post-metadata">

**Author:** ![mikemccand](https://avatars.discourse-cdn.com/v4/letter/m/f04885/32.png) [@mikemccand](https://discuss.elastic.co/u/mikemccand)\
**Post date:** [August 9, 2016, 3:51pm UTC](https://discuss.elastic.co/t/wild-card-search-on-analyzed-fields/57597/2 "2016-08-09T15:51:00Z")

</div>

I think you'll need to also index that field as unanalyzed if you want wildcard queries to work on the entire string.

Separately, I don't think ES accepts the ^ for begin/end anchoring.

See [https://www.elastic.co/guide/en/elasticsearch/guide/current/\_wildcard\_and\_regexp\_queries.html](https://www.elastic.co/guide/en/elasticsearch/guide/current/_wildcard_and_regexp_queries.html) for details.

---

<div class="post-metadata">

**Author:** ![premkumar3438](https://avatars.discourse-cdn.com/v4/letter/p/f19dbf/32.png) [@premkumar3438](https://discuss.elastic.co/u/premkumar3438)\
**Post date:** [August 10, 2016, 4:27am UTC](https://discuss.elastic.co/t/wild-card-search-on-analyzed-fields/57597/3 "2016-08-10T04:27:27Z")

</div>

Thank you mike  
I think not analyzed would solve my problem

---

<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:28pm UTC](https://discuss.elastic.co/t/wild-card-search-on-analyzed-fields/57597/4 "2017-07-05T22:28:56Z")

</div>


