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 |
|---|---|
GeospatialIndex |
collation(Collation collation)
Set the
Collation to specify language-specific rules for string comparison, such as rules for lettercase
and accent marks. |
org.bson.Document |
getIndexKeys()
Get the
Document containing properties covered by the index. |
org.bson.Document |
getIndexOptions()
Get the index properties such as unique,...
|
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(@Nullable IndexFilter filter)
filter expression.filter - can be null.public GeospatialIndex collation(@Nullable Collation collation)
Collation to specify language-specific rules for string comparison, such as rules for lettercase
and accent marks.Collation as the Index actually make use of the
index.collation - can be null.public org.bson.Document getIndexKeys()
IndexDefinitionDocument containing properties covered by the index.getIndexKeys in interface IndexDefinitionpublic org.bson.Document getIndexOptions()
IndexDefinitiongetIndexOptions in interface IndexDefinitionCopyright © 2011–2022 Pivotal Software, Inc.. All rights reserved.