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[];
61 IndexSpec& addKey(
const StringData& field, IndexType type = kIndexTypeAscending);
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);
137 IndexSpec& textDefaultLanguage(const StringData& value);
140 IndexSpec& textLanguageOverride(const StringData& value);
155 IndexSpec& geo2DSphereIndexVersion(
int value);
177 IndexSpec& geoHaystackBucketSize(
double value);
198 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: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