Gven a list of products and each is assign to some categories( Mobile
, Apple
, iPhone
) assigned to it.
iPhone 16 Pro 6.3-inch display
iPhone 16 Pro Max 6.9-inch display
iPhone 16 6.1-inch display
iPhone 16 Plus 6.7-inch display
iPhone 15 6.1-inch display
iPhone 15 Plus 6.7-inch display
...some
...more
...samgsung
If the query is iPhone 99 Edge 7.0-inch display
then my goal is to find the similar products by name and retrieve the categories assigned to them. So now the new iPhone automatically got assigned to the those categories( Mobile
, Apple
, iPhone
).
The name
field is with type: keyword
and I believe I don't need too much fulltext searching functions this use case.
Should I be using minimum_should_match
?
GET /products/_search
{
"query": {
"bool": {
"must":[
{
"query_string":{
"query": "iPhone 99 Edge 7.0-inch display",
"minimum_should_match": "70%"
}
}
]
}
}
}