You probably need to pre-process certain searches before sending them to elasticsearch.
One approach is to write application code to map trigger search terms people type (like "laptop") to one of the 2 API calls I listed (those that promote laptops or demote laptop cases). Your code should also spot the exceptions to this rule in the search input (the keywords "case" or "cover").
You can machine-learn the set of trigger keywords by searching an index of product descriptions or query click logs. Use the significant_text aggregation to find the significant words connected to "case" or "cover". These are the trigger words I found from the (dated) BestBuy click logs for searches containing "cover":
Could you provide a full recreation script as described in About the Elasticsearch category. It will help to better understand what you are doing. Please, try to keep the example as simple as possible.
A full reproduction script is something anyone can copy and paste in Kibana dev console, click on the run button to reproduce your use case. It will help readers to understand, reproduce and if needed fix your problem. It will also most likely help to get a faster answer.
We've already been through this.
You don't seem to have written any of the pre-processing code we suggested, otherwise your query JSON would look different. There is no magic shortcut here.
But, when we use keywords in the query, as below example, for this i need to filter
data using keywords, but there is lot of keywords, and user can enter keywords as
iphone - i phone - iphones
shoe - shoes
laptop - laptops
harddisk - hard disk - harddisks
so, is there any way in elastic search, to understand the above keywords as same?
When i use the keywords like (iphone, i phone, iphones) in the below query,
it gives the results like "iphone case", "iphone covers", not iphones
Your query processing rules can be derived from user search/click behaviour - we have tools to help with that but it's not a process that can be automated - you're going to have to write some code.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant logo are trademarks of the Apache Software Foundation in the United States and/or other countries.