# Wildcard search on analyzed field

**URL:** <https://discuss.elastic.co/t/wildcard-search-on-analyzed-field/12101>\
**Category:** Elasticsearch\
**Created:** [May 23, 2013, 6:06pm UTC](https://discuss.elastic.co/t/wildcard-search-on-analyzed-field/12101 "2013-05-23T18:06:22Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ankit\_Jain](https://avatars.discourse-cdn.com/v4/letter/a/96bed5/32.png) [@Ankit\_Jain](https://discuss.elastic.co/u/Ankit_Jain)\
**Post date:** [May 23, 2013, 6:06pm UTC](https://discuss.elastic.co/t/wildcard-search-on-analyzed-field/12101/1 "2013-05-23T18:06:22Z")

</div>

Hi All,

We would like to enable wildcard search on analyzed field.

As per my level of understanding, if analyzed is true, then wildcard search  
would not work.

Please suggest some ways to achieve above usecase.

Thanks,  
Ankit Jain  
iLabs

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Chris\_Kinsalb](https://avatars.discourse-cdn.com/v4/letter/c/e99b99/32.png) [@Chris\_Kinsalb](https://discuss.elastic.co/u/Chris_Kinsalb)\
**Post date:** [May 24, 2013, 6:47am UTC](https://discuss.elastic.co/t/wildcard-search-on-analyzed-field/12101/2 "2013-05-24T06:47:03Z")

</div>

Hi Ankit,

you could use the query\_string query, which allows leading wildcard  
searches within analyzed fields.

However, if you would like to use wildcards anywhere, you would probably  
have to change over the concerned field to a multi\_field, and store both an  
analyzed as well as a not\_analyzed version of the data (If I am not  
mistaken - I am still fairly new to this).  
You would then be able to issue a wildcard query, for instance, on the  
not\_analyzed version of the data:

> **[Elasticsearch Platform — Find real-time answers at scale](https://www.elastic.co)**
>
> Power insights and outcomes with the Elasticsearch Platform and AI. See into your data and find answers that matter with enterprise solutions designed to help you build, observe, and protect. Try Elasticsearch free today.

- chris

On Thursday, May 23, 2013 8:06:22 PM UTC+2, Ankit Jain wrote:

> Hi All,
> 
> We would like to enable wildcard search on analyzed field.
> 
> As per my level of understanding, if analyzed is true, then wildcard  
> search would not work.
> 
> Please suggest some ways to achieve above usecase.
> 
> Thanks,  
> Ankit Jain  
> iLabs

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![simonw\_2](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/simonw_2/32/1130_2.png) [@simonw\_2](https://discuss.elastic.co/u/simonw_2)\
**Post date:** [May 24, 2013, 8:27am UTC](https://discuss.elastic.co/t/wildcard-search-on-analyzed-field/12101/3 "2013-05-24T08:27:22Z")

</div>

to add to this, you can run wildcard queries on any field that is indexed  
not just analyzed fields.

simon

On Friday, May 24, 2013 8:47:03 AM UTC+2, Chris Kinsalb wrote:

> Hi Ankit,
> 
> you could use the query\_string query, which allows leading wildcard  
> searches within analyzed fields.
> 
> However, if you would like to use wildcards anywhere, you would probably  
> have to change over the concerned field to a multi\_field, and store both an  
> analyzed as well as a not\_analyzed version of the data (If I am not  
> mistaken - I am still fairly new to this).  
> You would then be able to issue a wildcard query, for instance, on the  
> not\_analyzed version of the data:  
> [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/reference/query-dsl/wildcard-query/)
> 
> - chris
> 
> On Thursday, May 23, 2013 8:06:22 PM UTC+2, Ankit Jain wrote:
> 
> > Hi All,
> > 
> > We would like to enable wildcard search on analyzed field.
> > 
> > As per my level of understanding, if analyzed is true, then wildcard  
> > search would not work.
> > 
> > Please suggest some ways to achieve above usecase.
> > 
> > Thanks,  
> > Ankit Jain  
> > iLabs

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![benjamin\_leviant](https://avatars.discourse-cdn.com/v4/letter/b/919ad9/32.png) [@benjamin\_leviant](https://discuss.elastic.co/u/benjamin_leviant)\
**Post date:** [May 27, 2013, 9:03am UTC](https://discuss.elastic.co/t/wildcard-search-on-analyzed-field/12101/4 "2013-05-27T09:03:28Z")

</div>

Hi Ankit,

You should try to use the query\_string with the option "analyze\_wildcard"  
set to true.

For more detail :

> **[Elasticsearch Platform — Find real-time answers at scale](https://www.elastic.co)**
>
> Power insights and outcomes with the Elasticsearch Platform and AI. See into your data and find answers that matter with enterprise solutions designed to help you build, observe, and protect. Try Elasticsearch free today.

I hope it can help you.

Regards

Benjamin

On Fri, May 24, 2013 at 10:27 AM, simonw  
[simon.willnauer@elasticsearch.com](mailto:simon.willnauer@elasticsearch.com)wrote:

> to add to this, you can run wildcard queries on any field that is indexed  
> not just analyzed fields.
> 
> simon
> 
> On Friday, May 24, 2013 8:47:03 AM UTC+2, Chris Kinsalb wrote:
> 
> > Hi Ankit,
> > 
> > you could use the query\_string query, which allows leading wildcard  
> > searches within analyzed fields.
> > 
> > However, if you would like to use wildcards anywhere, you would probably  
> > have to change over the concerned field to a multi\_field, and store both an  
> > analyzed as well as a not\_analyzed version of the data (If I am not  
> > mistaken - I am still fairly new to this).  
> > You would then be able to issue a wildcard query, for instance, on the  
> > not\_analyzed version of the data:  
> > [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/**guide/reference/query-dsl/)\*\*  
> > wildcard-query/[http://www.elasticsearch.org/guide/reference/query-dsl/wildcard-query/](http://www.elasticsearch.org/guide/reference/query-dsl/wildcard-query/)
> > 
> > - chris
> > 
> > On Thursday, May 23, 2013 8:06:22 PM UTC+2, Ankit Jain wrote:
> > 
> > > Hi All,
> > > 
> > > We would like to enable wildcard search on analyzed field.
> > > 
> > > As per my level of understanding, if analyzed is true, then wildcard  
> > > search would not work.
> > > 
> > > Please suggest some ways to achieve above usecase.
> > > 
> > > Thanks,  
> > > Ankit Jain  
> > > iLabs
> > > 
> > > --  
> > > 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).  
> > > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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, 2:34am UTC](https://discuss.elastic.co/t/wildcard-search-on-analyzed-field/12101/5 "2017-07-06T02:34:37Z")

</div>


