|
Spring Data MongoDB - Core | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT | |||||||||
@Target(value=FIELD) @Retention(value=RUNTIME) public @interface GeoSpatialIndexed
Mark a field to be indexed using MongoDB's geospatial indexing feature.
| 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
Index name. |
GeoSpatialIndexType |
type
The type of the geospatial index. |
boolean |
useGeneratedName
If set to true then MongoDB will ignore the given index name and instead generate a new name. |
public abstract String name
@Document
class Root {
Hybrid hybrid;
Nested nested;
}
@Document
class Hybrid {
@GeoSpatialIndexed(name="index") Point h1;
}
class Nested {
@GeoSpatialIndexed(name="index") Point n1;
}
resolves in the following index structures
db.root.ensureIndex( { hybrid.h1: "2d" } , { name: "hybrid.index" } )
db.root.ensureIndex( { nested.n1: "2d" } , { name: "nested.index" } )
db.hybrid.ensureIndex( { h1: "2d" } , { name: "index" } )
public abstract boolean useGeneratedName
public abstract String collection
public abstract int min
public abstract int max
public abstract int bits
public abstract GeoSpatialIndexType type
GeoSpatialIndexType.GEO_2D
public abstract double bucketSize
GeoSpatialIndexType.GEO_HAYSTACK indexes, in coordinate units.
public abstract String additionalField
GeoSpatialIndexType.GEO_HAYSTACK indexes
|
Spring Data MongoDB - Core | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT | |||||||||