Geosearch usage #439
Replies: 4 comments 4 replies
-
Hi @bidoubiwa, thanks for raising your points. Regarding your first two points, they were thought through during the development of the geo search. The question to ask is "Why does a user want to do with geo search capabilities?" The answer we came up with for the product is this: "Filter documents containing geographic data in and out of different shapes and sort them by their distance from a geographic point." We found it much more intuitive to have an extensible expression system that fits into the fields that allow sorting and filtering rather than adding fields that may have interdependencies between them, as Algolia did, which would have been a bad design choice in my opinion if we had gone in that direction. The negative points we saw in it are:
Concerning the
Regarding this, we could add the possibility to define a field as geo capable as an index setting in the future. This way, the name |
Beta Was this translation helpful? Give feedback.
-
Algolia is also using Same for Google Maps API, which is widely used: https://developers.google.com/maps/documentation/geocoding/start |
Beta Was this translation helpful? Give feedback.
-
Regarding the |
Beta Was this translation helpful? Give feedback.
-
I opened a discussion only dedicated to the geo-search field (in the user documents) configuration: #444 |
Beta Was this translation helpful? Give feedback.
-
This discussion goes over the 3 design aspects of the geo search:
Query parameters
Currently to use the geo search the user needs to construct a string with the details of the geosearch.
To filter:
_geoRadius(lat, lng, distance_in_meters)
To sort:
_geoPoint(lat, LNG):order
I don't think this usage is easy to understand or to use. I also understand why we added the
_
in front of the function name, but it adds a layer of possible mistakes and confusion. With the function (or what appears to be one) and the_
it feels a bit like calling a private method in a string. I'm not sure we want to give the sensation to the user that he is coding in a string.Other search engines are using sub objects instead of strings, I don't know if this is something we want but when I used the geo search of algolia it was easy to create the filters for all my geo points and parameters. I see that elasticsearch has almost the same usage as Algolia.
Settings
The geo search is the only feature for the moment that requires the user to create a specific field in their document. Which is
_geo
.While asking for the content of a specified field to be in a specific format makes sense, having to create/rename a specific field in a document makes less sense. Every other field can be named however they like, and then specified in the settings.
Geo
should be the same.I understand that it is for the engine to understand it is a geo value and not a facet, but maybe if it requires so much work-arround it should not be in the
sortableAttributes
orfilterableAttributes
but in its own setting ? for examplegeoAttributes
.Another reason that emphasis this, is that all the fields inside
sortableAttributes
orfilterableAttributes
are handled the same way. All of them except if you write_geo
, which suddenly means a whole different thing. I'm not sure about that inconsistency._geo format
the geo format requires two field
lat
andlng
inside its structure. The choice forlng
is a tricky one. The official abbreviation islong
After looking around I could not find any indication of
lng
orlon
being an official abbreviation. Nonetheless, algolia and elasticsearch are usinglon
but google is usinglng
Beta Was this translation helpful? Give feedback.
All reactions