Hi to all, i don't understan what is the best solution for sort search result in my ecommerce. I have a index 'product', with same filed. The field 'name' have this mapping:
['type' => 'text', 'term_vector' => 'with_positions']
I have same product, for example:
- Apple Iphone 11 6/64GB Black
- Flip cover for Apple iphone 11
- Screen protector for Apple iphone 11
- Apple Iphone 11 6/128GB White
If i search for query 'Apple iphone 11', i need results in this order:
- Apple Iphone 11 6/64GB Black
- Apple Iphone 11 6/128GB White
- Flip cover for Apple iphone 11
- Screen protector for Apple iphone 11
But if i use match, match_phrase, multi_match, i have result in different order. I think is important that the query, if is situated in the first part of product name, give a better rate to the item, but in what way i can have this result?