hello i have 6 different field that i want to search in all of them . im using edge gram analyzer for search and using multi match query and text come from front.
my sample code is :
esClient.search({
index: 'equipments',
size: 15,
from: 0,
query: {
bool:{
must:{
multi_match: {
fields: [
'model',
'title^6',
'category^5',
'brand^3',
'attribute.keyword',
// 'attribute^2',
'description^4'
],
query: text,
type:'most_fields',
},
}
}
})
when i search excav it returns every equipments category that start with excav (excavator) and when i search for excav hit it returns all excav and hit that can find (excavator hitachi) but my problem is when i search excav hi it returns a document that doesnt have excav in it