Spring Data MongoDB - Core

org.springframework.data.mongodb.core.index
Annotation Type GeoSpatialIndexed


@Target(value=FIELD)
@Retention(value=RUNTIME)
public @interface GeoSpatialIndexed

Mark a field to be indexed using MongoDB's geospatial indexing feature.

Author:
Jon Brisbin, Laurent Canet

Optional Element Summary
 String additionalField
          The name of the additional field to use for GeoSpatialIndexType.GEO_HAYSTACK indexes
 int bits
          Bits of precision for boundary calculations.
 double bucketSize
          The bucket size for GeoSpatialIndexType.GEO_HAYSTACK indexes, in coordinate units.
 String collection
          Name of the collection in which to create the index.
 int max
          Maximum value for indexed values.
 int min
          Minimum value for indexed values.
 String name
          Name of the property in the document that contains the [x, y] or radial coordinates to index.
 GeoSpatialIndexType type
          The type of the geospatial index.
 

name

public abstract String name
Name of the property in the document that contains the [x, y] or radial coordinates to index.

Returns:
Default:
""

collection

public abstract String collection
Name of the collection in which to create the index.

Returns:
Default:
""

min

public abstract int min
Minimum value for indexed values.

Returns:
Default:
-180

max

public abstract int max
Maximum value for indexed values.

Returns:
Default:
180

bits

public abstract int bits
Bits of precision for boundary calculations.

Returns:
Default:
26

type

public abstract GeoSpatialIndexType type
The type of the geospatial index. Default is GeoSpatialIndexType.GEO_2D

Returns:
Since:
1.4
Default:
org.springframework.data.mongodb.core.index.GeoSpatialIndexType.GEO_2D

bucketSize

public abstract double bucketSize
The bucket size for GeoSpatialIndexType.GEO_HAYSTACK indexes, in coordinate units.

Returns:
Since:
1.4
Default:
1.0

additionalField

public abstract String additionalField
The name of the additional field to use for GeoSpatialIndexType.GEO_HAYSTACK indexes

Returns:
Since:
1.4
Default:
""

Spring Data MongoDB - Core

Copyright © 2011-2014-2014 Pivotal. All Rights Reserved.