diff options
author | Tor Egge <Tor.Egge@online.no> | 2022-10-19 15:29:57 +0200 |
---|---|---|
committer | Tor Egge <Tor.Egge@online.no> | 2022-10-19 15:29:57 +0200 |
commit | b257e6579e5a03f499f5c8b197a095e3e9e4ec3c (patch) | |
tree | f15385ec10e1264ddd6d46d366afbe477ca4ac9f /searchsummary | |
parent | 046d64903a5d56d7fdcc05c12bd642a52d00c223 (diff) |
Remove SearchDataType::URI.
Diffstat (limited to 'searchsummary')
5 files changed, 0 insertions, 68 deletions
diff --git a/searchsummary/src/tests/docsummary/slime_filler/slime_filler_test.cpp b/searchsummary/src/tests/docsummary/slime_filler/slime_filler_test.cpp index 20d3af65458..ea0f6016da1 100644 --- a/searchsummary/src/tests/docsummary/slime_filler/slime_filler_test.cpp +++ b/searchsummary/src/tests/docsummary/slime_filler/slime_filler_test.cpp @@ -452,19 +452,6 @@ TEST_F(SlimeFillerTest, insert_position) } } -TEST_F(SlimeFillerTest, insert_uri) -{ - StructFieldValue uri(get_data_type("url")); - uri.setValue("all", StringFieldValue("http://www.example.com:42/foobar?q#frag")); - uri.setValue("scheme", StringFieldValue("http")); - uri.setValue("host", StringFieldValue("www.example.com")); - uri.setValue("port", StringFieldValue("42")); - uri.setValue("path", StringFieldValue("foobar")); - uri.setValue("query", StringFieldValue("q")); - uri.setValue("fragment", StringFieldValue("frag")); - expect_insert(R"("http://www.example.com:42/foobar?q#frag")", uri); -} - TEST_F(SlimeFillerTest, insert_predicate) { auto input = std::make_unique<Slime>(); diff --git a/searchsummary/src/vespa/searchsummary/docsummary/CMakeLists.txt b/searchsummary/src/vespa/searchsummary/docsummary/CMakeLists.txt index e69752f3b81..142fdfd8a28 100644 --- a/searchsummary/src/vespa/searchsummary/docsummary/CMakeLists.txt +++ b/searchsummary/src/vespa/searchsummary/docsummary/CMakeLists.txt @@ -31,7 +31,6 @@ vespa_add_library(searchsummary_docsummary OBJECT res_config_entry.cpp resultclass.cpp resultconfig.cpp - searchdatatype.cpp simple_dfw.cpp slime_filler.cpp slime_filler_filter.cpp diff --git a/searchsummary/src/vespa/searchsummary/docsummary/searchdatatype.cpp b/searchsummary/src/vespa/searchsummary/docsummary/searchdatatype.cpp deleted file mode 100644 index 21ac42757b1..00000000000 --- a/searchsummary/src/vespa/searchsummary/docsummary/searchdatatype.cpp +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. - -#include "searchdatatype.h" -#include <vespa/document/datatype/primitivedatatype.h> -#include <vespa/document/datatype/structdatatype.h> - -using document::DataType; -using document::Field; -using document::PrimitiveDataType; -using document::StructDataType; - -namespace search::docsummary { - -namespace { - -PrimitiveDataType STRING_OBJ(DataType::T_STRING); -StructDataType URI_OBJ("url"); - -const StructDataType *setUpUriType() { - URI_OBJ.addField(Field("all", STRING_OBJ)); - URI_OBJ.addField(Field("scheme", STRING_OBJ)); - URI_OBJ.addField(Field("host", STRING_OBJ)); - URI_OBJ.addField(Field("port", STRING_OBJ)); - URI_OBJ.addField(Field("path", STRING_OBJ)); - URI_OBJ.addField(Field("query", STRING_OBJ)); - URI_OBJ.addField(Field("fragment", STRING_OBJ)); - return &URI_OBJ; -} -} // namespace - -const DataType *SearchDataType::URI(setUpUriType()); - -} diff --git a/searchsummary/src/vespa/searchsummary/docsummary/searchdatatype.h b/searchsummary/src/vespa/searchsummary/docsummary/searchdatatype.h deleted file mode 100644 index e124466763d..00000000000 --- a/searchsummary/src/vespa/searchsummary/docsummary/searchdatatype.h +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. - -#pragma once - -#include <vespa/document/datatype/datatype.h> - -namespace search::docsummary { - -struct SearchDataType { - static const document::DataType *URI; -}; - -} diff --git a/searchsummary/src/vespa/searchsummary/docsummary/slime_filler.cpp b/searchsummary/src/vespa/searchsummary/docsummary/slime_filler.cpp index 87cc5f4fe6a..8763d064c35 100644 --- a/searchsummary/src/vespa/searchsummary/docsummary/slime_filler.cpp +++ b/searchsummary/src/vespa/searchsummary/docsummary/slime_filler.cpp @@ -5,7 +5,6 @@ #include "i_juniper_converter.h" #include "i_string_field_converter.h" #include "resultconfig.h" -#include "searchdatatype.h" #include "slime_filler_filter.h" #include <vespa/document/datatype/positiondatatype.h> #include <vespa/document/fieldvalue/arrayfieldvalue.h> @@ -266,13 +265,6 @@ SlimeFiller::visit(const StructFieldValue& value) return; } } - if (*value.getDataType() == *SearchDataType::URI) { - FieldValue::UP uriAllValue = value.getValue("all"); - if (uriAllValue && uriAllValue->isA(FieldValue::Type::STRING)) { - uriAllValue->accept(*this); - return; - } - } Cursor& c = _inserter.insertObject(); for (StructFieldValue::const_iterator itr = value.begin(); itr != value.end(); ++itr) { auto& name = itr.field().getName(); |