# Wildcard in the field name in suggest pharse query

**URL:** https://discuss.elastic.co/t/wildcard-in-the-field-name-in-suggest-pharse-query/215824
**Category:** Elasticsearch
**Created:** [January 21, 2020, 6:31am UTC](https://discuss.elastic.co/t/wildcard-in-the-field-name-in-suggest-pharse-query/215824 "2020-01-21T06:31:41Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![avinash\_kumawat](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/avinash_kumawat/32/44393_2.png) [@avinash\_kumawat](https://discuss.elastic.co/u/avinash_kumawat)
#### Post date: [January 21, 2020, 6:31am UTC](https://discuss.elastic.co/t/wildcard-in-the-field-name-in-suggest-pharse-query/215824/1 "2020-01-21T06:31:41Z")

</div>

Hello All,

I am trying to implement did you mean functionality using elasticsearch, I wanted to search the text in all the fields using wildcard without knowing the field name. Is there any way to do that I know query string support wildcard in the field name like this

GET /my\_index\_name/\_search  
{  
"highlight": {  
"fields": {  
"_":{}  
}  
},  
"query": {  
"query\_string": {  
"fields": ["_"],  
"lenient": true,  
"query": "wireframes"  
}  
}  
}  
I want the same funcationality in sugges phrase query where i can pass wildcard character in the field.

GET /my\_index\_name/\_search  
{  
"suggest": {  
"text": "wirefames dyng",  
"simple\_phrase": {  
"phrase": {  
"field": "title.shingle",  
"size":10,  
"max\_errors":2,  
"confidence": 0.0,  
"direct\_generator": [  
{  
"field": "title.shingle"  
}  
],  
"collate": {  
"query": {  
"source": {  
"match": {  
"title": {  
"query": "{{suggestion}}",  
"operator": "and"  
}  
}  
}  
},  
"prune": "true"  
}  
}  
}  
}  
}

---

<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: [February 18, 2020, 6:31am UTC](https://discuss.elastic.co/t/wildcard-in-the-field-name-in-suggest-pharse-query/215824/2 "2020-02-18T06:31:51Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
