summaryrefslogtreecommitdiffstats
path: root/searchcommon
diff options
context:
space:
mode:
authorGeir Storli <geirst@verizonmedia.com>2019-06-24 09:22:45 +0000
committerGeir Storli <geirst@verizonmedia.com>2019-06-24 09:22:45 +0000
commit38213cb7e224dddcccda542191b8e81f495cf6a4 (patch)
tree258e1eff449c79a5d1a732d8c915395eaab9655d /searchcommon
parent2da125f0babd1aa4314811e8e80ec4e127786102 (diff)
Rename experimentalpostinglistformat -> interleavedfeatures in indexschema.def.
Diffstat (limited to 'searchcommon')
-rw-r--r--searchcommon/src/tests/schema/load-save-cfg/indexschema.cfg2
-rw-r--r--searchcommon/src/tests/schema/schema_test.cpp6
-rw-r--r--searchcommon/src/vespa/searchcommon/common/schema.cpp12
-rw-r--r--searchcommon/src/vespa/searchcommon/common/schema.h10
-rw-r--r--searchcommon/src/vespa/searchcommon/common/schemaconfigurer.cpp2
5 files changed, 16 insertions, 16 deletions
diff --git a/searchcommon/src/tests/schema/load-save-cfg/indexschema.cfg b/searchcommon/src/tests/schema/load-save-cfg/indexschema.cfg
index b6c547c52c9..b9d82b9b569 100644
--- a/searchcommon/src/tests/schema/load-save-cfg/indexschema.cfg
+++ b/searchcommon/src/tests/schema/load-save-cfg/indexschema.cfg
@@ -5,7 +5,7 @@ indexfield[1].name b
indexfield[1].datatype INT64
indexfield[2].name c
indexfield[2].datatype STRING
-indexfield[2].experimentalpostinglistformat true
+indexfield[2].interleavedfeatures true
fieldset[1]
fieldset[0].name default
fieldset[0].field[2]
diff --git a/searchcommon/src/tests/schema/schema_test.cpp b/searchcommon/src/tests/schema/schema_test.cpp
index e360ee1ba7a..3d35b11a51a 100644
--- a/searchcommon/src/tests/schema/schema_test.cpp
+++ b/searchcommon/src/tests/schema/schema_test.cpp
@@ -32,7 +32,7 @@ assertIndexField(const Schema::IndexField& exp,
{
assertField(exp, act);
EXPECT_EQ(exp.getAvgElemLen(), act.getAvgElemLen());
- EXPECT_EQ(exp.use_experimental_posting_list_format(), act.use_experimental_posting_list_format());
+ EXPECT_EQ(exp.use_interleaved_features(), act.use_interleaved_features());
}
void
@@ -183,7 +183,7 @@ TEST(SchemaTest, test_load_and_save)
EXPECT_EQ(3u, s.getNumIndexFields());
assertIndexField(SIF("a", SDT::STRING), s.getIndexField(0));
assertIndexField(SIF("b", SDT::INT64), s.getIndexField(1));
- assertIndexField(SIF("c", SDT::STRING).set_experimental_posting_list_format(true), s.getIndexField(2));
+ assertIndexField(SIF("c", SDT::STRING).set_interleaved_features(true), s.getIndexField(2));
EXPECT_EQ(9u, s.getNumAttributeFields());
assertField(SAF("a", SDT::STRING, SCT::SINGLE),
@@ -448,7 +448,7 @@ TEST(SchemaTest, require_that_index_field_is_loaded_with_default_values_when_pro
ASSERT_EQ(1, index_fields.size());
assertIndexField(SIF("foo", DataType::STRING, CollectionType::SINGLE).
setAvgElemLen(512).
- set_experimental_posting_list_format(false),
+ set_interleaved_features(false),
index_fields[0]);
assertIndexField(SIF("foo", DataType::STRING, CollectionType::SINGLE), index_fields[0]);
}
diff --git a/searchcommon/src/vespa/searchcommon/common/schema.cpp b/searchcommon/src/vespa/searchcommon/common/schema.cpp
index 6d3bae31508..afc023a68d7 100644
--- a/searchcommon/src/vespa/searchcommon/common/schema.cpp
+++ b/searchcommon/src/vespa/searchcommon/common/schema.cpp
@@ -132,7 +132,7 @@ Schema::Field::operator!=(const Field &rhs) const
Schema::IndexField::IndexField(vespalib::stringref name, DataType dt)
: Field(name, dt),
_avgElemLen(512),
- _experimental_posting_list_format(false)
+ _interleaved_features(false)
{
}
@@ -140,14 +140,14 @@ Schema::IndexField::IndexField(vespalib::stringref name, DataType dt,
CollectionType ct)
: Field(name, dt, ct),
_avgElemLen(512),
- _experimental_posting_list_format(false)
+ _interleaved_features(false)
{
}
Schema::IndexField::IndexField(const std::vector<vespalib::string> &lines)
: Field(lines),
_avgElemLen(ConfigParser::parse<int32_t>("averageelementlen", lines, 512)),
- _experimental_posting_list_format(ConfigParser::parse<bool>("experimentalpostinglistformat", lines, false))
+ _interleaved_features(ConfigParser::parse<bool>("interleavedfeatures", lines, false))
{
}
@@ -156,7 +156,7 @@ Schema::IndexField::write(vespalib::asciistream & os, vespalib::stringref prefix
{
Field::write(os, prefix);
os << prefix << "averageelementlen " << static_cast<int32_t>(_avgElemLen) << "\n";
- os << prefix << "experimentalpostinglistformat " << (_experimental_posting_list_format ? "true" : "false") << "\n";
+ os << prefix << "interleavedfeatures " << (_interleaved_features ? "true" : "false") << "\n";
// TODO: Remove prefix, phrases and positions when breaking downgrade is no longer an issue.
os << prefix << "prefix false" << "\n";
@@ -169,7 +169,7 @@ Schema::IndexField::operator==(const IndexField &rhs) const
{
return Field::operator==(rhs) &&
_avgElemLen == rhs._avgElemLen &&
- _experimental_posting_list_format == rhs._experimental_posting_list_format;
+ _interleaved_features == rhs._interleaved_features;
}
bool
@@ -177,7 +177,7 @@ Schema::IndexField::operator!=(const IndexField &rhs) const
{
return Field::operator!=(rhs) ||
_avgElemLen != rhs._avgElemLen ||
- _experimental_posting_list_format != rhs._experimental_posting_list_format;
+ _interleaved_features != rhs._interleaved_features;
}
Schema::FieldSet::FieldSet(const std::vector<vespalib::string> & lines) :
diff --git a/searchcommon/src/vespa/searchcommon/common/schema.h b/searchcommon/src/vespa/searchcommon/common/schema.h
index bb2163e5577..0b675710e8b 100644
--- a/searchcommon/src/vespa/searchcommon/common/schema.h
+++ b/searchcommon/src/vespa/searchcommon/common/schema.h
@@ -77,8 +77,8 @@ public:
class IndexField : public Field {
private:
uint32_t _avgElemLen;
- // TODO: Remove when experimental posting list format is made default
- bool _experimental_posting_list_format;
+ // TODO: Remove when posting list format with interleaved features is made default
+ bool _interleaved_features;
public:
IndexField(vespalib::stringref name, DataType dt);
@@ -89,8 +89,8 @@ public:
IndexField(const std::vector<vespalib::string> &lines);
IndexField &setAvgElemLen(uint32_t avgElemLen) { _avgElemLen = avgElemLen; return *this; }
- IndexField &set_experimental_posting_list_format(bool value) {
- _experimental_posting_list_format = value;
+ IndexField &set_interleaved_features(bool value) {
+ _interleaved_features = value;
return *this;
}
@@ -98,7 +98,7 @@ public:
vespalib::stringref prefix) const override;
uint32_t getAvgElemLen() const { return _avgElemLen; }
- bool use_experimental_posting_list_format() const { return _experimental_posting_list_format; }
+ bool use_interleaved_features() const { return _interleaved_features; }
bool operator==(const IndexField &rhs) const;
bool operator!=(const IndexField &rhs) const;
diff --git a/searchcommon/src/vespa/searchcommon/common/schemaconfigurer.cpp b/searchcommon/src/vespa/searchcommon/common/schemaconfigurer.cpp
index 59ed15eefb0..a46f99d158d 100644
--- a/searchcommon/src/vespa/searchcommon/common/schemaconfigurer.cpp
+++ b/searchcommon/src/vespa/searchcommon/common/schemaconfigurer.cpp
@@ -145,7 +145,7 @@ SchemaBuilder::build(const IndexschemaConfig &cfg, Schema &schema)
schema.addIndexField(Schema::IndexField(f.name, convertIndexDataType(f.datatype),
convertIndexCollectionType(f.collectiontype)).
setAvgElemLen(f.averageelementlen).
- set_experimental_posting_list_format(f.experimentalpostinglistformat));
+ set_interleaved_features(f.interleavedfeatures));
}
for (size_t i = 0; i < cfg.fieldset.size(); ++i) {
const IndexschemaConfig::Fieldset &fs = cfg.fieldset[i];