public class GeospatialIndex extends Object implements IndexDefinition
| Constructor and Description |
|---|
GeospatialIndex(String field)
Creates a new
GeospatialIndex for the given field. |
| Modifier and Type | Method and Description |
|---|---|
com.mongodb.DBObject |
getIndexKeys() |
com.mongodb.DBObject |
getIndexOptions() |
GeospatialIndex |
named(String name) |
GeospatialIndex |
partial(IndexFilter filter)
Only index the documents in a collection that meet a specified
filter expression. |
String |
toString() |
GeospatialIndex |
typed(GeoSpatialIndexType type) |
GeospatialIndex |
withAdditionalField(String fieldName) |
GeospatialIndex |
withBits(int bits) |
GeospatialIndex |
withBucketSize(double bucketSize) |
GeospatialIndex |
withMax(int max) |
GeospatialIndex |
withMin(int min) |
public GeospatialIndex(String field)
GeospatialIndex for the given field.field - must not be empty or null.public GeospatialIndex named(String name)
name - must not be null or empty.public GeospatialIndex withMin(int min)
min - public GeospatialIndex withMax(int max)
max - public GeospatialIndex withBits(int bits)
bits - public GeospatialIndex typed(GeoSpatialIndexType type)
type - must not be null.public GeospatialIndex withBucketSize(double bucketSize)
bucketSize - public GeospatialIndex withAdditionalField(String fieldName)
fieldName. - public GeospatialIndex partial(IndexFilter filter)
filter expression.filter - can be null.public com.mongodb.DBObject getIndexKeys()
getIndexKeys in interface IndexDefinitionpublic com.mongodb.DBObject getIndexOptions()
getIndexOptions in interface IndexDefinitionCopyright © 2011–2018 Pivotal Software, Inc.. All rights reserved.