Hi,
I have created a elasticsearch index for an ecommerce database. It contains id,name, brand, brandid, description, category and color columns for each product. I am querying the index using the following parameters.
array:5 [▼
"index" => "product_items"
"type" => "product_items"
"from" => 1
"size" => 16
"body" => array:1 [▼
"query" => array:1 [▼
"bool" => array:1 [▼
"should" => array:1 [▼
"multi_match" => array:3 [▼
"type" => "most_fields"
"fields" => array:7 [▼
0 => "name"
1 => "description"
2 => "brand"
3 => "tags"
4 => "collectionname"
5 => "color"
6 => "categories"
]
"query" => "gucci hand bag"
]
]
]
]
]
]
But I am not getting relevant results. I want to show the same brands products at the first if brand name is present in the search query. For example Gucci,I am getting first few products belong to Gucci and then some other brand in between before showing Gucci again. I have read from the documentation that score is not calculated for bool query. I want to check if there is a better way to make the query to get better relevant results. Thanks