diff options
Diffstat (limited to 'searchsummary')
212 files changed, 674 insertions, 337 deletions
diff --git a/searchsummary/CMakeLists.txt b/searchsummary/CMakeLists.txt index 47d5756f3ee..f771a8e4494 100644 --- a/searchsummary/CMakeLists.txt +++ b/searchsummary/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +# Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. vespa_define_module( DEPENDS vespalog @@ -20,6 +20,7 @@ vespa_define_module( src/tests/docsummary/attribute_combiner src/tests/docsummary/attributedfw src/tests/docsummary/document_id_dfw + src/tests/docsummary/tokens_converter src/tests/docsummary/matched_elements_filter src/tests/docsummary/query_term_filter_factory src/tests/docsummary/result_class diff --git a/searchsummary/pom.xml b/searchsummary/pom.xml index d7501d19618..c1fc08a3740 100644 --- a/searchsummary/pom.xml +++ b/searchsummary/pom.xml @@ -1,4 +1,4 @@ -<!-- Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. --> +<!-- Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. --> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 diff --git a/searchsummary/src/tests/docsummary/CMakeLists.txt b/searchsummary/src/tests/docsummary/CMakeLists.txt index 4cd12eb4db6..9f5d767c094 100644 --- a/searchsummary/src/tests/docsummary/CMakeLists.txt +++ b/searchsummary/src/tests/docsummary/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +# Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. vespa_add_executable(searchsummary_positionsdfw_test_app TEST SOURCES positionsdfw_test.cpp diff --git a/searchsummary/src/tests/docsummary/annotation_converter/CMakeLists.txt b/searchsummary/src/tests/docsummary/annotation_converter/CMakeLists.txt index 22e0d3e6477..cfd65e28bae 100644 --- a/searchsummary/src/tests/docsummary/annotation_converter/CMakeLists.txt +++ b/searchsummary/src/tests/docsummary/annotation_converter/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +# Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. vespa_add_executable(searchsummary_annotation_converter_test_app TEST SOURCES annotation_converter_test.cpp diff --git a/searchsummary/src/tests/docsummary/annotation_converter/annotation_converter_test.cpp b/searchsummary/src/tests/docsummary/annotation_converter/annotation_converter_test.cpp index 17a7457711d..0a05e078382 100644 --- a/searchsummary/src/tests/docsummary/annotation_converter/annotation_converter_test.cpp +++ b/searchsummary/src/tests/docsummary/annotation_converter/annotation_converter_test.cpp @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include <vespa/document/annotation/annotation.h> #include <vespa/document/annotation/span.h> @@ -9,9 +9,9 @@ #include <vespa/document/repo/configbuilder.h> #include <vespa/document/repo/fixedtyperepo.h> #include <vespa/juniper/juniper_separators.h> +#include <vespa/searchlib/util/linguisticsannotation.h> #include <vespa/searchsummary/docsummary/annotation_converter.h> #include <vespa/searchsummary/docsummary/i_juniper_converter.h> -#include <vespa/searchsummary/docsummary/linguisticsannotation.h> #include <vespa/vespalib/data/slime/slime.h> #include <vespa/vespalib/gtest/gtest.h> #include <vespa/vespalib/stllike/asciistream.h> diff --git a/searchsummary/src/tests/docsummary/attribute_combiner/CMakeLists.txt b/searchsummary/src/tests/docsummary/attribute_combiner/CMakeLists.txt index 8a82b2efb94..36f9cd5535d 100644 --- a/searchsummary/src/tests/docsummary/attribute_combiner/CMakeLists.txt +++ b/searchsummary/src/tests/docsummary/attribute_combiner/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +# Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. vespa_add_executable(searchsummary_attribute_combiner_test_app TEST SOURCES attribute_combiner_test.cpp diff --git a/searchsummary/src/tests/docsummary/attribute_combiner/attribute_combiner_test.cpp b/searchsummary/src/tests/docsummary/attribute_combiner/attribute_combiner_test.cpp index 005fed41838..ebb11e20f89 100644 --- a/searchsummary/src/tests/docsummary/attribute_combiner/attribute_combiner_test.cpp +++ b/searchsummary/src/tests/docsummary/attribute_combiner/attribute_combiner_test.cpp @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include <vespa/searchcommon/common/undefinedvalues.h> #include <vespa/searchlib/attribute/attributevector.h> diff --git a/searchsummary/src/tests/docsummary/attributedfw/CMakeLists.txt b/searchsummary/src/tests/docsummary/attributedfw/CMakeLists.txt index 09d56ba065d..c5b220474ba 100644 --- a/searchsummary/src/tests/docsummary/attributedfw/CMakeLists.txt +++ b/searchsummary/src/tests/docsummary/attributedfw/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +# Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. vespa_add_executable(searchsummary_attributedfw_test_app TEST SOURCES attributedfw_test.cpp diff --git a/searchsummary/src/tests/docsummary/attributedfw/attributedfw_test.cpp b/searchsummary/src/tests/docsummary/attributedfw/attributedfw_test.cpp index 88b3423a199..71b5f5be0b9 100644 --- a/searchsummary/src/tests/docsummary/attributedfw/attributedfw_test.cpp +++ b/searchsummary/src/tests/docsummary/attributedfw/attributedfw_test.cpp @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include <vespa/searchlib/common/matching_elements_fields.h> #include <vespa/searchsummary/docsummary/attributedfw.h> diff --git a/searchsummary/src/tests/docsummary/document_id_dfw/CMakeLists.txt b/searchsummary/src/tests/docsummary/document_id_dfw/CMakeLists.txt index 3591a36c8de..6dc3168c78a 100644 --- a/searchsummary/src/tests/docsummary/document_id_dfw/CMakeLists.txt +++ b/searchsummary/src/tests/docsummary/document_id_dfw/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +# Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. vespa_add_executable(searchsummary_document_id_dfw_test_app TEST SOURCES document_id_dfw_test.cpp diff --git a/searchsummary/src/tests/docsummary/document_id_dfw/document_id_dfw_test.cpp b/searchsummary/src/tests/docsummary/document_id_dfw/document_id_dfw_test.cpp index 8dfdd1877f1..99fd5197540 100644 --- a/searchsummary/src/tests/docsummary/document_id_dfw/document_id_dfw_test.cpp +++ b/searchsummary/src/tests/docsummary/document_id_dfw/document_id_dfw_test.cpp @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include <vespa/document/base/documentid.h> #include <vespa/document/datatype/documenttype.h> diff --git a/searchsummary/src/tests/docsummary/matched_elements_filter/CMakeLists.txt b/searchsummary/src/tests/docsummary/matched_elements_filter/CMakeLists.txt index 701adf59268..b4d6eabe44a 100644 --- a/searchsummary/src/tests/docsummary/matched_elements_filter/CMakeLists.txt +++ b/searchsummary/src/tests/docsummary/matched_elements_filter/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +# Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. vespa_add_executable(searchsummary_matched_elements_filter_test_app TEST SOURCES matched_elements_filter_test.cpp diff --git a/searchsummary/src/tests/docsummary/matched_elements_filter/matched_elements_filter_test.cpp b/searchsummary/src/tests/docsummary/matched_elements_filter/matched_elements_filter_test.cpp index 7b83dbe2c4e..c5a309993f1 100644 --- a/searchsummary/src/tests/docsummary/matched_elements_filter/matched_elements_filter_test.cpp +++ b/searchsummary/src/tests/docsummary/matched_elements_filter/matched_elements_filter_test.cpp @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include <vespa/document/datatype/documenttype.h> #include <vespa/document/datatype/arraydatatype.h> diff --git a/searchsummary/src/tests/docsummary/positionsdfw_test.cpp b/searchsummary/src/tests/docsummary/positionsdfw_test.cpp index 778a0b145ce..28af522089b 100644 --- a/searchsummary/src/tests/docsummary/positionsdfw_test.cpp +++ b/searchsummary/src/tests/docsummary/positionsdfw_test.cpp @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include <vespa/juniper/rpinterface.h> #include <vespa/searchlib/attribute/extendableattributes.h> diff --git a/searchsummary/src/tests/docsummary/query_term_filter_factory/CMakeLists.txt b/searchsummary/src/tests/docsummary/query_term_filter_factory/CMakeLists.txt index 12138948aca..842722cd05e 100644 --- a/searchsummary/src/tests/docsummary/query_term_filter_factory/CMakeLists.txt +++ b/searchsummary/src/tests/docsummary/query_term_filter_factory/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +# Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. vespa_add_executable(searchsummary_query_term_filter_factory_test_app TEST SOURCES query_term_filter_factory_test.cpp diff --git a/searchsummary/src/tests/docsummary/query_term_filter_factory/query_term_filter_factory_test.cpp b/searchsummary/src/tests/docsummary/query_term_filter_factory/query_term_filter_factory_test.cpp index c966edb3958..55c8bccef27 100644 --- a/searchsummary/src/tests/docsummary/query_term_filter_factory/query_term_filter_factory_test.cpp +++ b/searchsummary/src/tests/docsummary/query_term_filter_factory/query_term_filter_factory_test.cpp @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include <vespa/searchcommon/common/schema.h> #include <vespa/searchsummary/docsummary/i_query_term_filter.h> diff --git a/searchsummary/src/tests/docsummary/result_class/CMakeLists.txt b/searchsummary/src/tests/docsummary/result_class/CMakeLists.txt index 3b941aec244..6882408f669 100644 --- a/searchsummary/src/tests/docsummary/result_class/CMakeLists.txt +++ b/searchsummary/src/tests/docsummary/result_class/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +# Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. vespa_add_executable(searchsummary_result_class_test_app TEST SOURCES result_class_test.cpp diff --git a/searchsummary/src/tests/docsummary/result_class/result_class_test.cpp b/searchsummary/src/tests/docsummary/result_class/result_class_test.cpp index f5790c20b80..2c84e92d21a 100644 --- a/searchsummary/src/tests/docsummary/result_class/result_class_test.cpp +++ b/searchsummary/src/tests/docsummary/result_class/result_class_test.cpp @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include <vespa/searchsummary/docsummary/docsum_field_writer.h> #include <vespa/searchsummary/docsummary/resultclass.h> diff --git a/searchsummary/src/tests/docsummary/slime_filler/CMakeLists.txt b/searchsummary/src/tests/docsummary/slime_filler/CMakeLists.txt index 807a2fe734d..a435430bca2 100644 --- a/searchsummary/src/tests/docsummary/slime_filler/CMakeLists.txt +++ b/searchsummary/src/tests/docsummary/slime_filler/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +# Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. vespa_add_executable(searchsummary_slime_filler_test_app TEST SOURCES slime_filler_test.cpp 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 ea0f6016da1..c20f9570ef8 100644 --- a/searchsummary/src/tests/docsummary/slime_filler/slime_filler_test.cpp +++ b/searchsummary/src/tests/docsummary/slime_filler/slime_filler_test.cpp @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include <vespa/document/base/documentid.h> #include <vespa/document/datatype/documenttype.h> @@ -68,6 +68,7 @@ using search::docsummary::IStringFieldConverter; using search::docsummary::ResultConfig; using search::docsummary::SlimeFiller; using search::docsummary::SlimeFillerFilter; +using vespalib::Memory; using vespalib::SimpleBuffer; using vespalib::Slime; using vespalib::eval::SimpleValue; @@ -146,17 +147,27 @@ get_document_types_config() class MockStringFieldConverter : public IStringFieldConverter { std::vector<vespalib::string> _result; + bool _render_wset_as_array; + bool _insert; public: - MockStringFieldConverter() + MockStringFieldConverter(bool render_wset_as_array, bool insert) : IStringFieldConverter(), - _result() + _result(), + _render_wset_as_array(render_wset_as_array), + _insert(insert) { } ~MockStringFieldConverter() override = default; - void convert(const document::StringFieldValue& input, vespalib::slime::Inserter&) override { + void convert(const document::StringFieldValue& input, vespalib::slime::Inserter& inserter) override { _result.emplace_back(input.getValueRef()); + if (_insert) { + inserter.insertString(Memory(input.getValueRef())); + } } const std::vector<vespalib::string>& get_result() const noexcept { return _result; } + bool render_weighted_set_as_array() const override { + return _render_wset_as_array; + } }; } @@ -188,6 +199,7 @@ protected: void expect_insert_summary_field_with_filter(const vespalib::string& exp, const FieldValue& fv, const std::vector<uint32_t>& matching_elems); void expect_insert_summary_field_with_field_filter(const vespalib::string& exp, const FieldValue& fv, const SlimeFillerFilter* filter); void expect_insert_juniper_field(const std::vector<vespalib::string>& exp, const vespalib::string& exp_slime, const FieldValue& fv); + void expect_insert_summary_field_with_converter(const std::vector<vespalib::string>& exp, const vespalib::string& exp_slime, const FieldValue& fv, MockStringFieldConverter& converter); }; SlimeFillerTest::SlimeFillerTest() @@ -317,7 +329,7 @@ SlimeFillerTest::expect_insert_callback(const std::vector<vespalib::string>& exp { Slime slime; SlimeInserter inserter(slime); - MockStringFieldConverter converter; + MockStringFieldConverter converter(false, false); SlimeFiller filler(inserter, &converter, SlimeFillerFilter::all()); fv.accept(filler); auto act_null = slime_to_string(slime); @@ -351,7 +363,7 @@ SlimeFillerTest::expect_insert_summary_field_with_field_filter(const vespalib::s { Slime slime; SlimeInserter inserter(slime); - SlimeFiller::insert_summary_field_with_field_filter(fv, inserter, filter); + SlimeFiller::insert_summary_field_with_field_filter(fv, inserter, nullptr, filter); auto act = slime_to_string(slime); EXPECT_EQ(exp, act); } @@ -361,7 +373,7 @@ SlimeFillerTest::expect_insert_juniper_field(const std::vector<vespalib::string> { Slime slime; SlimeInserter inserter(slime); - MockStringFieldConverter converter; + MockStringFieldConverter converter(false, false); SlimeFiller::insert_juniper_field(fv, inserter, converter); auto act_slime = slime_to_string(slime); EXPECT_EQ(exp_slime, act_slime); @@ -369,6 +381,18 @@ SlimeFillerTest::expect_insert_juniper_field(const std::vector<vespalib::string> EXPECT_EQ(exp, act); } +void +SlimeFillerTest::expect_insert_summary_field_with_converter(const std::vector<vespalib::string>& exp, const vespalib::string& exp_slime, const FieldValue& fv, MockStringFieldConverter& converter) +{ + Slime slime; + SlimeInserter inserter(slime); + SlimeFiller::insert_summary_field(fv, inserter, &converter); + auto act_slime = slime_to_string(slime); + EXPECT_EQ(exp_slime, act_slime); + auto act = converter.get_result(); + EXPECT_EQ(exp, act); +} + TEST_F(SlimeFillerTest, insert_primitive_values) { { @@ -625,4 +649,16 @@ TEST_F(SlimeFillerTest, insert_juniper_field) expect_insert_juniper_field({}, "null", make_empty_array()); } +TEST_F(SlimeFillerTest, string_field_is_not_converted_for_weighted_set_rendering) +{ + MockStringFieldConverter cvt_as_wset(false, true); + expect_insert_summary_field_with_converter({}, R"([{"item":"foo","weight":2},{"item":"bar","weight":4},{"item":"baz","weight":6}])", make_weighted_set(), cvt_as_wset); +} + +TEST_F(SlimeFillerTest, weighted_set_can_be_rendered_as_array) +{ + MockStringFieldConverter cvt_as_array(true, true); + expect_insert_summary_field_with_converter({"foo","bar","baz"}, R"(["foo","bar","baz"])", make_weighted_set(), cvt_as_array); +} + GTEST_MAIN_RUN_ALL_TESTS() diff --git a/searchsummary/src/tests/docsummary/slime_filler_filter/CMakeLists.txt b/searchsummary/src/tests/docsummary/slime_filler_filter/CMakeLists.txt index 2f886a24a95..47ab5eafd21 100644 --- a/searchsummary/src/tests/docsummary/slime_filler_filter/CMakeLists.txt +++ b/searchsummary/src/tests/docsummary/slime_filler_filter/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +# Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. vespa_add_executable(searchsummary_slime_filler_filter_test_app TEST SOURCES slime_filler_filter_test.cpp diff --git a/searchsummary/src/tests/docsummary/slime_filler_filter/slime_filler_filter_test.cpp b/searchsummary/src/tests/docsummary/slime_filler_filter/slime_filler_filter_test.cpp index 9211981679b..37aeb09a1f1 100644 --- a/searchsummary/src/tests/docsummary/slime_filler_filter/slime_filler_filter_test.cpp +++ b/searchsummary/src/tests/docsummary/slime_filler_filter/slime_filler_filter_test.cpp @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include <vespa/searchsummary/docsummary/slime_filler_filter.h> #include <vespa/vespalib/gtest/gtest.h> diff --git a/searchsummary/src/tests/docsummary/slime_summary/CMakeLists.txt b/searchsummary/src/tests/docsummary/slime_summary/CMakeLists.txt index 26456dae395..943e65a59bc 100644 --- a/searchsummary/src/tests/docsummary/slime_summary/CMakeLists.txt +++ b/searchsummary/src/tests/docsummary/slime_summary/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +# Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. vespa_add_executable(searchsummary_slime_summary_test_app TEST SOURCES slime_summary_test.cpp diff --git a/searchsummary/src/tests/docsummary/slime_summary/slime_summary_test.cpp b/searchsummary/src/tests/docsummary/slime_summary/slime_summary_test.cpp index 7077f707247..7ab114ccd23 100644 --- a/searchsummary/src/tests/docsummary/slime_summary/slime_summary_test.cpp +++ b/searchsummary/src/tests/docsummary/slime_summary/slime_summary_test.cpp @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include <vespa/document/base/documentid.h> #include <vespa/document/datatype/documenttype.h> diff --git a/searchsummary/src/tests/docsummary/tokens_converter/CMakeLists.txt b/searchsummary/src/tests/docsummary/tokens_converter/CMakeLists.txt new file mode 100644 index 00000000000..68885a74b1b --- /dev/null +++ b/searchsummary/src/tests/docsummary/tokens_converter/CMakeLists.txt @@ -0,0 +1,10 @@ +# Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +vespa_add_executable(searchsummary_tokens_converter_test_app TEST + SOURCES + tokens_converter_test.cpp + DEPENDS + searchsummary + GTest::gtest +) + +vespa_add_test(NAME searchsummary_tokens_converter_test_app COMMAND searchsummary_tokens_converter_test_app) diff --git a/searchsummary/src/tests/docsummary/tokens_converter/tokens_converter_test.cpp b/searchsummary/src/tests/docsummary/tokens_converter/tokens_converter_test.cpp new file mode 100644 index 00000000000..493cbe0ecba --- /dev/null +++ b/searchsummary/src/tests/docsummary/tokens_converter/tokens_converter_test.cpp @@ -0,0 +1,178 @@ +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. + +#include <vespa/document/annotation/annotation.h> +#include <vespa/document/annotation/span.h> +#include <vespa/document/annotation/spanlist.h> +#include <vespa/document/annotation/spantree.h> +#include <vespa/document/datatype/annotationtype.h> +#include <vespa/document/fieldvalue/stringfieldvalue.h> +#include <vespa/document/repo/configbuilder.h> +#include <vespa/document/repo/fixedtyperepo.h> +#include <vespa/searchlib/util/linguisticsannotation.h> +#include <vespa/searchlib/util/token_extractor.h> +#include <vespa/searchsummary/docsummary/tokens_converter.h> +#include <vespa/vespalib/data/simple_buffer.h> +#include <vespa/vespalib/data/slime/json_format.h> +#include <vespa/vespalib/data/slime/slime.h> +#include <vespa/vespalib/gtest/gtest.h> + +using document::Annotation; +using document::AnnotationType; +using document::DocumentType; +using document::DocumentTypeRepo; +using document::Span; +using document::SpanList; +using document::SpanTree; +using document::StringFieldValue; +using search::docsummary::TokensConverter; +using search::linguistics::SPANTREE_NAME; +using search::linguistics::TokenExtractor; +using vespalib::SimpleBuffer; +using vespalib::Slime; +using vespalib::slime::JsonFormat; +using vespalib::slime::SlimeInserter; + +namespace { + +vespalib::string +slime_to_string(const Slime& slime) +{ + SimpleBuffer buf; + JsonFormat::encode(slime, buf, true); + return buf.get().make_string(); +} + +DocumenttypesConfig +get_document_types_config() +{ + using namespace document::config_builder; + DocumenttypesConfigBuilderHelper builder; + builder.document(42, "indexingdocument", + Struct("indexingdocument.header"), + Struct("indexingdocument.body")); + return builder.config(); +} + +} + +class TokensConverterTest : public testing::Test +{ +protected: + std::shared_ptr<const DocumentTypeRepo> _repo; + const DocumentType* _document_type; + document::FixedTypeRepo _fixed_repo; + vespalib::string _dummy_field_name; + TokenExtractor _token_extractor; + + TokensConverterTest(); + ~TokensConverterTest() override; + void set_span_tree(StringFieldValue& value, std::unique_ptr<SpanTree> tree); + StringFieldValue make_annotated_string(bool alt_tokens); + StringFieldValue make_annotated_chinese_string(); + vespalib::string make_exp_annotated_chinese_string_tokens(); + vespalib::string convert(const StringFieldValue& fv); +}; + +TokensConverterTest::TokensConverterTest() + : testing::Test(), + _repo(std::make_unique<DocumentTypeRepo>(get_document_types_config())), + _document_type(_repo->getDocumentType("indexingdocument")), + _fixed_repo(*_repo, *_document_type), + _dummy_field_name(), + _token_extractor(_dummy_field_name, 100) +{ +} + +TokensConverterTest::~TokensConverterTest() = default; + +void +TokensConverterTest::set_span_tree(StringFieldValue & value, std::unique_ptr<SpanTree> tree) +{ + StringFieldValue::SpanTrees trees; + trees.push_back(std::move(tree)); + value.setSpanTrees(trees, _fixed_repo); +} + +StringFieldValue +TokensConverterTest::make_annotated_string(bool alt_tokens) +{ + auto span_list_up = std::make_unique<SpanList>(); + auto span_list = span_list_up.get(); + auto tree = std::make_unique<SpanTree>(SPANTREE_NAME, std::move(span_list_up)); + tree->annotate(span_list->add(std::make_unique<Span>(0, 3)), *AnnotationType::TERM); + if (alt_tokens) { + tree->annotate(span_list->add(std::make_unique<Span>(4, 3)), *AnnotationType::TERM); + } + tree->annotate(span_list->add(std::make_unique<Span>(4, 3)), + Annotation(*AnnotationType::TERM, std::make_unique<StringFieldValue>("baz"))); + StringFieldValue value("foo bar"); + set_span_tree(value, std::move(tree)); + return value; +} + +StringFieldValue +TokensConverterTest::make_annotated_chinese_string() +{ + auto span_list_up = std::make_unique<SpanList>(); + auto span_list = span_list_up.get(); + auto tree = std::make_unique<SpanTree>(SPANTREE_NAME, std::move(span_list_up)); + // These chinese characters each use 3 bytes in their UTF8 encoding. + tree->annotate(span_list->add(std::make_unique<Span>(0, 15)), *AnnotationType::TERM); + tree->annotate(span_list->add(std::make_unique<Span>(15, 9)), *AnnotationType::TERM); + StringFieldValue value("我就是那个大灰狼"); + set_span_tree(value, std::move(tree)); + return value; +} + +vespalib::string +TokensConverterTest::make_exp_annotated_chinese_string_tokens() +{ + return R"(["我就是那个","大灰狼"])"; +} + +vespalib::string +TokensConverterTest::convert(const StringFieldValue& fv) +{ + TokensConverter converter(_token_extractor); + Slime slime; + SlimeInserter inserter(slime); + converter.convert(fv, inserter); + return slime_to_string(slime); +} + +TEST_F(TokensConverterTest, convert_empty_string) +{ + vespalib::string exp(R"([])"); + StringFieldValue plain_string(""); + EXPECT_EQ(exp, convert(plain_string)); +} + +TEST_F(TokensConverterTest, convert_plain_string) +{ + vespalib::string exp(R"(["Foo Bar Baz"])"); + StringFieldValue plain_string("Foo Bar Baz"); + EXPECT_EQ(exp, convert(plain_string)); +} + +TEST_F(TokensConverterTest, convert_annotated_string) +{ + vespalib::string exp(R"(["foo","baz"])"); + auto annotated_string = make_annotated_string(false); + EXPECT_EQ(exp, convert(annotated_string)); +} + +TEST_F(TokensConverterTest, convert_annotated_string_with_alternatives) +{ + vespalib::string exp(R"(["foo",["bar","baz"]])"); + auto annotated_string = make_annotated_string(true); + EXPECT_EQ(exp, convert(annotated_string)); +} + +TEST_F(TokensConverterTest, convert_annotated_chinese_string) +{ + auto exp = make_exp_annotated_chinese_string_tokens(); + auto annotated_chinese_string = make_annotated_chinese_string(); + EXPECT_EQ(exp, convert(annotated_chinese_string)); +} + +GTEST_MAIN_RUN_ALL_TESTS() diff --git a/searchsummary/src/tests/juniper/CMakeLists.txt b/searchsummary/src/tests/juniper/CMakeLists.txt index 77e7052a429..e25eb01e85c 100644 --- a/searchsummary/src/tests/juniper/CMakeLists.txt +++ b/searchsummary/src/tests/juniper/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +# Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. vespa_add_library(juniper_testsuite SOURCES test.cpp diff --git a/searchsummary/src/tests/juniper/SrcTestSuite.cpp b/searchsummary/src/tests/juniper/SrcTestSuite.cpp index 870c7b9f378..955ed01fd85 100644 --- a/searchsummary/src/tests/juniper/SrcTestSuite.cpp +++ b/searchsummary/src/tests/juniper/SrcTestSuite.cpp @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include "testenv.h" #include "suite.h" diff --git a/searchsummary/src/tests/juniper/appender_test.cpp b/searchsummary/src/tests/juniper/appender_test.cpp index 65e876f1a35..97d07998e3f 100644 --- a/searchsummary/src/tests/juniper/appender_test.cpp +++ b/searchsummary/src/tests/juniper/appender_test.cpp @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include <vespa/vespalib/testkit/testapp.h> #define _NEED_SUMMARY_CONFIG_IMPL diff --git a/searchsummary/src/tests/juniper/auxTest.cpp b/searchsummary/src/tests/juniper/auxTest.cpp index f4c5254cc1b..b5c3bb91d05 100644 --- a/searchsummary/src/tests/juniper/auxTest.cpp +++ b/searchsummary/src/tests/juniper/auxTest.cpp @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include "auxTest.h" #include <vespa/juniper/juniper_separators.h> diff --git a/searchsummary/src/tests/juniper/auxTest.h b/searchsummary/src/tests/juniper/auxTest.h index 70d7c8e6d23..2a40a482355 100644 --- a/searchsummary/src/tests/juniper/auxTest.h +++ b/searchsummary/src/tests/juniper/auxTest.h @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once // Auxiliary tests for juniper - based on Juniper 1.x proximitytest.cpp diff --git a/searchsummary/src/tests/juniper/auxTestApp.cpp b/searchsummary/src/tests/juniper/auxTestApp.cpp index 5090e2d7dfc..62b2d3f934c 100644 --- a/searchsummary/src/tests/juniper/auxTestApp.cpp +++ b/searchsummary/src/tests/juniper/auxTestApp.cpp @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include "auxTest.h" #include <vespa/vespalib/testkit/testapp.h> diff --git a/searchsummary/src/tests/juniper/fakerewriter.cpp b/searchsummary/src/tests/juniper/fakerewriter.cpp index bbaf7079525..0f44157fb39 100644 --- a/searchsummary/src/tests/juniper/fakerewriter.cpp +++ b/searchsummary/src/tests/juniper/fakerewriter.cpp @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include "fakerewriter.h" #include <vespa/vespalib/util/stringfmt.h> diff --git a/searchsummary/src/tests/juniper/fakerewriter.h b/searchsummary/src/tests/juniper/fakerewriter.h index e1e5de59feb..954612de4a6 100644 --- a/searchsummary/src/tests/juniper/fakerewriter.h +++ b/searchsummary/src/tests/juniper/fakerewriter.h @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once #include <vespa/juniper/rewriter.h> diff --git a/searchsummary/src/tests/juniper/latintokenizertest.cpp b/searchsummary/src/tests/juniper/latintokenizertest.cpp index 89273ab1ec0..ead272ff628 100644 --- a/searchsummary/src/tests/juniper/latintokenizertest.cpp +++ b/searchsummary/src/tests/juniper/latintokenizertest.cpp @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include "latintokenizertest.h" int main(int, char **) { diff --git a/searchsummary/src/tests/juniper/latintokenizertest.h b/searchsummary/src/tests/juniper/latintokenizertest.h index d06a3ae9289..93d5c5dea66 100644 --- a/searchsummary/src/tests/juniper/latintokenizertest.h +++ b/searchsummary/src/tests/juniper/latintokenizertest.h @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once #include "test.h" diff --git a/searchsummary/src/tests/juniper/matchobjectTest.cpp b/searchsummary/src/tests/juniper/matchobjectTest.cpp index f1dc9f81e4a..260e1823e34 100644 --- a/searchsummary/src/tests/juniper/matchobjectTest.cpp +++ b/searchsummary/src/tests/juniper/matchobjectTest.cpp @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. /* * Author: Knut Omang */ diff --git a/searchsummary/src/tests/juniper/matchobjectTest.h b/searchsummary/src/tests/juniper/matchobjectTest.h index f85973e7dd6..635310dd96d 100644 --- a/searchsummary/src/tests/juniper/matchobjectTest.h +++ b/searchsummary/src/tests/juniper/matchobjectTest.h @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. /* * Author: Knut Omang */ diff --git a/searchsummary/src/tests/juniper/matchobjectTestApp.cpp b/searchsummary/src/tests/juniper/matchobjectTestApp.cpp index 8bdebfe7207..bd199f9d1d6 100644 --- a/searchsummary/src/tests/juniper/matchobjectTestApp.cpp +++ b/searchsummary/src/tests/juniper/matchobjectTestApp.cpp @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include "matchobjectTest.h" #include "testenv.h" diff --git a/searchsummary/src/tests/juniper/mcandTest.cpp b/searchsummary/src/tests/juniper/mcandTest.cpp index 43d34539ddf..f4607dd8c35 100644 --- a/searchsummary/src/tests/juniper/mcandTest.cpp +++ b/searchsummary/src/tests/juniper/mcandTest.cpp @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. /* * Author: Knut Omang */ diff --git a/searchsummary/src/tests/juniper/mcandTest.h b/searchsummary/src/tests/juniper/mcandTest.h index 37613c6b9ab..54f95abb417 100644 --- a/searchsummary/src/tests/juniper/mcandTest.h +++ b/searchsummary/src/tests/juniper/mcandTest.h @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. /* * Author Knut Omang */ diff --git a/searchsummary/src/tests/juniper/mcandTestApp.cpp b/searchsummary/src/tests/juniper/mcandTestApp.cpp index 7b1a15934d3..38a3cdee367 100644 --- a/searchsummary/src/tests/juniper/mcandTestApp.cpp +++ b/searchsummary/src/tests/juniper/mcandTestApp.cpp @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include "mcandTest.h" #include <vespa/vespalib/testkit/testapp.h> diff --git a/searchsummary/src/tests/juniper/queryparserTest.cpp b/searchsummary/src/tests/juniper/queryparserTest.cpp index e8afbcc0cee..a35a52aca04 100644 --- a/searchsummary/src/tests/juniper/queryparserTest.cpp +++ b/searchsummary/src/tests/juniper/queryparserTest.cpp @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. /* * Author Knut Omang */ diff --git a/searchsummary/src/tests/juniper/queryparserTest.h b/searchsummary/src/tests/juniper/queryparserTest.h index 45d2e966e99..9059221e5b6 100644 --- a/searchsummary/src/tests/juniper/queryparserTest.h +++ b/searchsummary/src/tests/juniper/queryparserTest.h @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. /* * Author Knut Omang */ diff --git a/searchsummary/src/tests/juniper/queryparserTestApp.cpp b/searchsummary/src/tests/juniper/queryparserTestApp.cpp index c34f0b77ae9..95fd198cffe 100644 --- a/searchsummary/src/tests/juniper/queryparserTestApp.cpp +++ b/searchsummary/src/tests/juniper/queryparserTestApp.cpp @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include "queryparserTest.h" #include "testenv.h" diff --git a/searchsummary/src/tests/juniper/queryvisitor_test.cpp b/searchsummary/src/tests/juniper/queryvisitor_test.cpp index abb14dc1b16..3e656ccb0f6 100644 --- a/searchsummary/src/tests/juniper/queryvisitor_test.cpp +++ b/searchsummary/src/tests/juniper/queryvisitor_test.cpp @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include <memory> #include <vespa/vespalib/testkit/testapp.h> diff --git a/searchsummary/src/tests/juniper/suite.h b/searchsummary/src/tests/juniper/suite.h index fea685731ae..2062e15f3f2 100644 --- a/searchsummary/src/tests/juniper/suite.h +++ b/searchsummary/src/tests/juniper/suite.h @@ -1,11 +1,11 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. /************************************************************************** * Author: Bård Kvalheim * * A test suite. Modified from the suite written by Chuck Allison. * http://www.cuj.com/archive/1809/feature.html * - * Licensed to Yahoo, and relicensed under the terms of the Apache 2.0 license + * Licensed to Vespa.ai, and relicensed under the terms of the Apache 2.0 license * * The usage of suite is simple: * diff --git a/searchsummary/src/tests/juniper/test.cpp b/searchsummary/src/tests/juniper/test.cpp index 18930b1bca2..a9875375e31 100644 --- a/searchsummary/src/tests/juniper/test.cpp +++ b/searchsummary/src/tests/juniper/test.cpp @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include "test.h" diff --git a/searchsummary/src/tests/juniper/test.h b/searchsummary/src/tests/juniper/test.h index 1388c3ba812..f0234beddd7 100644 --- a/searchsummary/src/tests/juniper/test.h +++ b/searchsummary/src/tests/juniper/test.h @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. /************************************************************************** * Author: Bård Kvalheim * diff --git a/searchsummary/src/tests/juniper/testclient.rc b/searchsummary/src/tests/juniper/testclient.rc index d04262c364c..3860f487faa 100644 --- a/searchsummary/src/tests/juniper/testclient.rc +++ b/searchsummary/src/tests/juniper/testclient.rc @@ -1,4 +1,4 @@ -# Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +# Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. ## Dynamic teasers ## Some sensible default values ## This file is used by the testclient application by default, diff --git a/searchsummary/src/tests/juniper/testenv.cpp b/searchsummary/src/tests/juniper/testenv.cpp index 1f8f52d8766..f65becb1ce1 100644 --- a/searchsummary/src/tests/juniper/testenv.cpp +++ b/searchsummary/src/tests/juniper/testenv.cpp @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. /* Setup and parameter parsing for static Juniper environment to reuse * within test framework */ diff --git a/searchsummary/src/tests/juniper/testenv.h b/searchsummary/src/tests/juniper/testenv.h index 11b975d0888..da7c7418fa6 100644 --- a/searchsummary/src/tests/juniper/testenv.h +++ b/searchsummary/src/tests/juniper/testenv.h @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once /* Include most of the stuff that we might need */ diff --git a/searchsummary/src/vespa/juniper/CMakeLists.txt b/searchsummary/src/vespa/juniper/CMakeLists.txt index 1d47885b1a9..1d25223a457 100644 --- a/searchsummary/src/vespa/juniper/CMakeLists.txt +++ b/searchsummary/src/vespa/juniper/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +# Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. vespa_add_library(searchsummary_juniper OBJECT SOURCES Matcher.cpp diff --git a/searchsummary/src/vespa/juniper/IJuniperProperties.h b/searchsummary/src/vespa/juniper/IJuniperProperties.h index 4902d3d561d..6472492aa88 100644 --- a/searchsummary/src/vespa/juniper/IJuniperProperties.h +++ b/searchsummary/src/vespa/juniper/IJuniperProperties.h @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once diff --git a/searchsummary/src/vespa/juniper/ITokenProcessor.h b/searchsummary/src/vespa/juniper/ITokenProcessor.h index fbb9a93075c..812ec160eb1 100644 --- a/searchsummary/src/vespa/juniper/ITokenProcessor.h +++ b/searchsummary/src/vespa/juniper/ITokenProcessor.h @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once #include <vespa/fastlib/text/unicodeutil.h> diff --git a/searchsummary/src/vespa/juniper/Matcher.cpp b/searchsummary/src/vespa/juniper/Matcher.cpp index 73362aac5a3..5978dce9fc8 100644 --- a/searchsummary/src/vespa/juniper/Matcher.cpp +++ b/searchsummary/src/vespa/juniper/Matcher.cpp @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include "query.h" #include "juniperdebug.h" diff --git a/searchsummary/src/vespa/juniper/Matcher.h b/searchsummary/src/vespa/juniper/Matcher.h index a23fd225cf3..3ff4f36e2d6 100644 --- a/searchsummary/src/vespa/juniper/Matcher.h +++ b/searchsummary/src/vespa/juniper/Matcher.h @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. /* $Id$ */ #pragma once diff --git a/searchsummary/src/vespa/juniper/SummaryConfig.cpp b/searchsummary/src/vespa/juniper/SummaryConfig.cpp index 5b009ea5cd2..efd4dc1d1a8 100644 --- a/searchsummary/src/vespa/juniper/SummaryConfig.cpp +++ b/searchsummary/src/vespa/juniper/SummaryConfig.cpp @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #define _NEED_SUMMARY_CONFIG_IMPL 1 #include "SummaryConfig.h" diff --git a/searchsummary/src/vespa/juniper/SummaryConfig.h b/searchsummary/src/vespa/juniper/SummaryConfig.h index fdf4cdcaae1..6e8c80f2962 100644 --- a/searchsummary/src/vespa/juniper/SummaryConfig.h +++ b/searchsummary/src/vespa/juniper/SummaryConfig.h @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. // #pragma once #include <string> diff --git a/searchsummary/src/vespa/juniper/appender.cpp b/searchsummary/src/vespa/juniper/appender.cpp index 4d55f62a27a..d1c7ec201e6 100644 --- a/searchsummary/src/vespa/juniper/appender.cpp +++ b/searchsummary/src/vespa/juniper/appender.cpp @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include "appender.h" #include "juniperdebug.h" diff --git a/searchsummary/src/vespa/juniper/appender.h b/searchsummary/src/vespa/juniper/appender.h index 760fd18feca..4597b830d31 100644 --- a/searchsummary/src/vespa/juniper/appender.h +++ b/searchsummary/src/vespa/juniper/appender.h @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once #include <vespa/vespalib/util/hdr_abort.h> diff --git a/searchsummary/src/vespa/juniper/charutil.h b/searchsummary/src/vespa/juniper/charutil.h index 859bb6e6ed9..04c782cb08e 100644 --- a/searchsummary/src/vespa/juniper/charutil.h +++ b/searchsummary/src/vespa/juniper/charutil.h @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once namespace juniper diff --git a/searchsummary/src/vespa/juniper/config.cpp b/searchsummary/src/vespa/juniper/config.cpp index 5859ea8336e..bd21f21d7c6 100644 --- a/searchsummary/src/vespa/juniper/config.cpp +++ b/searchsummary/src/vespa/juniper/config.cpp @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include "config.h" #include "rpinterface.h" diff --git a/searchsummary/src/vespa/juniper/config.h b/searchsummary/src/vespa/juniper/config.h index 51e2c67cfae..6db60c30203 100644 --- a/searchsummary/src/vespa/juniper/config.h +++ b/searchsummary/src/vespa/juniper/config.h @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once #include "juniperparams.h" diff --git a/searchsummary/src/vespa/juniper/dpinterface.cpp b/searchsummary/src/vespa/juniper/dpinterface.cpp index 7b7c5aa7120..0c28fa4142f 100644 --- a/searchsummary/src/vespa/juniper/dpinterface.cpp +++ b/searchsummary/src/vespa/juniper/dpinterface.cpp @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. /* $Id$ */ #include "dpinterface.h" diff --git a/searchsummary/src/vespa/juniper/dpinterface.h b/searchsummary/src/vespa/juniper/dpinterface.h index b5f302152c6..df9cb583013 100644 --- a/searchsummary/src/vespa/juniper/dpinterface.h +++ b/searchsummary/src/vespa/juniper/dpinterface.h @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once diff --git a/searchsummary/src/vespa/juniper/expcache.cpp b/searchsummary/src/vespa/juniper/expcache.cpp index 7436054932b..0a6b0636c38 100644 --- a/searchsummary/src/vespa/juniper/expcache.cpp +++ b/searchsummary/src/vespa/juniper/expcache.cpp @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include "expcache.h" #include "matchobject.h" diff --git a/searchsummary/src/vespa/juniper/expcache.h b/searchsummary/src/vespa/juniper/expcache.h index 5f16397d69a..9a0d7602c94 100644 --- a/searchsummary/src/vespa/juniper/expcache.h +++ b/searchsummary/src/vespa/juniper/expcache.h @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once #include "simplemap.h" diff --git a/searchsummary/src/vespa/juniper/hashbase.h b/searchsummary/src/vespa/juniper/hashbase.h index 6231aa97114..788b24e703e 100644 --- a/searchsummary/src/vespa/juniper/hashbase.h +++ b/searchsummary/src/vespa/juniper/hashbase.h @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once #include <stdio.h> diff --git a/searchsummary/src/vespa/juniper/juniper_separators.cpp b/searchsummary/src/vespa/juniper/juniper_separators.cpp index 9342d3d34dc..007fa0c5d2e 100644 --- a/searchsummary/src/vespa/juniper/juniper_separators.cpp +++ b/searchsummary/src/vespa/juniper/juniper_separators.cpp @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include "juniper_separators.h" diff --git a/searchsummary/src/vespa/juniper/juniper_separators.h b/searchsummary/src/vespa/juniper/juniper_separators.h index 03b0945138b..9d5ba8afcf6 100644 --- a/searchsummary/src/vespa/juniper/juniper_separators.h +++ b/searchsummary/src/vespa/juniper/juniper_separators.h @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once diff --git a/searchsummary/src/vespa/juniper/juniperdebug.h b/searchsummary/src/vespa/juniper/juniperdebug.h index f6d4eda2c46..35bbba9fd6b 100644 --- a/searchsummary/src/vespa/juniper/juniperdebug.h +++ b/searchsummary/src/vespa/juniper/juniperdebug.h @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once // Include something from STL so that _STLPORT_VERSION gets defined if appropriate diff --git a/searchsummary/src/vespa/juniper/juniperparams.cpp b/searchsummary/src/vespa/juniper/juniperparams.cpp index e5a63440fd6..fa55996d354 100644 --- a/searchsummary/src/vespa/juniper/juniperparams.cpp +++ b/searchsummary/src/vespa/juniper/juniperparams.cpp @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include "juniperparams.h" #include <cstring> diff --git a/searchsummary/src/vespa/juniper/juniperparams.h b/searchsummary/src/vespa/juniper/juniperparams.h index 77422b02677..f4cc8c6a8da 100644 --- a/searchsummary/src/vespa/juniper/juniperparams.h +++ b/searchsummary/src/vespa/juniper/juniperparams.h @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once #include <string> diff --git a/searchsummary/src/vespa/juniper/keyocc.cpp b/searchsummary/src/vespa/juniper/keyocc.cpp index 7214bc72fe9..effbfb3e23d 100644 --- a/searchsummary/src/vespa/juniper/keyocc.cpp +++ b/searchsummary/src/vespa/juniper/keyocc.cpp @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include "keyocc.h" key_occ::key_occ(const char* term_, off_t spos, off_t stoken, int len) : diff --git a/searchsummary/src/vespa/juniper/keyocc.h b/searchsummary/src/vespa/juniper/keyocc.h index f211b5bdf61..80b45532dc4 100644 --- a/searchsummary/src/vespa/juniper/keyocc.h +++ b/searchsummary/src/vespa/juniper/keyocc.h @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once #include "matchelem.h" diff --git a/searchsummary/src/vespa/juniper/latintokenizer.h b/searchsummary/src/vespa/juniper/latintokenizer.h index 1b0b49d7329..0f5dd684565 100644 --- a/searchsummary/src/vespa/juniper/latintokenizer.h +++ b/searchsummary/src/vespa/juniper/latintokenizer.h @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. /** ***************************************************************************** * @author Bård Kvalheim diff --git a/searchsummary/src/vespa/juniper/matchelem.cpp b/searchsummary/src/vespa/juniper/matchelem.cpp index 27c4c9516e9..8ceac25a612 100644 --- a/searchsummary/src/vespa/juniper/matchelem.cpp +++ b/searchsummary/src/vespa/juniper/matchelem.cpp @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include "matchelem.h" diff --git a/searchsummary/src/vespa/juniper/matchelem.h b/searchsummary/src/vespa/juniper/matchelem.h index b8061c9213f..743df79b0da 100644 --- a/searchsummary/src/vespa/juniper/matchelem.h +++ b/searchsummary/src/vespa/juniper/matchelem.h @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. /* $Id: */ #pragma once diff --git a/searchsummary/src/vespa/juniper/matchobject.cpp b/searchsummary/src/vespa/juniper/matchobject.cpp index 60b14cd5bca..7bd0bead5cd 100644 --- a/searchsummary/src/vespa/juniper/matchobject.cpp +++ b/searchsummary/src/vespa/juniper/matchobject.cpp @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include "query.h" #include "matchobject.h" diff --git a/searchsummary/src/vespa/juniper/matchobject.h b/searchsummary/src/vespa/juniper/matchobject.h index 5ab90c1a61e..d31e071d688 100644 --- a/searchsummary/src/vespa/juniper/matchobject.h +++ b/searchsummary/src/vespa/juniper/matchobject.h @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once #include "queryhandle.h" diff --git a/searchsummary/src/vespa/juniper/mcand.cpp b/searchsummary/src/vespa/juniper/mcand.cpp index e30a0f42d1d..d41b819dcb3 100644 --- a/searchsummary/src/vespa/juniper/mcand.cpp +++ b/searchsummary/src/vespa/juniper/mcand.cpp @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include "mcand.h" #include "Matcher.h" diff --git a/searchsummary/src/vespa/juniper/mcand.h b/searchsummary/src/vespa/juniper/mcand.h index 46e095fd5cb..9736c189073 100644 --- a/searchsummary/src/vespa/juniper/mcand.h +++ b/searchsummary/src/vespa/juniper/mcand.h @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. /* $Id$ */ #pragma once diff --git a/searchsummary/src/vespa/juniper/propreader.cpp b/searchsummary/src/vespa/juniper/propreader.cpp index bd20c885f6c..9a6670d1312 100644 --- a/searchsummary/src/vespa/juniper/propreader.cpp +++ b/searchsummary/src/vespa/juniper/propreader.cpp @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include "propreader.h" #include <vespa/fastlib/io/bufferedfile.h> diff --git a/searchsummary/src/vespa/juniper/propreader.h b/searchsummary/src/vespa/juniper/propreader.h index 45557716cd0..ec0484a7397 100644 --- a/searchsummary/src/vespa/juniper/propreader.h +++ b/searchsummary/src/vespa/juniper/propreader.h @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once #include "IJuniperProperties.h" diff --git a/searchsummary/src/vespa/juniper/query.h b/searchsummary/src/vespa/juniper/query.h index f75949c6d06..87d3231cd2d 100644 --- a/searchsummary/src/vespa/juniper/query.h +++ b/searchsummary/src/vespa/juniper/query.h @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once diff --git a/searchsummary/src/vespa/juniper/query_item.h b/searchsummary/src/vespa/juniper/query_item.h index d69ede53c92..527fa7c541e 100644 --- a/searchsummary/src/vespa/juniper/query_item.h +++ b/searchsummary/src/vespa/juniper/query_item.h @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once diff --git a/searchsummary/src/vespa/juniper/queryhandle.cpp b/searchsummary/src/vespa/juniper/queryhandle.cpp index ab2e24970fd..87d677d6893 100644 --- a/searchsummary/src/vespa/juniper/queryhandle.cpp +++ b/searchsummary/src/vespa/juniper/queryhandle.cpp @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include "query.h" #include "queryhandle.h" diff --git a/searchsummary/src/vespa/juniper/queryhandle.h b/searchsummary/src/vespa/juniper/queryhandle.h index a829af7f147..6e50d85507a 100644 --- a/searchsummary/src/vespa/juniper/queryhandle.h +++ b/searchsummary/src/vespa/juniper/queryhandle.h @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. /* $Id$ */ #pragma once diff --git a/searchsummary/src/vespa/juniper/querymodifier.cpp b/searchsummary/src/vespa/juniper/querymodifier.cpp index 8531455d742..fbcc7bf2085 100644 --- a/searchsummary/src/vespa/juniper/querymodifier.cpp +++ b/searchsummary/src/vespa/juniper/querymodifier.cpp @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include "juniperdebug.h" #include "querymodifier.h" diff --git a/searchsummary/src/vespa/juniper/querymodifier.h b/searchsummary/src/vespa/juniper/querymodifier.h index 5816740033f..2787a604462 100644 --- a/searchsummary/src/vespa/juniper/querymodifier.h +++ b/searchsummary/src/vespa/juniper/querymodifier.h @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once #include "simplemap.h" diff --git a/searchsummary/src/vespa/juniper/querynode.cpp b/searchsummary/src/vespa/juniper/querynode.cpp index 1a7a80333c7..5d6469f10f2 100644 --- a/searchsummary/src/vespa/juniper/querynode.cpp +++ b/searchsummary/src/vespa/juniper/querynode.cpp @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include "querynode.h" #include "queryvisitor.h" diff --git a/searchsummary/src/vespa/juniper/querynode.h b/searchsummary/src/vespa/juniper/querynode.h index 1c269097940..5ff7310e752 100644 --- a/searchsummary/src/vespa/juniper/querynode.h +++ b/searchsummary/src/vespa/juniper/querynode.h @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. /* $Id$ */ #pragma once diff --git a/searchsummary/src/vespa/juniper/queryparser.cpp b/searchsummary/src/vespa/juniper/queryparser.cpp index 482c4820289..90f92a05f75 100644 --- a/searchsummary/src/vespa/juniper/queryparser.cpp +++ b/searchsummary/src/vespa/juniper/queryparser.cpp @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. // /* Simple prefix query parser for Juniper for debugging purposes */ diff --git a/searchsummary/src/vespa/juniper/queryparser.h b/searchsummary/src/vespa/juniper/queryparser.h index a69971f5c8a..b7461027433 100644 --- a/searchsummary/src/vespa/juniper/queryparser.h +++ b/searchsummary/src/vespa/juniper/queryparser.h @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once /* Simple prefix syntax advanced query parser for Juniper debug/testing */ diff --git a/searchsummary/src/vespa/juniper/queryvisitor.cpp b/searchsummary/src/vespa/juniper/queryvisitor.cpp index ad06e8ee872..73301f3119f 100644 --- a/searchsummary/src/vespa/juniper/queryvisitor.cpp +++ b/searchsummary/src/vespa/juniper/queryvisitor.cpp @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include "query.h" #include "juniperdebug.h" diff --git a/searchsummary/src/vespa/juniper/queryvisitor.h b/searchsummary/src/vespa/juniper/queryvisitor.h index 8566e4ff73e..def4b26480a 100644 --- a/searchsummary/src/vespa/juniper/queryvisitor.h +++ b/searchsummary/src/vespa/juniper/queryvisitor.h @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once #include "rpinterface.h" diff --git a/searchsummary/src/vespa/juniper/reducematcher.cpp b/searchsummary/src/vespa/juniper/reducematcher.cpp index 642daae9773..5170bd6d902 100644 --- a/searchsummary/src/vespa/juniper/reducematcher.cpp +++ b/searchsummary/src/vespa/juniper/reducematcher.cpp @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include "juniperdebug.h" #include "reducematcher.h" diff --git a/searchsummary/src/vespa/juniper/reducematcher.h b/searchsummary/src/vespa/juniper/reducematcher.h index 6be27fcd7ea..eccb3a56ba2 100644 --- a/searchsummary/src/vespa/juniper/reducematcher.h +++ b/searchsummary/src/vespa/juniper/reducematcher.h @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once #include "rewriter.h" diff --git a/searchsummary/src/vespa/juniper/result.cpp b/searchsummary/src/vespa/juniper/result.cpp index 46e33209d52..e83d97cd600 100644 --- a/searchsummary/src/vespa/juniper/result.cpp +++ b/searchsummary/src/vespa/juniper/result.cpp @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #define _NEED_SUMMARY_CONFIG_IMPL 1 #include "SummaryConfig.h" diff --git a/searchsummary/src/vespa/juniper/result.h b/searchsummary/src/vespa/juniper/result.h index dcbb89fb1dc..072ad9ea0ff 100644 --- a/searchsummary/src/vespa/juniper/result.h +++ b/searchsummary/src/vespa/juniper/result.h @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once #include "queryhandle.h" diff --git a/searchsummary/src/vespa/juniper/rewriter.h b/searchsummary/src/vespa/juniper/rewriter.h index 92542da5acc..fc33870d8ae 100644 --- a/searchsummary/src/vespa/juniper/rewriter.h +++ b/searchsummary/src/vespa/juniper/rewriter.h @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. /* $Id$ */ #pragma once diff --git a/searchsummary/src/vespa/juniper/rpinterface.cpp b/searchsummary/src/vespa/juniper/rpinterface.cpp index 702cfb11f4d..f2f9d7a1f1a 100644 --- a/searchsummary/src/vespa/juniper/rpinterface.cpp +++ b/searchsummary/src/vespa/juniper/rpinterface.cpp @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include "rpinterface.h" #include "juniperparams.h" diff --git a/searchsummary/src/vespa/juniper/rpinterface.h b/searchsummary/src/vespa/juniper/rpinterface.h index b6612f2a5b7..3c87d58a87d 100644 --- a/searchsummary/src/vespa/juniper/rpinterface.h +++ b/searchsummary/src/vespa/juniper/rpinterface.h @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. /* $Id$ */ #pragma once diff --git a/searchsummary/src/vespa/juniper/simplemap.h b/searchsummary/src/vespa/juniper/simplemap.h index 079637de231..f1288275a0f 100644 --- a/searchsummary/src/vespa/juniper/simplemap.h +++ b/searchsummary/src/vespa/juniper/simplemap.h @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once #include <map> diff --git a/searchsummary/src/vespa/juniper/specialtokenregistry.cpp b/searchsummary/src/vespa/juniper/specialtokenregistry.cpp index cda8bc0fcd7..c66035d78e1 100644 --- a/searchsummary/src/vespa/juniper/specialtokenregistry.cpp +++ b/searchsummary/src/vespa/juniper/specialtokenregistry.cpp @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include "specialtokenregistry.h" diff --git a/searchsummary/src/vespa/juniper/specialtokenregistry.h b/searchsummary/src/vespa/juniper/specialtokenregistry.h index 2240dcf65b0..d55e46348c3 100644 --- a/searchsummary/src/vespa/juniper/specialtokenregistry.h +++ b/searchsummary/src/vespa/juniper/specialtokenregistry.h @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once diff --git a/searchsummary/src/vespa/juniper/stringmap.cpp b/searchsummary/src/vespa/juniper/stringmap.cpp index 3cb9e9b62e0..be010b9a59b 100644 --- a/searchsummary/src/vespa/juniper/stringmap.cpp +++ b/searchsummary/src/vespa/juniper/stringmap.cpp @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include "stringmap.h" #include <vespa/vespalib/stllike/hashtable.hpp> diff --git a/searchsummary/src/vespa/juniper/stringmap.h b/searchsummary/src/vespa/juniper/stringmap.h index 4b6265695ad..36c3b6b8afc 100644 --- a/searchsummary/src/vespa/juniper/stringmap.h +++ b/searchsummary/src/vespa/juniper/stringmap.h @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once #include <vespa/vespalib/stllike/hash_map.h> diff --git a/searchsummary/src/vespa/juniper/sumdesc.cpp b/searchsummary/src/vespa/juniper/sumdesc.cpp index e88f7971666..914b380bdb8 100644 --- a/searchsummary/src/vespa/juniper/sumdesc.cpp +++ b/searchsummary/src/vespa/juniper/sumdesc.cpp @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include "sumdesc.h" #include "juniperdebug.h" diff --git a/searchsummary/src/vespa/juniper/sumdesc.h b/searchsummary/src/vespa/juniper/sumdesc.h index c1e230f1bf4..fd2e682471c 100644 --- a/searchsummary/src/vespa/juniper/sumdesc.h +++ b/searchsummary/src/vespa/juniper/sumdesc.h @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once /* $Id$ */ diff --git a/searchsummary/src/vespa/juniper/tokenizer.cpp b/searchsummary/src/vespa/juniper/tokenizer.cpp index 965befe01e3..cd3c9c410ce 100644 --- a/searchsummary/src/vespa/juniper/tokenizer.cpp +++ b/searchsummary/src/vespa/juniper/tokenizer.cpp @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. // #include "tokenizer.h" #include "juniperdebug.h" diff --git a/searchsummary/src/vespa/juniper/tokenizer.h b/searchsummary/src/vespa/juniper/tokenizer.h index bf0c9452665..68ef8118f5d 100644 --- a/searchsummary/src/vespa/juniper/tokenizer.h +++ b/searchsummary/src/vespa/juniper/tokenizer.h @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once #include "specialtokenregistry.h" diff --git a/searchsummary/src/vespa/juniper/wildcard_match.h b/searchsummary/src/vespa/juniper/wildcard_match.h index 2cde4364693..2fb9dc9c8a4 100644 --- a/searchsummary/src/vespa/juniper/wildcard_match.h +++ b/searchsummary/src/vespa/juniper/wildcard_match.h @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once namespace fast diff --git a/searchsummary/src/vespa/searchsummary/CMakeLists.txt b/searchsummary/src/vespa/searchsummary/CMakeLists.txt index 6ec91622980..56a62b14767 100644 --- a/searchsummary/src/vespa/searchsummary/CMakeLists.txt +++ b/searchsummary/src/vespa/searchsummary/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +# Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. vespa_add_library(searchsummary SOURCES $<TARGET_OBJECTS:searchsummary_config> diff --git a/searchsummary/src/vespa/searchsummary/config/CMakeLists.txt b/searchsummary/src/vespa/searchsummary/config/CMakeLists.txt index 083f09a44e2..5d4e697b19d 100644 --- a/searchsummary/src/vespa/searchsummary/config/CMakeLists.txt +++ b/searchsummary/src/vespa/searchsummary/config/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +# Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. vespa_add_library(searchsummary_config OBJECT SOURCES DEPENDS diff --git a/searchsummary/src/vespa/searchsummary/config/juniperrc.def b/searchsummary/src/vespa/searchsummary/config/juniperrc.def index 9146e4539b8..e2a7c6f96ca 100644 --- a/searchsummary/src/vespa/searchsummary/config/juniperrc.def +++ b/searchsummary/src/vespa/searchsummary/config/juniperrc.def @@ -1,4 +1,4 @@ -# Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +# Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. namespace=vespa.config.search.summary ## Set the length (in #characters) of the dynamically generated diff --git a/searchsummary/src/vespa/searchsummary/docsummary/CMakeLists.txt b/searchsummary/src/vespa/searchsummary/docsummary/CMakeLists.txt index 83da1e9fd30..0287517f830 100644 --- a/searchsummary/src/vespa/searchsummary/docsummary/CMakeLists.txt +++ b/searchsummary/src/vespa/searchsummary/docsummary/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +# Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. vespa_add_library(searchsummary_docsummary OBJECT SOURCES annotation_converter.cpp @@ -23,7 +23,6 @@ vespa_add_library(searchsummary_docsummary OBJECT juniper_dfw_term_visitor.cpp juniper_query_adapter.cpp juniperproperties.cpp - linguisticsannotation.cpp matched_elements_filter_dfw.cpp positionsdfw.cpp query_term_filter.cpp @@ -38,4 +37,6 @@ vespa_add_library(searchsummary_docsummary OBJECT struct_fields_resolver.cpp struct_map_attribute_combiner_dfw.cpp summaryfeaturesdfw.cpp + tokens_converter.cpp + tokens_dfw.cpp ) diff --git a/searchsummary/src/vespa/searchsummary/docsummary/annotation_converter.cpp b/searchsummary/src/vespa/searchsummary/docsummary/annotation_converter.cpp index f4594cba4f4..77724305220 100644 --- a/searchsummary/src/vespa/searchsummary/docsummary/annotation_converter.cpp +++ b/searchsummary/src/vespa/searchsummary/docsummary/annotation_converter.cpp @@ -1,30 +1,24 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include "annotation_converter.h" #include "i_juniper_converter.h" -#include "linguisticsannotation.h" -#include <vespa/document/annotation/alternatespanlist.h> #include <vespa/document/annotation/annotation.h> -#include <vespa/document/annotation/spantree.h> -#include <vespa/document/annotation/spantreevisitor.h> -#include <vespa/document/datatype/annotationtype.h> +#include <vespa/document/annotation/span.h> #include <vespa/document/fieldvalue/stringfieldvalue.h> #include <vespa/juniper/juniper_separators.h> +#include <vespa/searchlib/memoryindex/field_inverter.h> +#include <vespa/searchlib/util/linguisticsannotation.h> +#include <vespa/searchlib/util/token_extractor.h> #include <vespa/vespalib/stllike/asciistream.h> #include <vespa/vespalib/util/exceptions.h> #include <utility> -using document::AlternateSpanList; using document::Annotation; -using document::AnnotationType; using document::FieldValue; -using document::SimpleSpanList; using document::Span; -using document::SpanList; -using document::SpanNode; -using document::SpanTree; -using document::SpanTreeVisitor; using document::StringFieldValue; +using search::linguistics::TokenExtractor; +using search::memoryindex::FieldInverter; namespace search::docsummary { @@ -36,48 +30,7 @@ getSpanString(vespalib::stringref s, const Span &span) return {s.data() + span.from(), static_cast<size_t>(span.length())}; } -struct SpanFinder : SpanTreeVisitor { - int32_t begin_pos; - int32_t end_pos; - - SpanFinder() : begin_pos(0x7fffffff), end_pos(-1) {} - Span span() { return Span(begin_pos, end_pos - begin_pos); } - - void visit(const Span &node) override { - begin_pos = std::min(begin_pos, node.from()); - end_pos = std::max(end_pos, node.from() + node.length()); - } - void visit(const SpanList &node) override { - for (const auto & span_ : node) { - span_->accept(*this); - } - } - void visit(const SimpleSpanList &node) override { - for (const auto & span_ : node) { - span_.accept(*this); - } - } - void visit(const AlternateSpanList &node) override { - for (size_t i = 0; i < node.getNumSubtrees(); ++i) { - visit(node.getSubtree(i)); - } - } -}; - -Span getSpan(const SpanNode &span_node) { - SpanFinder finder; - span_node.accept(finder); - return finder.span(); -} - -const StringFieldValue &ensureStringFieldValue(const FieldValue &value) __attribute__((noinline)); - -const StringFieldValue &ensureStringFieldValue(const FieldValue &value) { - if (!value.isA(FieldValue::Type::STRING)) { - throw vespalib::IllegalArgumentException("Illegal field type. " + value.toString(), VESPA_STRLOC); - } - return static_cast<const StringFieldValue &>(value); -} +vespalib::string dummy_field_name; } @@ -95,7 +48,7 @@ template <typename ForwardIt> void AnnotationConverter::handleAnnotations(const document::Span& span, ForwardIt it, ForwardIt last) { int annCnt = (last - it); - if (annCnt > 1 || (annCnt == 1 && it->second)) { + if (annCnt > 1 || (annCnt == 1 && it->altered)) { annotateSpans(span, it, last); } else { _out << getSpanString(_text, span) << juniper::separators::unit_separator_string; @@ -109,11 +62,7 @@ AnnotationConverter::annotateSpans(const document::Span& span, ForwardIt it, For << (getSpanString(_text, span)) << juniper::separators::interlinear_annotation_separator_string; // SEPARATOR while (it != last) { - if (it->second) { - _out << ensureStringFieldValue(*it->second).getValue(); - } else { - _out << getSpanString(_text, span); - } + _out << it->word; if (++it != last) { _out << " "; } @@ -125,41 +74,24 @@ AnnotationConverter::annotateSpans(const document::Span& span, ForwardIt it, For void AnnotationConverter::handleIndexingTerms(const StringFieldValue& value) { - StringFieldValue::SpanTrees trees = value.getSpanTrees(); - const SpanTree *tree = StringFieldValue::findTree(trees, linguistics::SPANTREE_NAME); - using SpanTerm = std::pair<Span, const FieldValue *>; - using SpanTermVector = std::vector<SpanTerm>; - if (!tree) { - // Treat a string without annotations as a single span. - SpanTerm str(Span(0, _text.size()), - static_cast<const FieldValue*>(nullptr)); - handleAnnotations(str.first, &str, &str + 1); - return; - } - SpanTermVector terms; - for (const Annotation& annotation : *tree) { - // For now, skip any composite spans. - const auto *span = dynamic_cast<const Span*>(annotation.getSpanNode()); - if ((span != nullptr) && annotation.valid() && - (annotation.getType() == *AnnotationType::TERM)) { - terms.push_back(std::make_pair(getSpan(*span), - annotation.getFieldValue())); - } - } - sort(terms.begin(), terms.end()); + using SpanTerm = TokenExtractor::SpanTerm; + std::vector<SpanTerm> terms; + auto span_trees = value.getSpanTrees(); + TokenExtractor token_extractor(dummy_field_name, FieldInverter::max_word_len); + token_extractor.extract(terms, span_trees, _text, nullptr); auto it = terms.begin(); auto ite = terms.end(); int32_t endPos = 0; for (; it != ite; ) { auto it_begin = it; - if (it_begin->first.from() > endPos) { - Span tmpSpan(endPos, it_begin->first.from() - endPos); + if (it_begin->span.from() > endPos) { + Span tmpSpan(endPos, it_begin->span.from() - endPos); handleAnnotations(tmpSpan, it, it); - endPos = it_begin->first.from(); + endPos = it_begin->span.from(); } - for (; it != ite && it->first == it_begin->first; ++it); - handleAnnotations(it_begin->first, it_begin, it); - endPos = it_begin->first.from() + it_begin->first.length(); + for (; it != ite && it->span == it_begin->span; ++it); + handleAnnotations(it_begin->span, it_begin, it); + endPos = it_begin->span.from() + it_begin->span.length(); } int32_t wantEndPos = _text.size(); if (endPos < wantEndPos) { @@ -177,4 +109,10 @@ AnnotationConverter::convert(const StringFieldValue &input, vespalib::slime::Ins _juniper_converter.convert(_out.str(), inserter); } +bool +AnnotationConverter::render_weighted_set_as_array() const +{ + return false; +} + } diff --git a/searchsummary/src/vespa/searchsummary/docsummary/annotation_converter.h b/searchsummary/src/vespa/searchsummary/docsummary/annotation_converter.h index 59b03c64540..b082269eb7e 100644 --- a/searchsummary/src/vespa/searchsummary/docsummary/annotation_converter.h +++ b/searchsummary/src/vespa/searchsummary/docsummary/annotation_converter.h @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once @@ -33,6 +33,7 @@ public: AnnotationConverter(IJuniperConverter& juniper_converter); ~AnnotationConverter() override; void convert(const document::StringFieldValue &input, vespalib::slime::Inserter& inserter) override; + bool render_weighted_set_as_array() const override; }; } diff --git a/searchsummary/src/vespa/searchsummary/docsummary/array_attribute_combiner_dfw.cpp b/searchsummary/src/vespa/searchsummary/docsummary/array_attribute_combiner_dfw.cpp index e1f26f85ecd..7e383d372a3 100644 --- a/searchsummary/src/vespa/searchsummary/docsummary/array_attribute_combiner_dfw.cpp +++ b/searchsummary/src/vespa/searchsummary/docsummary/array_attribute_combiner_dfw.cpp @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include "array_attribute_combiner_dfw.h" #include "attribute_field_writer.h" diff --git a/searchsummary/src/vespa/searchsummary/docsummary/array_attribute_combiner_dfw.h b/searchsummary/src/vespa/searchsummary/docsummary/array_attribute_combiner_dfw.h index 478fc558915..f0af328bfe5 100644 --- a/searchsummary/src/vespa/searchsummary/docsummary/array_attribute_combiner_dfw.h +++ b/searchsummary/src/vespa/searchsummary/docsummary/array_attribute_combiner_dfw.h @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once diff --git a/searchsummary/src/vespa/searchsummary/docsummary/attribute_combiner_dfw.cpp b/searchsummary/src/vespa/searchsummary/docsummary/attribute_combiner_dfw.cpp index 889169f8888..443d064f4ee 100644 --- a/searchsummary/src/vespa/searchsummary/docsummary/attribute_combiner_dfw.cpp +++ b/searchsummary/src/vespa/searchsummary/docsummary/attribute_combiner_dfw.cpp @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include "array_attribute_combiner_dfw.h" #include "attribute_combiner_dfw.h" diff --git a/searchsummary/src/vespa/searchsummary/docsummary/attribute_combiner_dfw.h b/searchsummary/src/vespa/searchsummary/docsummary/attribute_combiner_dfw.h index edfeebf55fa..3cfadc3e2c5 100644 --- a/searchsummary/src/vespa/searchsummary/docsummary/attribute_combiner_dfw.h +++ b/searchsummary/src/vespa/searchsummary/docsummary/attribute_combiner_dfw.h @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once diff --git a/searchsummary/src/vespa/searchsummary/docsummary/attribute_field_writer.cpp b/searchsummary/src/vespa/searchsummary/docsummary/attribute_field_writer.cpp index 15125bd2172..57d67cb9a23 100644 --- a/searchsummary/src/vespa/searchsummary/docsummary/attribute_field_writer.cpp +++ b/searchsummary/src/vespa/searchsummary/docsummary/attribute_field_writer.cpp @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include "attribute_field_writer.h" #include <vespa/searchcommon/attribute/attributecontent.h> diff --git a/searchsummary/src/vespa/searchsummary/docsummary/attribute_field_writer.h b/searchsummary/src/vespa/searchsummary/docsummary/attribute_field_writer.h index 81824c826e2..173f69137c3 100644 --- a/searchsummary/src/vespa/searchsummary/docsummary/attribute_field_writer.h +++ b/searchsummary/src/vespa/searchsummary/docsummary/attribute_field_writer.h @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once diff --git a/searchsummary/src/vespa/searchsummary/docsummary/attributedfw.cpp b/searchsummary/src/vespa/searchsummary/docsummary/attributedfw.cpp index 6f0f6737c0f..4ec406b7cf0 100644 --- a/searchsummary/src/vespa/searchsummary/docsummary/attributedfw.cpp +++ b/searchsummary/src/vespa/searchsummary/docsummary/attributedfw.cpp @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include "attributedfw.h" #include "docsumwriter.h" diff --git a/searchsummary/src/vespa/searchsummary/docsummary/attributedfw.h b/searchsummary/src/vespa/searchsummary/docsummary/attributedfw.h index 922c8a81b2a..2d1eb71d248 100644 --- a/searchsummary/src/vespa/searchsummary/docsummary/attributedfw.h +++ b/searchsummary/src/vespa/searchsummary/docsummary/attributedfw.h @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once diff --git a/searchsummary/src/vespa/searchsummary/docsummary/check_undefined_value_visitor.cpp b/searchsummary/src/vespa/searchsummary/docsummary/check_undefined_value_visitor.cpp index 624efd5d834..e6be71a9049 100644 --- a/searchsummary/src/vespa/searchsummary/docsummary/check_undefined_value_visitor.cpp +++ b/searchsummary/src/vespa/searchsummary/docsummary/check_undefined_value_visitor.cpp @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include "check_undefined_value_visitor.h" #include <vespa/searchcommon/common/undefinedvalues.h> diff --git a/searchsummary/src/vespa/searchsummary/docsummary/check_undefined_value_visitor.h b/searchsummary/src/vespa/searchsummary/docsummary/check_undefined_value_visitor.h index e652d5d122b..4ba97c71276 100644 --- a/searchsummary/src/vespa/searchsummary/docsummary/check_undefined_value_visitor.h +++ b/searchsummary/src/vespa/searchsummary/docsummary/check_undefined_value_visitor.h @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once diff --git a/searchsummary/src/vespa/searchsummary/docsummary/copy_dfw.cpp b/searchsummary/src/vespa/searchsummary/docsummary/copy_dfw.cpp index 94e5420881b..89b8c74a9d7 100644 --- a/searchsummary/src/vespa/searchsummary/docsummary/copy_dfw.cpp +++ b/searchsummary/src/vespa/searchsummary/docsummary/copy_dfw.cpp @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include "copy_dfw.h" #include "i_docsum_store_document.h" diff --git a/searchsummary/src/vespa/searchsummary/docsummary/copy_dfw.h b/searchsummary/src/vespa/searchsummary/docsummary/copy_dfw.h index 62f3576096d..abcddc5a309 100644 --- a/searchsummary/src/vespa/searchsummary/docsummary/copy_dfw.h +++ b/searchsummary/src/vespa/searchsummary/docsummary/copy_dfw.h @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once diff --git a/searchsummary/src/vespa/searchsummary/docsummary/docsum_field_writer.cpp b/searchsummary/src/vespa/searchsummary/docsummary/docsum_field_writer.cpp index 452ca98ea0b..ffc0bcd3ec8 100644 --- a/searchsummary/src/vespa/searchsummary/docsummary/docsum_field_writer.cpp +++ b/searchsummary/src/vespa/searchsummary/docsummary/docsum_field_writer.cpp @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include "docsum_field_writer.h" diff --git a/searchsummary/src/vespa/searchsummary/docsummary/docsum_field_writer.h b/searchsummary/src/vespa/searchsummary/docsummary/docsum_field_writer.h index da29d7363cb..4aebcc71851 100644 --- a/searchsummary/src/vespa/searchsummary/docsummary/docsum_field_writer.h +++ b/searchsummary/src/vespa/searchsummary/docsummary/docsum_field_writer.h @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once diff --git a/searchsummary/src/vespa/searchsummary/docsummary/docsum_field_writer_commands.cpp b/searchsummary/src/vespa/searchsummary/docsummary/docsum_field_writer_commands.cpp index b04963a5907..2ac5d1babbf 100644 --- a/searchsummary/src/vespa/searchsummary/docsummary/docsum_field_writer_commands.cpp +++ b/searchsummary/src/vespa/searchsummary/docsummary/docsum_field_writer_commands.cpp @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include "docsum_field_writer_commands.h" @@ -17,6 +17,7 @@ const vespalib::string matched_elements_filter("matchedelementsfilter"); const vespalib::string positions("positions"); const vespalib::string rank_features("rankfeatures"); const vespalib::string summary_features("summaryfeatures"); +const vespalib::string tokens("tokens"); } diff --git a/searchsummary/src/vespa/searchsummary/docsummary/docsum_field_writer_commands.h b/searchsummary/src/vespa/searchsummary/docsummary/docsum_field_writer_commands.h index 8ca508a6b60..d53351d8b04 100644 --- a/searchsummary/src/vespa/searchsummary/docsummary/docsum_field_writer_commands.h +++ b/searchsummary/src/vespa/searchsummary/docsummary/docsum_field_writer_commands.h @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once @@ -23,5 +23,6 @@ extern const vespalib::string matched_elements_filter; extern const vespalib::string positions; extern const vespalib::string rank_features; extern const vespalib::string summary_features; +extern const vespalib::string tokens; } diff --git a/searchsummary/src/vespa/searchsummary/docsummary/docsum_field_writer_factory.cpp b/searchsummary/src/vespa/searchsummary/docsummary/docsum_field_writer_factory.cpp index 6ac4fea2921..2f7d9acdb65 100644 --- a/searchsummary/src/vespa/searchsummary/docsummary/docsum_field_writer_factory.cpp +++ b/searchsummary/src/vespa/searchsummary/docsummary/docsum_field_writer_factory.cpp @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include "attribute_combiner_dfw.h" #include "copy_dfw.h" @@ -13,6 +13,7 @@ #include "positionsdfw.h" #include "rankfeaturesdfw.h" #include "summaryfeaturesdfw.h" +#include "tokens_dfw.h" #include <vespa/searchlib/common/matching_elements_fields.h> #include <vespa/vespalib/util/exceptions.h> @@ -84,6 +85,12 @@ DocsumFieldWriterFactory::create_docsum_field_writer(const vespalib::string& fie } else { throw_missing_source(command); } + } else if (command == command::tokens) { + if (!source.empty()) { + fieldWriter = std::make_unique<TokensDFW>(source); + } else { + throw_missing_source(command); + } } else if (command == command::abs_distance) { if (has_attribute_manager()) { fieldWriter = AbsDistanceDFW::create(source.c_str(), getEnvironment().getAttributeManager()); diff --git a/searchsummary/src/vespa/searchsummary/docsummary/docsum_field_writer_factory.h b/searchsummary/src/vespa/searchsummary/docsummary/docsum_field_writer_factory.h index 7175f043701..d4f52811687 100644 --- a/searchsummary/src/vespa/searchsummary/docsummary/docsum_field_writer_factory.h +++ b/searchsummary/src/vespa/searchsummary/docsummary/docsum_field_writer_factory.h @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once diff --git a/searchsummary/src/vespa/searchsummary/docsummary/docsum_field_writer_state.h b/searchsummary/src/vespa/searchsummary/docsummary/docsum_field_writer_state.h index 0ea8780ba30..efacd0b1a49 100644 --- a/searchsummary/src/vespa/searchsummary/docsummary/docsum_field_writer_state.h +++ b/searchsummary/src/vespa/searchsummary/docsummary/docsum_field_writer_state.h @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once diff --git a/searchsummary/src/vespa/searchsummary/docsummary/docsum_store_document.cpp b/searchsummary/src/vespa/searchsummary/docsummary/docsum_store_document.cpp index f701b4796c1..63b71929d63 100644 --- a/searchsummary/src/vespa/searchsummary/docsummary/docsum_store_document.cpp +++ b/searchsummary/src/vespa/searchsummary/docsummary/docsum_store_document.cpp @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include "docsum_store_document.h" #include "annotation_converter.h" @@ -37,11 +37,11 @@ DocsumStoreDocument::get_field_value(const vespalib::string& field_name) const } void -DocsumStoreDocument::insert_summary_field(const vespalib::string& field_name, vespalib::slime::Inserter& inserter) const +DocsumStoreDocument::insert_summary_field(const vespalib::string& field_name, vespalib::slime::Inserter& inserter, IStringFieldConverter* converter) const { auto field_value = get_field_value(field_name); if (field_value) { - SlimeFiller::insert_summary_field(*field_value, inserter); + SlimeFiller::insert_summary_field(*field_value, inserter, converter); } } diff --git a/searchsummary/src/vespa/searchsummary/docsummary/docsum_store_document.h b/searchsummary/src/vespa/searchsummary/docsummary/docsum_store_document.h index 825b5fae81c..3d8ca8abcc1 100644 --- a/searchsummary/src/vespa/searchsummary/docsummary/docsum_store_document.h +++ b/searchsummary/src/vespa/searchsummary/docsummary/docsum_store_document.h @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once @@ -18,7 +18,7 @@ public: explicit DocsumStoreDocument(std::unique_ptr<document::Document> document); ~DocsumStoreDocument() override; DocsumStoreFieldValue get_field_value(const vespalib::string& field_name) const override; - void insert_summary_field(const vespalib::string& field_name, vespalib::slime::Inserter& inserter) const override; + void insert_summary_field(const vespalib::string& field_name, vespalib::slime::Inserter& inserter, IStringFieldConverter* converter) const override; void insert_juniper_field(const vespalib::string& field_name, vespalib::slime::Inserter& inserter, IJuniperConverter& converter) const override; void insert_document_id(vespalib::slime::Inserter& inserter) const override; }; diff --git a/searchsummary/src/vespa/searchsummary/docsummary/docsum_store_field_value.h b/searchsummary/src/vespa/searchsummary/docsummary/docsum_store_field_value.h index 71d4468a1c1..668b9e7a6ab 100644 --- a/searchsummary/src/vespa/searchsummary/docsummary/docsum_store_field_value.h +++ b/searchsummary/src/vespa/searchsummary/docsummary/docsum_store_field_value.h @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once diff --git a/searchsummary/src/vespa/searchsummary/docsummary/docsumstate.cpp b/searchsummary/src/vespa/searchsummary/docsummary/docsumstate.cpp index f1fee7e9ac3..9aa327f8e7b 100644 --- a/searchsummary/src/vespa/searchsummary/docsummary/docsumstate.cpp +++ b/searchsummary/src/vespa/searchsummary/docsummary/docsumstate.cpp @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include "docsumstate.h" #include "docsum_field_writer_state.h" diff --git a/searchsummary/src/vespa/searchsummary/docsummary/docsumstate.h b/searchsummary/src/vespa/searchsummary/docsummary/docsumstate.h index a765208cb9e..f2b80fa2886 100644 --- a/searchsummary/src/vespa/searchsummary/docsummary/docsumstate.h +++ b/searchsummary/src/vespa/searchsummary/docsummary/docsumstate.h @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once diff --git a/searchsummary/src/vespa/searchsummary/docsummary/docsumstore.h b/searchsummary/src/vespa/searchsummary/docsummary/docsumstore.h index 22bf516caaa..c62249b9b2b 100644 --- a/searchsummary/src/vespa/searchsummary/docsummary/docsumstore.h +++ b/searchsummary/src/vespa/searchsummary/docsummary/docsumstore.h @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once diff --git a/searchsummary/src/vespa/searchsummary/docsummary/docsumwriter.cpp b/searchsummary/src/vespa/searchsummary/docsummary/docsumwriter.cpp index 90724762e59..de2e250660e 100644 --- a/searchsummary/src/vespa/searchsummary/docsummary/docsumwriter.cpp +++ b/searchsummary/src/vespa/searchsummary/docsummary/docsumwriter.cpp @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include "docsumwriter.h" #include "docsumstate.h" diff --git a/searchsummary/src/vespa/searchsummary/docsummary/docsumwriter.h b/searchsummary/src/vespa/searchsummary/docsummary/docsumwriter.h index 808c45b28f8..2816cde677f 100644 --- a/searchsummary/src/vespa/searchsummary/docsummary/docsumwriter.h +++ b/searchsummary/src/vespa/searchsummary/docsummary/docsumwriter.h @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once diff --git a/searchsummary/src/vespa/searchsummary/docsummary/document_id_dfw.cpp b/searchsummary/src/vespa/searchsummary/docsummary/document_id_dfw.cpp index 911cd1acc0d..4283f4db694 100644 --- a/searchsummary/src/vespa/searchsummary/docsummary/document_id_dfw.cpp +++ b/searchsummary/src/vespa/searchsummary/docsummary/document_id_dfw.cpp @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include "document_id_dfw.h" #include "i_docsum_store_document.h" diff --git a/searchsummary/src/vespa/searchsummary/docsummary/document_id_dfw.h b/searchsummary/src/vespa/searchsummary/docsummary/document_id_dfw.h index 11a69e1ed59..99dded82eb4 100644 --- a/searchsummary/src/vespa/searchsummary/docsummary/document_id_dfw.h +++ b/searchsummary/src/vespa/searchsummary/docsummary/document_id_dfw.h @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once diff --git a/searchsummary/src/vespa/searchsummary/docsummary/dynamicteaserdfw.cpp b/searchsummary/src/vespa/searchsummary/docsummary/dynamicteaserdfw.cpp index d76e4af84d3..fcf86f70bef 100644 --- a/searchsummary/src/vespa/searchsummary/docsummary/dynamicteaserdfw.cpp +++ b/searchsummary/src/vespa/searchsummary/docsummary/dynamicteaserdfw.cpp @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include "juniperdfw.h" #include "docsumstate.h" diff --git a/searchsummary/src/vespa/searchsummary/docsummary/empty_dfw.cpp b/searchsummary/src/vespa/searchsummary/docsummary/empty_dfw.cpp index d7d59c06791..e126500830a 100644 --- a/searchsummary/src/vespa/searchsummary/docsummary/empty_dfw.cpp +++ b/searchsummary/src/vespa/searchsummary/docsummary/empty_dfw.cpp @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include "empty_dfw.h" diff --git a/searchsummary/src/vespa/searchsummary/docsummary/empty_dfw.h b/searchsummary/src/vespa/searchsummary/docsummary/empty_dfw.h index 7f6e2d78cb7..d578bb1bd92 100644 --- a/searchsummary/src/vespa/searchsummary/docsummary/empty_dfw.h +++ b/searchsummary/src/vespa/searchsummary/docsummary/empty_dfw.h @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once diff --git a/searchsummary/src/vespa/searchsummary/docsummary/geoposdfw.cpp b/searchsummary/src/vespa/searchsummary/docsummary/geoposdfw.cpp index 07e4bde54d0..1a6b4ed69d8 100644 --- a/searchsummary/src/vespa/searchsummary/docsummary/geoposdfw.cpp +++ b/searchsummary/src/vespa/searchsummary/docsummary/geoposdfw.cpp @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include "geoposdfw.h" #include <vespa/searchlib/common/documentlocations.h> diff --git a/searchsummary/src/vespa/searchsummary/docsummary/geoposdfw.h b/searchsummary/src/vespa/searchsummary/docsummary/geoposdfw.h index 6e470d479ff..eeffdeacee2 100644 --- a/searchsummary/src/vespa/searchsummary/docsummary/geoposdfw.h +++ b/searchsummary/src/vespa/searchsummary/docsummary/geoposdfw.h @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once diff --git a/searchsummary/src/vespa/searchsummary/docsummary/getdocsumargs.cpp b/searchsummary/src/vespa/searchsummary/docsummary/getdocsumargs.cpp index db5518ce779..22ee6711556 100644 --- a/searchsummary/src/vespa/searchsummary/docsummary/getdocsumargs.cpp +++ b/searchsummary/src/vespa/searchsummary/docsummary/getdocsumargs.cpp @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include "getdocsumargs.h" #include <vespa/vespalib/stllike/hash_set_insert.hpp> diff --git a/searchsummary/src/vespa/searchsummary/docsummary/getdocsumargs.h b/searchsummary/src/vespa/searchsummary/docsummary/getdocsumargs.h index 5dbd2a05a6d..0051af29c21 100644 --- a/searchsummary/src/vespa/searchsummary/docsummary/getdocsumargs.h +++ b/searchsummary/src/vespa/searchsummary/docsummary/getdocsumargs.h @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once diff --git a/searchsummary/src/vespa/searchsummary/docsummary/i_docsum_field_writer_factory.h b/searchsummary/src/vespa/searchsummary/docsummary/i_docsum_field_writer_factory.h index bc2ebe3c40c..98aea1f5dcf 100644 --- a/searchsummary/src/vespa/searchsummary/docsummary/i_docsum_field_writer_factory.h +++ b/searchsummary/src/vespa/searchsummary/docsummary/i_docsum_field_writer_factory.h @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once diff --git a/searchsummary/src/vespa/searchsummary/docsummary/i_docsum_store_document.h b/searchsummary/src/vespa/searchsummary/docsummary/i_docsum_store_document.h index 32e1b07a838..a229e98bb4b 100644 --- a/searchsummary/src/vespa/searchsummary/docsummary/i_docsum_store_document.h +++ b/searchsummary/src/vespa/searchsummary/docsummary/i_docsum_store_document.h @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once @@ -10,6 +10,7 @@ namespace vespalib::slime { struct Inserter; } namespace search::docsummary { class IJuniperConverter; +class IStringFieldConverter; /** * Interface class providing access to a document retrieved from an IDocsumStore. @@ -21,7 +22,7 @@ class IDocsumStoreDocument public: virtual ~IDocsumStoreDocument() = default; virtual DocsumStoreFieldValue get_field_value(const vespalib::string& field_name) const = 0; - virtual void insert_summary_field(const vespalib::string& field_name, vespalib::slime::Inserter& inserter) const = 0; + virtual void insert_summary_field(const vespalib::string& field_name, vespalib::slime::Inserter& inserter, IStringFieldConverter* converter = nullptr) const = 0; virtual void insert_juniper_field(const vespalib::string& field_name, vespalib::slime::Inserter& inserter, IJuniperConverter& converter) const = 0; virtual void insert_document_id(vespalib::slime::Inserter& inserter) const = 0; }; diff --git a/searchsummary/src/vespa/searchsummary/docsummary/i_juniper_converter.h b/searchsummary/src/vespa/searchsummary/docsummary/i_juniper_converter.h index a52002d37f5..1231d888fa2 100644 --- a/searchsummary/src/vespa/searchsummary/docsummary/i_juniper_converter.h +++ b/searchsummary/src/vespa/searchsummary/docsummary/i_juniper_converter.h @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once diff --git a/searchsummary/src/vespa/searchsummary/docsummary/i_query_term_filter.h b/searchsummary/src/vespa/searchsummary/docsummary/i_query_term_filter.h index 1f069a950c4..ce1523ae653 100644 --- a/searchsummary/src/vespa/searchsummary/docsummary/i_query_term_filter.h +++ b/searchsummary/src/vespa/searchsummary/docsummary/i_query_term_filter.h @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once diff --git a/searchsummary/src/vespa/searchsummary/docsummary/i_query_term_filter_factory.h b/searchsummary/src/vespa/searchsummary/docsummary/i_query_term_filter_factory.h index ac8130f16f3..00ed40a6bd9 100644 --- a/searchsummary/src/vespa/searchsummary/docsummary/i_query_term_filter_factory.h +++ b/searchsummary/src/vespa/searchsummary/docsummary/i_query_term_filter_factory.h @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once diff --git a/searchsummary/src/vespa/searchsummary/docsummary/i_string_field_converter.h b/searchsummary/src/vespa/searchsummary/docsummary/i_string_field_converter.h index 0e80fc28ded..805b5cf3508 100644 --- a/searchsummary/src/vespa/searchsummary/docsummary/i_string_field_converter.h +++ b/searchsummary/src/vespa/searchsummary/docsummary/i_string_field_converter.h @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once @@ -17,6 +17,7 @@ class IStringFieldConverter public: virtual ~IStringFieldConverter() = default; virtual void convert(const document::StringFieldValue &input, vespalib::slime::Inserter& inserter) = 0; + virtual bool render_weighted_set_as_array() const = 0; }; } diff --git a/searchsummary/src/vespa/searchsummary/docsummary/idocsumenvironment.h b/searchsummary/src/vespa/searchsummary/docsummary/idocsumenvironment.h index 26d3bfe3c5c..a271a3d6d8e 100644 --- a/searchsummary/src/vespa/searchsummary/docsummary/idocsumenvironment.h +++ b/searchsummary/src/vespa/searchsummary/docsummary/idocsumenvironment.h @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once diff --git a/searchsummary/src/vespa/searchsummary/docsummary/juniper_dfw_explicit_item_data.h b/searchsummary/src/vespa/searchsummary/docsummary/juniper_dfw_explicit_item_data.h index aaa342e7d70..75bc320a625 100644 --- a/searchsummary/src/vespa/searchsummary/docsummary/juniper_dfw_explicit_item_data.h +++ b/searchsummary/src/vespa/searchsummary/docsummary/juniper_dfw_explicit_item_data.h @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once diff --git a/searchsummary/src/vespa/searchsummary/docsummary/juniper_dfw_query_item.cpp b/searchsummary/src/vespa/searchsummary/docsummary/juniper_dfw_query_item.cpp index 589d6eaabfb..0ebb635113e 100644 --- a/searchsummary/src/vespa/searchsummary/docsummary/juniper_dfw_query_item.cpp +++ b/searchsummary/src/vespa/searchsummary/docsummary/juniper_dfw_query_item.cpp @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include "juniper_dfw_query_item.h" #include "juniper_dfw_explicit_item_data.h" diff --git a/searchsummary/src/vespa/searchsummary/docsummary/juniper_dfw_query_item.h b/searchsummary/src/vespa/searchsummary/docsummary/juniper_dfw_query_item.h index bec71b2e6fe..3e3753e1e0a 100644 --- a/searchsummary/src/vespa/searchsummary/docsummary/juniper_dfw_query_item.h +++ b/searchsummary/src/vespa/searchsummary/docsummary/juniper_dfw_query_item.h @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once diff --git a/searchsummary/src/vespa/searchsummary/docsummary/juniper_dfw_term_visitor.cpp b/searchsummary/src/vespa/searchsummary/docsummary/juniper_dfw_term_visitor.cpp index 54db3ed6d0b..9fcee220bc9 100644 --- a/searchsummary/src/vespa/searchsummary/docsummary/juniper_dfw_term_visitor.cpp +++ b/searchsummary/src/vespa/searchsummary/docsummary/juniper_dfw_term_visitor.cpp @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include "juniper_dfw_term_visitor.h" #include "juniper_dfw_explicit_item_data.h" diff --git a/searchsummary/src/vespa/searchsummary/docsummary/juniper_dfw_term_visitor.h b/searchsummary/src/vespa/searchsummary/docsummary/juniper_dfw_term_visitor.h index 4b8b3dd8e7b..df067fdac48 100644 --- a/searchsummary/src/vespa/searchsummary/docsummary/juniper_dfw_term_visitor.h +++ b/searchsummary/src/vespa/searchsummary/docsummary/juniper_dfw_term_visitor.h @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once diff --git a/searchsummary/src/vespa/searchsummary/docsummary/juniper_query_adapter.cpp b/searchsummary/src/vespa/searchsummary/docsummary/juniper_query_adapter.cpp index 509aa366ff6..4e158ff595a 100644 --- a/searchsummary/src/vespa/searchsummary/docsummary/juniper_query_adapter.cpp +++ b/searchsummary/src/vespa/searchsummary/docsummary/juniper_query_adapter.cpp @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include "juniper_query_adapter.h" #include "i_query_term_filter.h" diff --git a/searchsummary/src/vespa/searchsummary/docsummary/juniper_query_adapter.h b/searchsummary/src/vespa/searchsummary/docsummary/juniper_query_adapter.h index 3fe004cd3d6..04cf512a6a6 100644 --- a/searchsummary/src/vespa/searchsummary/docsummary/juniper_query_adapter.h +++ b/searchsummary/src/vespa/searchsummary/docsummary/juniper_query_adapter.h @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once diff --git a/searchsummary/src/vespa/searchsummary/docsummary/juniperdfw.h b/searchsummary/src/vespa/searchsummary/docsummary/juniperdfw.h index a28b6273e4c..7085c5e6fa1 100644 --- a/searchsummary/src/vespa/searchsummary/docsummary/juniperdfw.h +++ b/searchsummary/src/vespa/searchsummary/docsummary/juniperdfw.h @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once diff --git a/searchsummary/src/vespa/searchsummary/docsummary/juniperproperties.cpp b/searchsummary/src/vespa/searchsummary/docsummary/juniperproperties.cpp index feb4c63df34..45af63c8c2d 100644 --- a/searchsummary/src/vespa/searchsummary/docsummary/juniperproperties.cpp +++ b/searchsummary/src/vespa/searchsummary/docsummary/juniperproperties.cpp @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include "juniperproperties.h" #include <vespa/vespalib/util/stringfmt.h> diff --git a/searchsummary/src/vespa/searchsummary/docsummary/juniperproperties.h b/searchsummary/src/vespa/searchsummary/docsummary/juniperproperties.h index 98c8a8eadb2..b4e8a68c5fc 100644 --- a/searchsummary/src/vespa/searchsummary/docsummary/juniperproperties.h +++ b/searchsummary/src/vespa/searchsummary/docsummary/juniperproperties.h @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once #include <vespa/juniper/IJuniperProperties.h> diff --git a/searchsummary/src/vespa/searchsummary/docsummary/linguisticsannotation.cpp b/searchsummary/src/vespa/searchsummary/docsummary/linguisticsannotation.cpp deleted file mode 100644 index 4b4cb2d9602..00000000000 --- a/searchsummary/src/vespa/searchsummary/docsummary/linguisticsannotation.cpp +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. - -#include "linguisticsannotation.h" - -namespace search::linguistics { - -const vespalib::string SPANTREE_NAME("linguistics"); - -} diff --git a/searchsummary/src/vespa/searchsummary/docsummary/linguisticsannotation.h b/searchsummary/src/vespa/searchsummary/docsummary/linguisticsannotation.h deleted file mode 100644 index e6395fe5b68..00000000000 --- a/searchsummary/src/vespa/searchsummary/docsummary/linguisticsannotation.h +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. - -#pragma once - -#include <vespa/vespalib/stllike/string.h> - -namespace search::linguistics { - -extern const vespalib::string SPANTREE_NAME; - -} diff --git a/searchsummary/src/vespa/searchsummary/docsummary/matched_elements_filter_dfw.cpp b/searchsummary/src/vespa/searchsummary/docsummary/matched_elements_filter_dfw.cpp index 4f74ffd894c..1cc72e3c742 100644 --- a/searchsummary/src/vespa/searchsummary/docsummary/matched_elements_filter_dfw.cpp +++ b/searchsummary/src/vespa/searchsummary/docsummary/matched_elements_filter_dfw.cpp @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include "matched_elements_filter_dfw.h" #include "docsumstate.h" diff --git a/searchsummary/src/vespa/searchsummary/docsummary/matched_elements_filter_dfw.h b/searchsummary/src/vespa/searchsummary/docsummary/matched_elements_filter_dfw.h index cf631e81e5e..fed634239a4 100644 --- a/searchsummary/src/vespa/searchsummary/docsummary/matched_elements_filter_dfw.h +++ b/searchsummary/src/vespa/searchsummary/docsummary/matched_elements_filter_dfw.h @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once diff --git a/searchsummary/src/vespa/searchsummary/docsummary/positionsdfw.cpp b/searchsummary/src/vespa/searchsummary/docsummary/positionsdfw.cpp index 5aba321b540..f7f48bb2924 100644 --- a/searchsummary/src/vespa/searchsummary/docsummary/positionsdfw.cpp +++ b/searchsummary/src/vespa/searchsummary/docsummary/positionsdfw.cpp @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include "positionsdfw.h" #include "docsumstate.h" diff --git a/searchsummary/src/vespa/searchsummary/docsummary/positionsdfw.h b/searchsummary/src/vespa/searchsummary/docsummary/positionsdfw.h index 62306be7ded..9e4be09b0a1 100644 --- a/searchsummary/src/vespa/searchsummary/docsummary/positionsdfw.h +++ b/searchsummary/src/vespa/searchsummary/docsummary/positionsdfw.h @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once diff --git a/searchsummary/src/vespa/searchsummary/docsummary/query_term_filter.cpp b/searchsummary/src/vespa/searchsummary/docsummary/query_term_filter.cpp index a8be797ae98..7d7b5623d3e 100644 --- a/searchsummary/src/vespa/searchsummary/docsummary/query_term_filter.cpp +++ b/searchsummary/src/vespa/searchsummary/docsummary/query_term_filter.cpp @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include "query_term_filter.h" #include <vespa/vespalib/stllike/hash_set.hpp> diff --git a/searchsummary/src/vespa/searchsummary/docsummary/query_term_filter.h b/searchsummary/src/vespa/searchsummary/docsummary/query_term_filter.h index 7c021c2a639..54f533243d9 100644 --- a/searchsummary/src/vespa/searchsummary/docsummary/query_term_filter.h +++ b/searchsummary/src/vespa/searchsummary/docsummary/query_term_filter.h @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once diff --git a/searchsummary/src/vespa/searchsummary/docsummary/query_term_filter_factory.cpp b/searchsummary/src/vespa/searchsummary/docsummary/query_term_filter_factory.cpp index 69a67d2461c..d51ed6318f1 100644 --- a/searchsummary/src/vespa/searchsummary/docsummary/query_term_filter_factory.cpp +++ b/searchsummary/src/vespa/searchsummary/docsummary/query_term_filter_factory.cpp @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include "query_term_filter_factory.h" #include "query_term_filter.h" diff --git a/searchsummary/src/vespa/searchsummary/docsummary/query_term_filter_factory.h b/searchsummary/src/vespa/searchsummary/docsummary/query_term_filter_factory.h index d125aa78c33..9f914dd1ec1 100644 --- a/searchsummary/src/vespa/searchsummary/docsummary/query_term_filter_factory.h +++ b/searchsummary/src/vespa/searchsummary/docsummary/query_term_filter_factory.h @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once diff --git a/searchsummary/src/vespa/searchsummary/docsummary/rankfeaturesdfw.cpp b/searchsummary/src/vespa/searchsummary/docsummary/rankfeaturesdfw.cpp index c5e823bf9f4..c4ca460b572 100644 --- a/searchsummary/src/vespa/searchsummary/docsummary/rankfeaturesdfw.cpp +++ b/searchsummary/src/vespa/searchsummary/docsummary/rankfeaturesdfw.cpp @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include "rankfeaturesdfw.h" #include "docsumstate.h" diff --git a/searchsummary/src/vespa/searchsummary/docsummary/rankfeaturesdfw.h b/searchsummary/src/vespa/searchsummary/docsummary/rankfeaturesdfw.h index 469e496af96..064eb292e8a 100644 --- a/searchsummary/src/vespa/searchsummary/docsummary/rankfeaturesdfw.h +++ b/searchsummary/src/vespa/searchsummary/docsummary/rankfeaturesdfw.h @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once diff --git a/searchsummary/src/vespa/searchsummary/docsummary/res_config_entry.cpp b/searchsummary/src/vespa/searchsummary/docsummary/res_config_entry.cpp index 4d00265be0a..871385cf9b3 100644 --- a/searchsummary/src/vespa/searchsummary/docsummary/res_config_entry.cpp +++ b/searchsummary/src/vespa/searchsummary/docsummary/res_config_entry.cpp @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include "res_config_entry.h" #include "docsum_field_writer.h" diff --git a/searchsummary/src/vespa/searchsummary/docsummary/res_config_entry.h b/searchsummary/src/vespa/searchsummary/docsummary/res_config_entry.h index e8d6c9f4e73..d4f49a41c7c 100644 --- a/searchsummary/src/vespa/searchsummary/docsummary/res_config_entry.h +++ b/searchsummary/src/vespa/searchsummary/docsummary/res_config_entry.h @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once diff --git a/searchsummary/src/vespa/searchsummary/docsummary/resultclass.cpp b/searchsummary/src/vespa/searchsummary/docsummary/resultclass.cpp index f68c322dafd..5085806c54c 100644 --- a/searchsummary/src/vespa/searchsummary/docsummary/resultclass.cpp +++ b/searchsummary/src/vespa/searchsummary/docsummary/resultclass.cpp @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include "resultclass.h" #include "docsum_field_writer.h" diff --git a/searchsummary/src/vespa/searchsummary/docsummary/resultclass.h b/searchsummary/src/vespa/searchsummary/docsummary/resultclass.h index 9e5533ee196..992c44f0ed2 100644 --- a/searchsummary/src/vespa/searchsummary/docsummary/resultclass.h +++ b/searchsummary/src/vespa/searchsummary/docsummary/resultclass.h @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once diff --git a/searchsummary/src/vespa/searchsummary/docsummary/resultconfig.cpp b/searchsummary/src/vespa/searchsummary/docsummary/resultconfig.cpp index eddb67f5822..f7199b2b6e5 100644 --- a/searchsummary/src/vespa/searchsummary/docsummary/resultconfig.cpp +++ b/searchsummary/src/vespa/searchsummary/docsummary/resultconfig.cpp @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include "resultconfig.h" #include "docsum_field_writer.h" diff --git a/searchsummary/src/vespa/searchsummary/docsummary/resultconfig.h b/searchsummary/src/vespa/searchsummary/docsummary/resultconfig.h index 39cebb5e91d..cc34d740118 100644 --- a/searchsummary/src/vespa/searchsummary/docsummary/resultconfig.h +++ b/searchsummary/src/vespa/searchsummary/docsummary/resultconfig.h @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once diff --git a/searchsummary/src/vespa/searchsummary/docsummary/simple_dfw.cpp b/searchsummary/src/vespa/searchsummary/docsummary/simple_dfw.cpp index b2a05d98f5b..790832842a0 100644 --- a/searchsummary/src/vespa/searchsummary/docsummary/simple_dfw.cpp +++ b/searchsummary/src/vespa/searchsummary/docsummary/simple_dfw.cpp @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include "simple_dfw.h" diff --git a/searchsummary/src/vespa/searchsummary/docsummary/simple_dfw.h b/searchsummary/src/vespa/searchsummary/docsummary/simple_dfw.h index 4c7a4be517e..b1a894b1def 100644 --- a/searchsummary/src/vespa/searchsummary/docsummary/simple_dfw.h +++ b/searchsummary/src/vespa/searchsummary/docsummary/simple_dfw.h @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once diff --git a/searchsummary/src/vespa/searchsummary/docsummary/slime_filler.cpp b/searchsummary/src/vespa/searchsummary/docsummary/slime_filler.cpp index 8763d064c35..080129fe780 100644 --- a/searchsummary/src/vespa/searchsummary/docsummary/slime_filler.cpp +++ b/searchsummary/src/vespa/searchsummary/docsummary/slime_filler.cpp @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include "slime_filler.h" #include "check_undefined_value_visitor.h" @@ -285,6 +285,7 @@ SlimeFiller::visit(const WeightedSetFieldValue& value) if (empty_or_empty_after_filtering(value)) { return; } + bool render_as_array = _string_converter != nullptr && _string_converter->render_weighted_set_as_array(); Cursor& a = _inserter.insertArray(); Symbol isym = a.resolve("item"); Symbol wsym = a.resolve("weight"); @@ -305,12 +306,18 @@ SlimeFiller::visit(const WeightedSetFieldValue& value) } ++matching_elements_itr; } - Cursor& o = a.addObject(); - ObjectSymbolInserter ki(o, isym); - SlimeFiller conv(ki); - entry.first->accept(conv); - int weight = static_cast<const IntFieldValue&>(*entry.second).getValue(); - o.setLong(wsym, weight); + if (render_as_array) { + ArrayInserter ai(a); + SlimeFiller conv(ai, _string_converter, SlimeFillerFilter::all()); + entry.first->accept(conv); + } else { + Cursor& o = a.addObject(); + ObjectSymbolInserter ki(o, isym); + SlimeFiller conv(ki); + entry.first->accept(conv); + int weight = static_cast<const IntFieldValue&>(*entry.second).getValue(); + o.setLong(wsym, weight); + } ++idx; } } @@ -335,12 +342,12 @@ SlimeFiller::visit(const ReferenceFieldValue& value) } void -SlimeFiller::insert_summary_field(const FieldValue& value, vespalib::slime::Inserter& inserter) +SlimeFiller::insert_summary_field(const FieldValue& value, vespalib::slime::Inserter& inserter, IStringFieldConverter* converter) { CheckUndefinedValueVisitor check_undefined; value.accept(check_undefined); if (!check_undefined.is_undefined()) { - SlimeFiller visitor(inserter); + SlimeFiller visitor(inserter, converter, SlimeFillerFilter::all()); value.accept(visitor); } } @@ -357,12 +364,12 @@ SlimeFiller::insert_summary_field_with_filter(const FieldValue& value, vespalib: } void -SlimeFiller::insert_summary_field_with_field_filter(const document::FieldValue& value, vespalib::slime::Inserter& inserter, const SlimeFillerFilter* filter) +SlimeFiller::insert_summary_field_with_field_filter(const document::FieldValue& value, vespalib::slime::Inserter& inserter, IStringFieldConverter* converter, const SlimeFillerFilter* filter) { CheckUndefinedValueVisitor check_undefined; value.accept(check_undefined); if (!check_undefined.is_undefined()) { - SlimeFiller visitor(inserter, nullptr, (filter != nullptr) ? filter->begin() : SlimeFillerFilter::all()); + SlimeFiller visitor(inserter, converter, (filter != nullptr) ? filter->begin() : SlimeFillerFilter::all()); value.accept(visitor); } } diff --git a/searchsummary/src/vespa/searchsummary/docsummary/slime_filler.h b/searchsummary/src/vespa/searchsummary/docsummary/slime_filler.h index f28d628349d..547d2a13ec3 100644 --- a/searchsummary/src/vespa/searchsummary/docsummary/slime_filler.h +++ b/searchsummary/src/vespa/searchsummary/docsummary/slime_filler.h @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once @@ -59,13 +59,13 @@ public: SlimeFillerFilter::Iterator filter); ~SlimeFiller() override; - static void insert_summary_field(const document::FieldValue& value, vespalib::slime::Inserter& inserter); + static void insert_summary_field(const document::FieldValue& value, vespalib::slime::Inserter& inserter, IStringFieldConverter* converter = nullptr); /** * Insert the given field value, but only the elements that are contained in the matching_elems vector. */ static void insert_summary_field_with_filter(const document::FieldValue& value, vespalib::slime::Inserter& inserter, const std::vector<uint32_t>& matching_elems); - static void insert_summary_field_with_field_filter(const document::FieldValue& value, vespalib::slime::Inserter& inserter, const SlimeFillerFilter* filter); + static void insert_summary_field_with_field_filter(const document::FieldValue& value, vespalib::slime::Inserter& inserter, IStringFieldConverter* converter, const SlimeFillerFilter* filter); static void insert_juniper_field(const document::FieldValue& value, vespalib::slime::Inserter& inserter, IStringFieldConverter& converter); }; diff --git a/searchsummary/src/vespa/searchsummary/docsummary/slime_filler_filter.cpp b/searchsummary/src/vespa/searchsummary/docsummary/slime_filler_filter.cpp index 8981af0362f..262fccc8ad1 100644 --- a/searchsummary/src/vespa/searchsummary/docsummary/slime_filler_filter.cpp +++ b/searchsummary/src/vespa/searchsummary/docsummary/slime_filler_filter.cpp @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include "slime_filler_filter.h" #include <vespa/vespalib/stllike/hash_map.hpp> diff --git a/searchsummary/src/vespa/searchsummary/docsummary/slime_filler_filter.h b/searchsummary/src/vespa/searchsummary/docsummary/slime_filler_filter.h index 8bdc683fbb8..e165dc6442c 100644 --- a/searchsummary/src/vespa/searchsummary/docsummary/slime_filler_filter.h +++ b/searchsummary/src/vespa/searchsummary/docsummary/slime_filler_filter.h @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once diff --git a/searchsummary/src/vespa/searchsummary/docsummary/struct_fields_resolver.cpp b/searchsummary/src/vespa/searchsummary/docsummary/struct_fields_resolver.cpp index d095a04e84a..c5e0a098069 100644 --- a/searchsummary/src/vespa/searchsummary/docsummary/struct_fields_resolver.cpp +++ b/searchsummary/src/vespa/searchsummary/docsummary/struct_fields_resolver.cpp @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include "struct_fields_resolver.h" #include <vespa/searchcommon/attribute/iattributecontext.h> diff --git a/searchsummary/src/vespa/searchsummary/docsummary/struct_fields_resolver.h b/searchsummary/src/vespa/searchsummary/docsummary/struct_fields_resolver.h index bee538ec12b..e73f37604b6 100644 --- a/searchsummary/src/vespa/searchsummary/docsummary/struct_fields_resolver.h +++ b/searchsummary/src/vespa/searchsummary/docsummary/struct_fields_resolver.h @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once diff --git a/searchsummary/src/vespa/searchsummary/docsummary/struct_map_attribute_combiner_dfw.cpp b/searchsummary/src/vespa/searchsummary/docsummary/struct_map_attribute_combiner_dfw.cpp index f641b0a433d..c469d37d005 100644 --- a/searchsummary/src/vespa/searchsummary/docsummary/struct_map_attribute_combiner_dfw.cpp +++ b/searchsummary/src/vespa/searchsummary/docsummary/struct_map_attribute_combiner_dfw.cpp @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include "attribute_field_writer.h" #include "docsum_field_writer_state.h" diff --git a/searchsummary/src/vespa/searchsummary/docsummary/struct_map_attribute_combiner_dfw.h b/searchsummary/src/vespa/searchsummary/docsummary/struct_map_attribute_combiner_dfw.h index 0665b398a57..8cb6079f94e 100644 --- a/searchsummary/src/vespa/searchsummary/docsummary/struct_map_attribute_combiner_dfw.h +++ b/searchsummary/src/vespa/searchsummary/docsummary/struct_map_attribute_combiner_dfw.h @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once diff --git a/searchsummary/src/vespa/searchsummary/docsummary/summaryfeaturesdfw.cpp b/searchsummary/src/vespa/searchsummary/docsummary/summaryfeaturesdfw.cpp index a1b2d6b3af6..be0c056c2f1 100644 --- a/searchsummary/src/vespa/searchsummary/docsummary/summaryfeaturesdfw.cpp +++ b/searchsummary/src/vespa/searchsummary/docsummary/summaryfeaturesdfw.cpp @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include "summaryfeaturesdfw.h" #include "docsumstate.h" diff --git a/searchsummary/src/vespa/searchsummary/docsummary/summaryfeaturesdfw.h b/searchsummary/src/vespa/searchsummary/docsummary/summaryfeaturesdfw.h index 535360d9661..bd57a5dcc37 100644 --- a/searchsummary/src/vespa/searchsummary/docsummary/summaryfeaturesdfw.h +++ b/searchsummary/src/vespa/searchsummary/docsummary/summaryfeaturesdfw.h @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once diff --git a/searchsummary/src/vespa/searchsummary/docsummary/tokens_converter.cpp b/searchsummary/src/vespa/searchsummary/docsummary/tokens_converter.cpp new file mode 100644 index 00000000000..e2849fe793e --- /dev/null +++ b/searchsummary/src/vespa/searchsummary/docsummary/tokens_converter.cpp @@ -0,0 +1,78 @@ +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. + +#include "tokens_converter.h" +#include <vespa/document/fieldvalue/stringfieldvalue.h> +#include <vespa/searchlib/util/token_extractor.h> +#include <vespa/vespalib/data/slime/slime.h> + +using document::StringFieldValue; +using search::linguistics::TokenExtractor; +using vespalib::Memory; +using vespalib::slime::ArrayInserter; +using vespalib::slime::Cursor; +using vespalib::slime::Inserter; + +namespace search::docsummary { + +TokensConverter::TokensConverter(const TokenExtractor& token_extractor) + : IStringFieldConverter(), + _token_extractor(token_extractor), + _text() +{ +} + +TokensConverter::~TokensConverter() = default; + +template <typename ForwardIt> +void +TokensConverter::handle_alternative_index_terms(ForwardIt it, ForwardIt last, Inserter& inserter) +{ + Cursor& a = inserter.insertArray(); + ArrayInserter ai(a); + for (;it != last; ++it) { + handle_index_term(it->word, ai); + } +} + +void +TokensConverter::handle_index_term(vespalib::stringref word, Inserter& inserter) +{ + inserter.insertString(Memory(word)); +} + +void +TokensConverter::handle_indexing_terms(const StringFieldValue& value, vespalib::slime::Inserter& inserter) +{ + Cursor& a = inserter.insertArray(); + ArrayInserter ai(a); + using SpanTerm = TokenExtractor::SpanTerm; + std::vector<SpanTerm> terms; + auto span_trees = value.getSpanTrees(); + _token_extractor.extract(terms, span_trees, _text, nullptr); + auto it = terms.begin(); + auto ite = terms.end(); + auto itn = it; + for (; it != ite; it = itn) { + for (; itn != ite && itn->span == it->span; ++itn); + if ((itn - it) > 1) { + handle_alternative_index_terms(it, itn, ai); + } else { + handle_index_term(it->word, ai); + } + } +} + +void +TokensConverter::convert(const StringFieldValue &input, vespalib::slime::Inserter& inserter) +{ + _text = input.getValueRef(); + handle_indexing_terms(input, inserter); +} + +bool +TokensConverter::render_weighted_set_as_array() const +{ + return true; +} + +} diff --git a/searchsummary/src/vespa/searchsummary/docsummary/tokens_converter.h b/searchsummary/src/vespa/searchsummary/docsummary/tokens_converter.h new file mode 100644 index 00000000000..1798abac203 --- /dev/null +++ b/searchsummary/src/vespa/searchsummary/docsummary/tokens_converter.h @@ -0,0 +1,32 @@ +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. + +#pragma once + +#include "i_string_field_converter.h" + +namespace search::linguistics { class TokenExtractor; } + +namespace search::docsummary { + +/* + * Class converting a string field value with annotations into an array + * containing the tokens. Multiple tokens at same position are + * placed in a nested array. + */ +class TokensConverter : public IStringFieldConverter +{ + const linguistics::TokenExtractor& _token_extractor; + vespalib::stringref _text; + + template <typename ForwardIt> + void handle_alternative_index_terms(ForwardIt it, ForwardIt last, vespalib::slime::Inserter& inserter); + void handle_index_term(vespalib::stringref word, vespalib::slime::Inserter& inserter); + void handle_indexing_terms(const document::StringFieldValue& value, vespalib::slime::Inserter& inserter); +public: + TokensConverter(const linguistics::TokenExtractor& token_extractor); + ~TokensConverter() override; + void convert(const document::StringFieldValue &input, vespalib::slime::Inserter& inserter) override; + bool render_weighted_set_as_array() const override; +}; + +} diff --git a/searchsummary/src/vespa/searchsummary/docsummary/tokens_dfw.cpp b/searchsummary/src/vespa/searchsummary/docsummary/tokens_dfw.cpp new file mode 100644 index 00000000000..0741e5cc352 --- /dev/null +++ b/searchsummary/src/vespa/searchsummary/docsummary/tokens_dfw.cpp @@ -0,0 +1,36 @@ +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. + +#include "tokens_dfw.h" +#include "i_docsum_store_document.h" +#include "tokens_converter.h" +#include <vespa/searchlib/memoryindex/field_inverter.h> + +using search::memoryindex::FieldInverter; + +namespace search::docsummary { + +TokensDFW::TokensDFW(const vespalib::string& input_field_name) + : DocsumFieldWriter(), + _input_field_name(input_field_name), + _token_extractor(_input_field_name, FieldInverter::max_word_len) +{ +} + +TokensDFW::~TokensDFW() = default; + +bool +TokensDFW::isGenerated() const +{ + return false; +} + +void +TokensDFW::insertField(uint32_t, const IDocsumStoreDocument* doc, GetDocsumsState&, vespalib::slime::Inserter& target) const +{ + if (doc != nullptr) { + TokensConverter converter(_token_extractor); + doc->insert_summary_field(_input_field_name, target, &converter); + } +} + +} diff --git a/searchsummary/src/vespa/searchsummary/docsummary/tokens_dfw.h b/searchsummary/src/vespa/searchsummary/docsummary/tokens_dfw.h new file mode 100644 index 00000000000..e9f91ab683a --- /dev/null +++ b/searchsummary/src/vespa/searchsummary/docsummary/tokens_dfw.h @@ -0,0 +1,28 @@ +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. + +#pragma once + +#include "docsum_field_writer.h" +#include <vespa/searchlib/util/token_extractor.h> +#include <memory> + +namespace search::docsummary { + +/* + * Class for writing annotated string field values from document as + * arrays containing the tokens. + */ +class TokensDFW : public DocsumFieldWriter +{ +private: + vespalib::string _input_field_name; + linguistics::TokenExtractor _token_extractor; + +public: + explicit TokensDFW(const vespalib::string& input_field_name); + ~TokensDFW() override; + bool isGenerated() const override; + void insertField(uint32_t docid, const IDocsumStoreDocument* doc, GetDocsumsState& state, vespalib::slime::Inserter& target) const override; +}; + +} diff --git a/searchsummary/src/vespa/searchsummary/test/CMakeLists.txt b/searchsummary/src/vespa/searchsummary/test/CMakeLists.txt index 25404b02522..a4ef0fcbda5 100644 --- a/searchsummary/src/vespa/searchsummary/test/CMakeLists.txt +++ b/searchsummary/src/vespa/searchsummary/test/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +# Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. vespa_add_library(searchsummary_test SOURCES mock_attribute_manager.cpp diff --git a/searchsummary/src/vespa/searchsummary/test/mock_attribute_manager.cpp b/searchsummary/src/vespa/searchsummary/test/mock_attribute_manager.cpp index 77dc38d3057..557ba8f4cde 100644 --- a/searchsummary/src/vespa/searchsummary/test/mock_attribute_manager.cpp +++ b/searchsummary/src/vespa/searchsummary/test/mock_attribute_manager.cpp @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include "mock_attribute_manager.h" #include <vespa/searchlib/attribute/attributefactory.h> diff --git a/searchsummary/src/vespa/searchsummary/test/mock_attribute_manager.h b/searchsummary/src/vespa/searchsummary/test/mock_attribute_manager.h index 6cdcfcbb6db..69762a37f95 100644 --- a/searchsummary/src/vespa/searchsummary/test/mock_attribute_manager.h +++ b/searchsummary/src/vespa/searchsummary/test/mock_attribute_manager.h @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include <vespa/searchcommon/attribute/basictype.h> #include <vespa/searchlib/attribute/attributemanager.h> diff --git a/searchsummary/src/vespa/searchsummary/test/mock_state_callback.h b/searchsummary/src/vespa/searchsummary/test/mock_state_callback.h index a576053ea3d..6d21e6d0262 100644 --- a/searchsummary/src/vespa/searchsummary/test/mock_state_callback.h +++ b/searchsummary/src/vespa/searchsummary/test/mock_state_callback.h @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include <vespa/searchlib/common/matching_elements.h> #include <vespa/searchsummary/docsummary/docsumstate.h> diff --git a/searchsummary/src/vespa/searchsummary/test/slime_value.h b/searchsummary/src/vespa/searchsummary/test/slime_value.h index 03e5d76297a..b2105ba0e04 100644 --- a/searchsummary/src/vespa/searchsummary/test/slime_value.h +++ b/searchsummary/src/vespa/searchsummary/test/slime_value.h @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once |