Wildcard in the field name in suggest pharse query

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"
}
}
}
}
}

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