22 #include "mongo/client/export_macros.h"
38 kIndexTypeGeoHaystack,
39 kIndexTypeGeo2DSphere,
44 static const int kIndexValAscending = 1;
45 static const int kIndexValDescending = -1;
46 static const char kIndexValText[];
47 static const char kIndexValGeo2D[];
48 static const char kIndexValGeoHaystack[];
49 static const char kIndexValGeo2DSphere[];
50 static const char kIndexValHashed[];
62 IndexSpec& addKey(
const StringData& field, IndexType type = kIndexTypeAscending);
72 typedef std::vector<std::pair<std::string, IndexType> >
KeyVector;
73 IndexSpec& addKeys(
const KeyVector& keys);
105 MONGO_CLIENT_DEPRECATED(
"deprecated in MongoDB 2.8")
106 IndexSpec& dropDuplicates(
bool value = true);
110 IndexSpec& dropDuplicatesDeprecated(
bool value = true);
121 IndexSpec& expireAfterSeconds(
int value);
138 IndexSpec& textDefaultLanguage(const StringData& value);
141 IndexSpec& textLanguageOverride(const StringData& value);
156 IndexSpec& geo2DSphereIndexVersion(
int value);
178 IndexSpec& geoHaystackBucketSize(
double value);
199 std::
string name() const;
the main MongoDB namespace
Definition: bulk_operation_builder.h:24
std::vector< std::pair< std::string, IndexType > > KeyVector
Add all components in the provided key vector to the index descriptor.
Definition: index_spec.h:72
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