Class GeoShapeIndexer

java.lang.Object
org.elasticsearch.index.mapper.GeoShapeIndexer
All Implemented Interfaces:
ShapeIndexer

public class GeoShapeIndexer extends Object implements ShapeIndexer
Utility class that converts geometries into Lucene-compatible form for indexing in a geo_shape field.
  • Constructor Details

  • Method Details

    • indexShape

      public List<org.apache.lucene.index.IndexableField> indexShape(Geometry geometry)
      Specified by:
      indexShape in interface ShapeIndexer
    • normalize

      public Geometry normalize(Geometry geometry)
      Normalise the geometry, that is make sure latitude and longitude are between expected values and split geometries across the dateline when needed
    • getIndexableFields

      public List<org.apache.lucene.index.IndexableField> getIndexableFields(Geometry geometry)
      Generates lucene indexable fields from a geometry. It expects geometries that have already been normalised.