22 #include "mongo/client/export_macros.h"
37 kIndexTypeGeoHaystack,
38 kIndexTypeGeo2DSphere,
43 static const int kIndexValAscending = 1;
44 static const int kIndexValDescending = -1;
45 static const char kIndexValText[];
46 static const char kIndexValGeo2D[];
47 static const char kIndexValGeoHaystack[];
48 static const char kIndexValGeo2DSphere[];
49 static const char kIndexValHashed[];
71 typedef std::vector<std::pair<std::string, IndexType> >
KeyVector;
72 IndexSpec& addKeys(
const KeyVector& keys);
104 MONGO_CLIENT_DEPRECATED(
"deprecated in MongoDB 2.8")
105 IndexSpec& dropDuplicates(
bool value = true);
109 IndexSpec& dropDuplicatesDeprecated(
bool value = true);
120 IndexSpec& expireAfterSeconds(
int value);
157 IndexSpec& geo2DSphereIndexVersion(
int value);
179 IndexSpec& geoHaystackBucketSize(
double value);
200 std::
string name() const;
A StringData object wraps a 'const string&' or a 'const char*' without copying its contents...
Definition: string_data.h:43
Utility functions for parsing numbers from strings.
Definition: compare_numbers.h:20
std::vector< std::pair< std::string, IndexType > > KeyVector
Add all components in the provided key vector to the index descriptor.
Definition: index_spec.h:71
Utility for creating a BSONObj.
Definition: bsonobjbuilder.h:53
BSONElement represents an "element" in a BSONObj.
Definition: bsonelement.h:55
Definition: index_spec.h:29
C++ representation of a "BSON" object – that is, an extended JSON-style object in a binary represent...
Definition: bsonobj.h:78