diff options
author | David Storch <david.storch@10gen.com> | 2016-08-22 16:41:50 -0400 |
---|---|---|
committer | David Storch <david.storch@10gen.com> | 2016-08-23 17:42:08 -0400 |
commit | f3be5348457ff71185ca9fa137ab7c1a8e4761df (patch) | |
tree | e2bdc25fab6568d577cb14f9905d593c07ee86e4 /src/mongo/db/fts | |
parent | 6b5fd115d38582d8b349a5aad2c29867e69dc758 (diff) | |
download | mongo-f3be5348457ff71185ca9fa137ab7c1a8e4761df.tar.gz |
SERVER-24508 delete BSONObjCmp
Instead, use BSONObj::ComparatorInterface.
Diffstat (limited to 'src/mongo/db/fts')
-rw-r--r-- | src/mongo/db/fts/fts_index_format.h | 1 | ||||
-rw-r--r-- | src/mongo/db/fts/fts_index_format_test.cpp | 17 |
2 files changed, 10 insertions, 8 deletions
diff --git a/src/mongo/db/fts/fts_index_format.h b/src/mongo/db/fts/fts_index_format.h index 82be9ad03f5..4d936d463a7 100644 --- a/src/mongo/db/fts/fts_index_format.h +++ b/src/mongo/db/fts/fts_index_format.h @@ -33,6 +33,7 @@ #include <string> #include "mongo/base/string_data.h" +#include "mongo/bson/bsonobj_comparator_interface.h" #include "mongo/db/fts/fts_util.h" namespace mongo { diff --git a/src/mongo/db/fts/fts_index_format_test.cpp b/src/mongo/db/fts/fts_index_format_test.cpp index 03eb7406a79..c630f75ebd9 100644 --- a/src/mongo/db/fts/fts_index_format_test.cpp +++ b/src/mongo/db/fts/fts_index_format_test.cpp @@ -34,6 +34,7 @@ #include <set> +#include "mongo/bson/simple_bsonobj_comparator.h" #include "mongo/db/fts/fts_index_format.h" #include "mongo/db/fts/fts_spec.h" #include "mongo/unittest/unittest.h" @@ -50,7 +51,7 @@ using unittest::assertGet; TEST(FTSIndexFormat, Simple1) { FTSSpec spec(assertGet(FTSSpec::fixSpec(BSON("key" << BSON("data" << "text"))))); - BSONObjSet keys; + BSONObjSet keys = SimpleBSONObjComparator::kInstance.makeBSONObjSet(); FTSIndexFormat::getKeys(spec, BSON("data" << "cat sat"), @@ -69,7 +70,7 @@ TEST(FTSIndexFormat, ExtraBack1) { << "text" << "x" << 1))))); - BSONObjSet keys; + BSONObjSet keys = SimpleBSONObjComparator::kInstance.makeBSONObjSet(); FTSIndexFormat::getKeys(spec, BSON("data" << "cat" @@ -89,7 +90,7 @@ TEST(FTSIndexFormat, ExtraBack1) { TEST(FTSIndexFormat, ExtraFront1) { FTSSpec spec(assertGet(FTSSpec::fixSpec(BSON("key" << BSON("x" << 1 << "data" << "text"))))); - BSONObjSet keys; + BSONObjSet keys = SimpleBSONObjComparator::kInstance.makeBSONObjSet(); FTSIndexFormat::getKeys(spec, BSON("data" << "cat" @@ -110,14 +111,14 @@ TEST(FTSIndexFormat, StopWords1) { FTSSpec spec(assertGet(FTSSpec::fixSpec(BSON("key" << BSON("data" << "text"))))); - BSONObjSet keys1; + BSONObjSet keys1 = SimpleBSONObjComparator::kInstance.makeBSONObjSet(); FTSIndexFormat::getKeys(spec, BSON("data" << "computer"), &keys1); ASSERT_EQUALS(1U, keys1.size()); - BSONObjSet keys2; + BSONObjSet keys2 = SimpleBSONObjComparator::kInstance.makeBSONObjSet(); FTSIndexFormat::getKeys(spec, BSON("data" << "any computer"), @@ -159,7 +160,7 @@ TEST(FTSIndexFormat, LongWordsTextIndexVersion1) { << "text") << "textIndexVersion" << 1)))); - BSONObjSet keys; + BSONObjSet keys = SimpleBSONObjComparator::kInstance.makeBSONObjSet(); string longPrefix(1024U, 'a'); // "aaa...aaacat" string longWordCat = longPrefix + "cat"; @@ -189,7 +190,7 @@ TEST(FTSIndexFormat, LongWordTextIndexVersion2) { << "text") << "textIndexVersion" << 2)))); - BSONObjSet keys; + BSONObjSet keys = SimpleBSONObjComparator::kInstance.makeBSONObjSet(); string longPrefix(1024U, 'a'); // "aaa...aaacat" string longWordCat = longPrefix + "cat"; @@ -224,7 +225,7 @@ TEST(FTSIndexFormat, LongWordTextIndexVersion3) { << "text") << "textIndexVersion" << 3)))); - BSONObjSet keys; + BSONObjSet keys = SimpleBSONObjComparator::kInstance.makeBSONObjSet(); string longPrefix(1024U, 'a'); // "aaa...aaacat" string longWordCat = longPrefix + "cat"; |