Create an index key for an ascending index on the given fields.
Create an index key for an ascending index on the given fields.
the field names, which must contain at least one
the index specification
create a compound index specifications.
create a compound index specifications. If any field names are repeated, the last one takes precedence.
the index specifications
the compound index specification
Create an index key for an ascending index on the given fields.
Create an index key for an ascending index on the given fields.
the field names, which must contain at least one
the index specification
Create an index key for a 2d index on the given field.
Create an index key for a 2d index on the given field.
Note: A 2d index is for data stored as points on a two-dimensional plane. The 2d index is intended for legacy coordinate pairs used in MongoDB 2.2 and earlier.
the field to create a 2d index on
the index specification
Create an index key for an 2dsphere index on the given fields.
Create an index key for an 2dsphere index on the given fields.
the field names, which must contain at least one
the index specification
Create an index key for a geohaystack index on the given field.
Create an index key for a geohaystack index on the given field.
Note: For queries that use spherical geometry, a 2dsphere index is a better option than a haystack index. 2dsphere indexes allow field reordering; geoHaystack indexes require the first field to be the location field. Also, geoHaystack indexes are only usable via commands and so always return all results at once..
the field to create a geoHaystack index on
the additional field that forms the geoHaystack index key
the index specification
Create an index key for a hashed index on the given field.
Create an index key for a hashed index on the given field.
the field to create a hashed index on
the index specification
Create an index key for a text index on the given field.
Create an index key for a text index on the given field.
the field to create a text index on
the index specification
A factory for defining index keys. A convenient way to use this class is to statically import all of its methods, which allows usage like:
1.0