summaryrefslogtreecommitdiffstats
path: root/searchcore/src/tests/proton/matching
diff options
context:
space:
mode:
authorGeir Storli <geirst@yahoo-inc.com>2017-04-03 11:38:27 +0000
committerGeir Storli <geirst@yahoo-inc.com>2017-04-04 19:24:55 +0000
commit3948d63b4d7a64fb964f052df4dfcb87845bd364 (patch)
tree499cdf823b0004130b6b418cecff8df776383c2d /searchcore/src/tests/proton/matching
parente9c418d113cee3075d07279f3589fa6a144e593b (diff)
Use CollectionType defined in search::index::schema for search::fef::FieldInfo.
This is the same as done with DataType.
Diffstat (limited to 'searchcore/src/tests/proton/matching')
-rw-r--r--searchcore/src/tests/proton/matching/index_environment/index_environment_test.cpp12
-rw-r--r--searchcore/src/tests/proton/matching/query_test.cpp2
-rw-r--r--searchcore/src/tests/proton/matching/querynodes_test.cpp2
-rw-r--r--searchcore/src/tests/proton/matching/resolveviewvisitor_test.cpp2
-rw-r--r--searchcore/src/tests/proton/matching/termdataextractor_test.cpp2
5 files changed, 10 insertions, 10 deletions
diff --git a/searchcore/src/tests/proton/matching/index_environment/index_environment_test.cpp b/searchcore/src/tests/proton/matching/index_environment/index_environment_test.cpp
index e549ffd479e..ff86e0a5ff1 100644
--- a/searchcore/src/tests/proton/matching/index_environment/index_environment_test.cpp
+++ b/searchcore/src/tests/proton/matching/index_environment/index_environment_test.cpp
@@ -49,7 +49,7 @@ struct Fixture {
const FieldInfo *assertField(size_t idx,
const vespalib::string &name,
DataType dataType,
- search::fef::CollectionType collectionType) {
+ CollectionType collectionType) {
const FieldInfo *field = env.getField(idx);
ASSERT_TRUE(field != nullptr);
EXPECT_EQUAL(field, env.getFieldByName(name));
@@ -62,7 +62,7 @@ struct Fixture {
void assertHiddenAttributeField(size_t idx,
const vespalib::string &name,
DataType dataType,
- search::fef::CollectionType collectionType) {
+ CollectionType collectionType) {
const FieldInfo *field = assertField(idx, name, dataType, collectionType);
EXPECT_FALSE(field->hasAttribute());
EXPECT_TRUE(field->type() == FieldType::HIDDEN_ATTRIBUTE);
@@ -71,7 +71,7 @@ struct Fixture {
void assertAttributeField(size_t idx,
const vespalib::string &name,
DataType dataType,
- search::fef::CollectionType collectionType) {
+ CollectionType collectionType) {
const FieldInfo *field = assertField(idx, name, dataType, collectionType);
EXPECT_TRUE(field->hasAttribute());
EXPECT_TRUE(field->type() == FieldType::ATTRIBUTE);
@@ -82,14 +82,14 @@ struct Fixture {
TEST_F("require that document meta store is always extracted in index environment", Fixture(buildEmptySchema()))
{
ASSERT_EQUAL(1u, f.env.getNumFields());
- TEST_DO(f.assertHiddenAttributeField(0, "[documentmetastore]", DataType::RAW, search::fef::CollectionType::SINGLE));
+ TEST_DO(f.assertHiddenAttributeField(0, "[documentmetastore]", DataType::RAW, CollectionType::SINGLE));
}
TEST_F("require that imported attribute fields are extracted in index environment", Fixture(buildSchema()))
{
ASSERT_EQUAL(3u, f.env.getNumFields());
- TEST_DO(f.assertAttributeField(0, "imported_a", DataType::INT32, search::fef::CollectionType::SINGLE));
- TEST_DO(f.assertAttributeField(1, "imported_b", DataType::STRING, search::fef::CollectionType::ARRAY));
+ TEST_DO(f.assertAttributeField(0, "imported_a", DataType::INT32, CollectionType::SINGLE));
+ TEST_DO(f.assertAttributeField(1, "imported_b", DataType::STRING, CollectionType::ARRAY));
EXPECT_EQUAL("[documentmetastore]", f.env.getField(2)->name());
}
diff --git a/searchcore/src/tests/proton/matching/query_test.cpp b/searchcore/src/tests/proton/matching/query_test.cpp
index caf52a5fca4..1426a2d85af 100644
--- a/searchcore/src/tests/proton/matching/query_test.cpp
+++ b/searchcore/src/tests/proton/matching/query_test.cpp
@@ -34,7 +34,6 @@ LOG_SETUP("query_test");
#include <vector>
using document::PositionDataType;
-using search::fef::CollectionType;
using search::fef::FieldInfo;
using search::fef::FieldType;
using search::fef::ITermData;
@@ -65,6 +64,7 @@ using search::queryeval::ParallelWeakAndBlueprint;
using std::string;
using std::vector;
namespace fef_test = search::fef::test;
+using CollectionType = FieldInfo::CollectionType;
namespace proton {
namespace matching {
diff --git a/searchcore/src/tests/proton/matching/querynodes_test.cpp b/searchcore/src/tests/proton/matching/querynodes_test.cpp
index ef576c4ac37..d9c0fe09c24 100644
--- a/searchcore/src/tests/proton/matching/querynodes_test.cpp
+++ b/searchcore/src/tests/proton/matching/querynodes_test.cpp
@@ -39,7 +39,6 @@ LOG_SETUP("querynodes_test");
#include <vector>
#include <vespa/searchlib/attribute/singlenumericattribute.hpp>
-using search::fef::CollectionType;
using search::fef::FieldInfo;
using search::fef::FieldType;
using search::fef::MatchData;
@@ -70,6 +69,7 @@ using std::string;
using std::vector;
using namespace proton::matching;
namespace fef_test = search::fef::test;
+using CollectionType = FieldInfo::CollectionType;
namespace {
diff --git a/searchcore/src/tests/proton/matching/resolveviewvisitor_test.cpp b/searchcore/src/tests/proton/matching/resolveviewvisitor_test.cpp
index 212762389f0..2734e860c72 100644
--- a/searchcore/src/tests/proton/matching/resolveviewvisitor_test.cpp
+++ b/searchcore/src/tests/proton/matching/resolveviewvisitor_test.cpp
@@ -15,7 +15,6 @@ LOG_SETUP("resolveviewvisitor_test");
#include <string>
namespace fef_test = search::fef::test;
-using search::fef::CollectionType;
using search::fef::FieldInfo;
using search::fef::FieldType;
using search::fef::test::IndexEnvironment;
@@ -23,6 +22,7 @@ using search::query::Node;
using search::query::QueryBuilder;
using std::string;
using namespace proton::matching;
+using CollectionType = FieldInfo::CollectionType;
namespace {
diff --git a/searchcore/src/tests/proton/matching/termdataextractor_test.cpp b/searchcore/src/tests/proton/matching/termdataextractor_test.cpp
index d61267b7d31..502553bfa69 100644
--- a/searchcore/src/tests/proton/matching/termdataextractor_test.cpp
+++ b/searchcore/src/tests/proton/matching/termdataextractor_test.cpp
@@ -21,7 +21,6 @@ LOG_SETUP("termdataextractor_test");
#include <vector>
namespace fef_test = search::fef::test;
-using search::fef::CollectionType;
using search::fef::FieldInfo;
using search::fef::FieldType;
using search::fef::ITermData;
@@ -35,6 +34,7 @@ using search::query::Weight;
using std::string;
using std::vector;
using namespace proton::matching;
+using CollectionType = FieldInfo::CollectionType;
namespace search { class AttributeManager; }