org.springframework.data.mongodb.core.index
Class GeospatialIndex
java.lang.Object
org.springframework.data.mongodb.core.index.GeospatialIndex
- All Implemented Interfaces:
- IndexDefinition
public class GeospatialIndex
- extends Object
- implements IndexDefinition
Value object to capture data to create a geo index.
- Author:
- Jon Brisbin, Oliver Gierke, Laurent Canet, Christoph Strobl
GeospatialIndex
public GeospatialIndex(String field)
- Creates a new
GeospatialIndex for the given field.
- Parameters:
field - must not be empty or null.
named
public GeospatialIndex named(String name)
- Parameters:
name - must not be null or empty.
- Returns:
withMin
public GeospatialIndex withMin(int min)
- Parameters:
min -
- Returns:
withMax
public GeospatialIndex withMax(int max)
- Parameters:
max -
- Returns:
withBits
public GeospatialIndex withBits(int bits)
- Parameters:
bits -
- Returns:
typed
public GeospatialIndex typed(GeoSpatialIndexType type)
- Parameters:
type - must not be null.
- Returns:
withBucketSize
public GeospatialIndex withBucketSize(double bucketSize)
- Parameters:
bucketSize -
- Returns:
withAdditionalField
public GeospatialIndex withAdditionalField(String fieldName)
- Parameters:
fieldName. -
- Returns:
getIndexKeys
public com.mongodb.DBObject getIndexKeys()
- Specified by:
getIndexKeys in interface IndexDefinition
getIndexOptions
public com.mongodb.DBObject getIndexOptions()
- Specified by:
getIndexOptions in interface IndexDefinition
toString
public String toString()
- Overrides:
toString in class Object
Copyright © 2011-2014-2014 Pivotal Software, Inc.. All Rights Reserved.