# How to perform a wildcard in phrase search

**URL:** <https://discuss.elastic.co/t/how-to-perform-a-wildcard-in-phrase-search/19014>\
**Category:** Elasticsearch\
**Created:** [July 31, 2014, 9:03pm UTC](https://discuss.elastic.co/t/how-to-perform-a-wildcard-in-phrase-search/19014 "2014-07-31T21:03:47Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Joyce\_Wu](https://avatars.discourse-cdn.com/v4/letter/j/e8c25b/32.png) [@Joyce\_Wu](https://discuss.elastic.co/u/Joyce_Wu)\
**Post date:** [July 31, 2014, 9:03pm UTC](https://discuss.elastic.co/t/how-to-perform-a-wildcard-in-phrase-search/19014/1 "2014-07-31T21:03:47Z")

</div>

Hi,

I have a document contains a phrase "interest entities". If I use wildcard  
query to search "entit\*", that document is returned. However, if I use  
wildcard query to do a phrase search "interest_entit_", that document is  
not found. I also tried with prefix query as well as wildcard query with  
"interest entit\*", no document is found either.

I would expect follow query to work according to ElasticSearch document:  
[http://www.elasticsearch.org/guide/en/elasticsearch/guide/current/\_literal\_wildcard\_literal\_and\_literal\_regexp\_literal\_queries.html](http://www.elasticsearch.org/guide/en/elasticsearch/guide/current/_literal_wildcard_literal_and_literal_regexp_literal_queries.html)

{"wildcard":{"document":"interest_entit_"}}

The document was indexed using standard tokenizer and standard filter,  
which should be not stemmed.

Does anyone has an idea how to get the wildcard query works with wildcard  
in a phrase?

Many thanks!

Joyce

--  
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/b75810bb-9e10-4dfd-aa2a-bfad63d78c27%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/b75810bb-9e10-4dfd-aa2a-bfad63d78c27%40googlegroups.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, 1:11am UTC](https://discuss.elastic.co/t/how-to-perform-a-wildcard-in-phrase-search/19014/2 "2017-07-06T01:11:51Z")

</div>


