Currently I am using multi_match as below to search partial text string
{
"query": {
"multi_match": {
"fields": [
"model",
"make",
"year.keyword"
],
"operator": "and",
"query": "2015 Toyota Corolla",
"type": "cross_fields"
}
}
}
It will search vehicles which contains year=2015, make=Toyota, model=Corolla successfully
But now we have requirement to search with partial word also like
{
"query": {
"multi_match": {
"fields": [
"model",
"make",
"year.keyword"
],
"operator": "and",
"query": "2015 Toy Corolla",
"type": "cross_fields"
}
}
}
Should also search vehicles which contains year=2015, make=Toyota, model=Corolla.
I checked multi match it does not support wild cards other wise I could have used it.
Can any body help me to solve out with existing query.