First of all say hello to staffs and users here
I have a small question on es search function
Assume I have few data like:
count:100
text:monkeycount:90
text:kingcount:80
text:monkey kingcount:70
text:monkey herecount:60
text:king herecount:50
text:monkey king here
I want to search with keyword: monkey king on "text" field; And sort them on "count" desc
I prefer data with both "monkey" and "king" rank the top, then data with "monkey" OR "king". So the result should be:
count:80
text:monkey kingcount:50
text:monkey king herecount:100
text:monkeycount:90
text:kingcount:70
text:monkey herecount:60
text:king here
Any code I can use in Elasticsearch?
Note: Sure I can search twice to do it But I wonder if I can get my result with 1 search.
Billion thanks in advance.