aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTor Egge <Tor.Egge@online.no>2024-05-06 21:13:10 +0200
committerTor Egge <Tor.Egge@online.no>2024-05-06 21:13:10 +0200
commitf02ec01a4bfdccef4aefcc9d6597e889184698c5 (patch)
treee89c01199255689700ef2f26227a9d5bf6f4a4c8
parentfdc01d36af130d7edf38e13f070de94c2e55dc57 (diff)
Remove obsolete workaround for indexing exact-match fields.
-rw-r--r--searchlib/src/tests/util/token_extractor/token_extractor_test.cpp2
-rw-r--r--searchlib/src/vespa/searchlib/util/token_extractor.cpp2
-rw-r--r--searchsummary/src/tests/docsummary/tokens_converter/tokens_converter_test.cpp2
3 files changed, 2 insertions, 4 deletions
diff --git a/searchlib/src/tests/util/token_extractor/token_extractor_test.cpp b/searchlib/src/tests/util/token_extractor/token_extractor_test.cpp
index e6944e257e9..5eb42bb8ac4 100644
--- a/searchlib/src/tests/util/token_extractor/token_extractor_test.cpp
+++ b/searchlib/src/tests/util/token_extractor/token_extractor_test.cpp
@@ -118,7 +118,7 @@ TEST_F(TokenExtractorTest, empty_string)
TEST_F(TokenExtractorTest, plain_string)
{
- EXPECT_EQ((Words{"Plain string"}), process(StringFieldValue("Plain string")));
+ EXPECT_EQ((Words{}), process(StringFieldValue("Plain string")));
}
TEST_F(TokenExtractorTest, normal_string)
diff --git a/searchlib/src/vespa/searchlib/util/token_extractor.cpp b/searchlib/src/vespa/searchlib/util/token_extractor.cpp
index a78f30afe21..6e1573c4551 100644
--- a/searchlib/src/vespa/searchlib/util/token_extractor.cpp
+++ b/searchlib/src/vespa/searchlib/util/token_extractor.cpp
@@ -143,8 +143,6 @@ TokenExtractor::extract(std::vector<SpanTerm>& terms, const document::StringFiel
{
auto tree = StringFieldValue::findTree(trees, SPANTREE_NAME);
if (tree == nullptr) {
- /* field might not be annotated if match type is exact */
- consider_word(terms, text, Span(0, text.size()), nullptr, doc);
return;
}
for (const Annotation & annotation : *tree) {
diff --git a/searchsummary/src/tests/docsummary/tokens_converter/tokens_converter_test.cpp b/searchsummary/src/tests/docsummary/tokens_converter/tokens_converter_test.cpp
index 493cbe0ecba..3d92cee601a 100644
--- a/searchsummary/src/tests/docsummary/tokens_converter/tokens_converter_test.cpp
+++ b/searchsummary/src/tests/docsummary/tokens_converter/tokens_converter_test.cpp
@@ -149,7 +149,7 @@ TEST_F(TokensConverterTest, convert_empty_string)
TEST_F(TokensConverterTest, convert_plain_string)
{
- vespalib::string exp(R"(["Foo Bar Baz"])");
+ vespalib::string exp(R"([])");
StringFieldValue plain_string("Foo Bar Baz");
EXPECT_EQ(exp, convert(plain_string));
}