June 2017
Beginner to intermediate
404 pages
8h 22m
English
In this section, we will use the Geo Distance query to order the search results based on the distance. The documents closer to the user location are shown higher in the result list. For example, we want to find all the stores that have wifi in them and are within 1 mile of the user location. If none of the stores are within a 1-mile radius, filtering on the location will exclude all the stores in the result. In some cases, the user might be okay with a 2-mile radius. Instead of excluding the stores that are far away, we can rank them lower than the stores that are near.
We will use the bool query to tune the relevance. We need all the stores that have wifi in them, so we place the has_wifi query ...
Read now
Unlock full access