Skip to content

Geolocation

Geo fields

geopoint fields are defined by their lat/lon coordinates:

{
  "_id": 1,
  "name": "KFC",
  "location": {"lat": 1.0, "lon": 2.0}
}

You can perform geo_distance and geo_box filters over geopoint fields.

It is also possible to do a distance sort for this field type.

Example field schema for a geopoint field location:

schema:
  movies:
    fields:
      title:
        type: text   
        search: false
      location:
        type: geopoint  
        filter: true    # field is filterable
                        # note that geopoint fields are not facetable