diff options
Diffstat (limited to 'streamingvisitors/src/vespa/vsm/vsm')
19 files changed, 35 insertions, 26 deletions
diff --git a/streamingvisitors/src/vespa/vsm/vsm/CMakeLists.txt b/streamingvisitors/src/vespa/vsm/vsm/CMakeLists.txt index 741d2d7a731..a50a541f3b7 100644 --- a/streamingvisitors/src/vespa/vsm/vsm/CMakeLists.txt +++ b/streamingvisitors/src/vespa/vsm/vsm/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(vsm_vsmbase OBJECT SOURCES docsumfieldspec.cpp diff --git a/streamingvisitors/src/vespa/vsm/vsm/docsum_field_writer_factory.cpp b/streamingvisitors/src/vespa/vsm/vsm/docsum_field_writer_factory.cpp index b103d7d85b2..180200e2eaf 100644 --- a/streamingvisitors/src/vespa/vsm/vsm/docsum_field_writer_factory.cpp +++ b/streamingvisitors/src/vespa/vsm/vsm/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 "docsum_field_writer_factory.h" #include <vespa/searchlib/common/matching_elements_fields.h> diff --git a/streamingvisitors/src/vespa/vsm/vsm/docsum_field_writer_factory.h b/streamingvisitors/src/vespa/vsm/vsm/docsum_field_writer_factory.h index ac5cae8c49d..e32761f38b3 100644 --- a/streamingvisitors/src/vespa/vsm/vsm/docsum_field_writer_factory.h +++ b/streamingvisitors/src/vespa/vsm/vsm/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/streamingvisitors/src/vespa/vsm/vsm/docsumfieldspec.cpp b/streamingvisitors/src/vespa/vsm/vsm/docsumfieldspec.cpp index 44321518c46..0bebc2b6f36 100644 --- a/streamingvisitors/src/vespa/vsm/vsm/docsumfieldspec.cpp +++ b/streamingvisitors/src/vespa/vsm/vsm/docsumfieldspec.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 "docsumfieldspec.h" #include <vespa/searchsummary/docsummary/slime_filler_filter.h> diff --git a/streamingvisitors/src/vespa/vsm/vsm/docsumfieldspec.h b/streamingvisitors/src/vespa/vsm/vsm/docsumfieldspec.h index c75bace1cc7..dfef6174e81 100644 --- a/streamingvisitors/src/vespa/vsm/vsm/docsumfieldspec.h +++ b/streamingvisitors/src/vespa/vsm/vsm/docsumfieldspec.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/vsm/common/document.h> diff --git a/streamingvisitors/src/vespa/vsm/vsm/docsumfilter.cpp b/streamingvisitors/src/vespa/vsm/vsm/docsumfilter.cpp index 146dd487769..b94de154a35 100644 --- a/streamingvisitors/src/vespa/vsm/vsm/docsumfilter.cpp +++ b/streamingvisitors/src/vespa/vsm/vsm/docsumfilter.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 "docsumfilter.h" #include <vespa/juniper/juniper_separators.h> @@ -132,6 +132,7 @@ public: } ~SnippetModifierJuniperConverter() override = default; void convert(const document::StringFieldValue &input, vespalib::slime::Inserter& inserter) override; + bool render_weighted_set_as_array() const override; }; void @@ -147,6 +148,12 @@ SnippetModifierJuniperConverter::convert(const document::StringFieldValue &input } } +bool +SnippetModifierJuniperConverter::render_weighted_set_as_array() const +{ + return false; +} + /** * Class providing access to a document retrieved from an IDocsumStore * (vsm::DocsumFilter). VSM specific transforms might be applied when @@ -172,7 +179,7 @@ public: DocsumStoreVsmDocument(DocsumFilter& docsum_filter, const Document& vsm_document); ~DocsumStoreVsmDocument() 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; }; @@ -212,13 +219,13 @@ DocsumStoreVsmDocument::get_field_value(const vespalib::string& field_name) cons } void -DocsumStoreVsmDocument::insert_summary_field(const vespalib::string& field_name, vespalib::slime::Inserter& inserter) const +DocsumStoreVsmDocument::insert_summary_field(const vespalib::string& field_name, vespalib::slime::Inserter& inserter, IStringFieldConverter* converter) const { if (_document != nullptr) { auto entry_idx = _result_class.getIndexFromName(field_name.c_str()); if (entry_idx >= 0) { assert((uint32_t) entry_idx < _result_class.getNumEntries()); - _docsum_filter.insert_summary_field(entry_idx, _vsm_document, inserter); + _docsum_filter.insert_summary_field(entry_idx, _vsm_document, inserter, converter); return; } try { @@ -226,7 +233,7 @@ DocsumStoreVsmDocument::insert_summary_field(const vespalib::string& field_name, auto value(field.getDataType().createFieldValue()); if (value) { if (_document->getValue(field, *value)) { - SlimeFiller::insert_summary_field(*value, inserter); + SlimeFiller::insert_summary_field(*value, inserter, converter); } } } catch (document::FieldNotFoundException&) { @@ -393,14 +400,14 @@ DocsumFilter::get_summary_field(uint32_t entry_idx, const Document& doc) } void -DocsumFilter::insert_summary_field(uint32_t entry_idx, const Document& doc, vespalib::slime::Inserter& inserter) +DocsumFilter::insert_summary_field(uint32_t entry_idx, const Document& doc, vespalib::slime::Inserter& inserter, IStringFieldConverter* converter) { const auto& field_spec = _fields[entry_idx]; auto single_source_field_id = get_single_source_field_id(field_spec); if (single_source_field_id.has_value()) { auto field_value = doc.getField(single_source_field_id.value()); if (field_value != nullptr) { - SlimeFiller::insert_summary_field_with_field_filter(*field_value, inserter, field_spec.get_filter()); + SlimeFiller::insert_summary_field_with_field_filter(*field_value, inserter, converter, field_spec.get_filter()); } return; } diff --git a/streamingvisitors/src/vespa/vsm/vsm/docsumfilter.h b/streamingvisitors/src/vespa/vsm/vsm/docsumfilter.h index 584f7c8141e..2232d723781 100644 --- a/streamingvisitors/src/vespa/vsm/vsm/docsumfilter.h +++ b/streamingvisitors/src/vespa/vsm/vsm/docsumfilter.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 @@ -13,6 +13,8 @@ using search::docsummary::IDocsumStore; +namespace search::docsummary { class IStringFieldConverter; } + namespace vsm { /** @@ -66,7 +68,7 @@ public: std::unique_ptr<const search::docsummary::IDocsumStoreDocument> get_document(uint32_t id) override; search::docsummary::DocsumStoreFieldValue get_summary_field(uint32_t entry_idx, const Document& doc); - void insert_summary_field(uint32_t entry_idx, const Document& doc, vespalib::slime::Inserter& inserter); + void insert_summary_field(uint32_t entry_idx, const Document& doc, vespalib::slime::Inserter& inserter, search::docsummary::IStringFieldConverter* converter); bool has_flatten_juniper_command(uint32_t entry_idx) const; FieldModifier* get_field_modifier(uint32_t entry_idx); }; diff --git a/streamingvisitors/src/vespa/vsm/vsm/fieldsearchspec.cpp b/streamingvisitors/src/vespa/vsm/vsm/fieldsearchspec.cpp index 5f0be889621..fdde633bd91 100644 --- a/streamingvisitors/src/vespa/vsm/vsm/fieldsearchspec.cpp +++ b/streamingvisitors/src/vespa/vsm/vsm/fieldsearchspec.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 "fieldsearchspec.h" #include <vespa/vespalib/stllike/asciistream.h> diff --git a/streamingvisitors/src/vespa/vsm/vsm/fieldsearchspec.h b/streamingvisitors/src/vespa/vsm/vsm/fieldsearchspec.h index 0fa0eca4357..b0154a82dae 100644 --- a/streamingvisitors/src/vespa/vsm/vsm/fieldsearchspec.h +++ b/streamingvisitors/src/vespa/vsm/vsm/fieldsearchspec.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/searchcommon/attribute/distance_metric.h> diff --git a/streamingvisitors/src/vespa/vsm/vsm/flattendocsumwriter.cpp b/streamingvisitors/src/vespa/vsm/vsm/flattendocsumwriter.cpp index 06b652d85e6..dcb5f3598bc 100644 --- a/streamingvisitors/src/vespa/vsm/vsm/flattendocsumwriter.cpp +++ b/streamingvisitors/src/vespa/vsm/vsm/flattendocsumwriter.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 "flattendocsumwriter.h" #include <vespa/document/fieldvalue/fieldvalues.h> diff --git a/streamingvisitors/src/vespa/vsm/vsm/flattendocsumwriter.h b/streamingvisitors/src/vespa/vsm/vsm/flattendocsumwriter.h index 47c6f1e75d0..f6eb29f9f7e 100644 --- a/streamingvisitors/src/vespa/vsm/vsm/flattendocsumwriter.h +++ b/streamingvisitors/src/vespa/vsm/vsm/flattendocsumwriter.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/document/fieldvalue/fieldvalue.h> diff --git a/streamingvisitors/src/vespa/vsm/vsm/i_matching_elements_filler.h b/streamingvisitors/src/vespa/vsm/vsm/i_matching_elements_filler.h index a35cea40cec..2f04abe5059 100644 --- a/streamingvisitors/src/vespa/vsm/vsm/i_matching_elements_filler.h +++ b/streamingvisitors/src/vespa/vsm/vsm/i_matching_elements_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 diff --git a/streamingvisitors/src/vespa/vsm/vsm/query_term_filter_factory.cpp b/streamingvisitors/src/vespa/vsm/vsm/query_term_filter_factory.cpp index 262a557334e..2ed3c81027f 100644 --- a/streamingvisitors/src/vespa/vsm/vsm/query_term_filter_factory.cpp +++ b/streamingvisitors/src/vespa/vsm/vsm/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 <vespa/searchsummary/docsummary/query_term_filter.h> diff --git a/streamingvisitors/src/vespa/vsm/vsm/query_term_filter_factory.h b/streamingvisitors/src/vespa/vsm/vsm/query_term_filter_factory.h index a0f518b90b0..e3224264cda 100644 --- a/streamingvisitors/src/vespa/vsm/vsm/query_term_filter_factory.h +++ b/streamingvisitors/src/vespa/vsm/vsm/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/streamingvisitors/src/vespa/vsm/vsm/snippetmodifier.cpp b/streamingvisitors/src/vespa/vsm/vsm/snippetmodifier.cpp index 5d29ca993f2..2b356b03c39 100644 --- a/streamingvisitors/src/vespa/vsm/vsm/snippetmodifier.cpp +++ b/streamingvisitors/src/vespa/vsm/vsm/snippetmodifier.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 "snippetmodifier.h" #include <vespa/document/fieldvalue/stringfieldvalue.h> diff --git a/streamingvisitors/src/vespa/vsm/vsm/snippetmodifier.h b/streamingvisitors/src/vespa/vsm/vsm/snippetmodifier.h index c6ca115bda2..7c233608210 100644 --- a/streamingvisitors/src/vespa/vsm/vsm/snippetmodifier.h +++ b/streamingvisitors/src/vespa/vsm/vsm/snippetmodifier.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 "fieldsearchspec.h" diff --git a/streamingvisitors/src/vespa/vsm/vsm/vsm-adapter.cpp b/streamingvisitors/src/vespa/vsm/vsm/vsm-adapter.cpp index 50ee380cac9..1720fb0b3d1 100644 --- a/streamingvisitors/src/vespa/vsm/vsm/vsm-adapter.cpp +++ b/streamingvisitors/src/vespa/vsm/vsm/vsm-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 "vsm-adapter.hpp" #include "docsum_field_writer_factory.h" diff --git a/streamingvisitors/src/vespa/vsm/vsm/vsm-adapter.h b/streamingvisitors/src/vespa/vsm/vsm/vsm-adapter.h index 975df673afe..d3b3abd5fbc 100644 --- a/streamingvisitors/src/vespa/vsm/vsm/vsm-adapter.h +++ b/streamingvisitors/src/vespa/vsm/vsm/vsm-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/streamingvisitors/src/vespa/vsm/vsm/vsm-adapter.hpp b/streamingvisitors/src/vespa/vsm/vsm/vsm-adapter.hpp index f071dbb2015..7926b6a2f6e 100644 --- a/streamingvisitors/src/vespa/vsm/vsm/vsm-adapter.hpp +++ b/streamingvisitors/src/vespa/vsm/vsm/vsm-adapter.hpp @@ -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 |