Hi, You just showed an example and the scoring algorithm is unclear. You need clarify both the filtering condition and ranking algorithm to construct the query.Why "Burger A" comes in the second position in Case 1? Where the second nearest burger shop should be??
What will happen if there is "Coffee Stand A" in Case 2??
In most cases complex ranking rules could be implemented by function score query, but in some cases it is better to use two queries and merge two results by client side.
Thank you for you quick response
So we are food delivery application we would like client searching restaurant match as much as we can
Example is we have Clint origin geo point at "0"
And we have 4 Restaurant
1.Restaurant name "Burger" geo points at"1"
2.Restaurant name "Burger 2" geo points at"2"
3.Restaurant name "Burger3" geo points at"3"
4.Restaurant name "A Burger" geo points at"4"
(Geo point prioritize according 0>1>2>3>4
scenario1: client search "Burger"
Result:
1.Restaurant name "Burger" geo points at"1"
2.Restaurant name "Burger 2" geo points at"2"
3.Restaurant name "Burger3" geo points at"3"
4.Restaurant name "Burger A" geo points at"4"
scenario2: client search "A Burger"
Result:
1.Restaurant name "Burger A" geo points at"4"
1.Restaurant name "Burger" geo points at"1"
2.Restaurant name "Burger 2" geo points at"2"
3.Restaurant name "Burger3" geo points at"3"
Our logic is if client search by regular name result must prioritize by distance more than matching
If client search by specific name result must prioritize by matching more than distance
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.