How can I aggregate a term filter based on the phrase? The field auto is analyzed with shingle analyzer.The below query works fine with single keyword without whitespace when there is whitespace it fails. Any better way of doing it?
{
"query" : {
"prefix" : {
"auto" : "Hello Wo*"
}
},
"aggregations" : {
"auto" : {
"terms" : {
"field" : "auto",
"size" : 1000,
"include" : "Hello Wo.*"
}
}
}
}