I have product model that had name, gender, description etc columns and those columns are included in elasticsearch index via search_data method.
Let's assume that I have a product with following values
name: 'No Boyfriend No Problem Crop Jumper'
gender : 'women'
description: 'Best crop jumber for now'
When I search with a term "women crop jumper"
The product doesn't appear in the search result. I am trying to search the products with following query
@products = Product.search(
params[:q],
fields: [:gender, :name, :description],
match: :word_start,
page: params[:page],
per_page: Product::PAGE
)
How should I update my product search so that "women crop jumper" search terms result will include the product above.
Thanks