summaryrefslogtreecommitdiffstats
path: root/searchcore
diff options
context:
space:
mode:
authorGeir Storli <geirst@verizonmedia.com>2020-07-09 14:19:26 +0000
committerGeir Storli <geirst@verizonmedia.com>2020-07-09 14:19:26 +0000
commit9016fa2b7f0e42bbf4097f6678a607d28858b14b (patch)
treebe98f737268a3ab0f46b0ea5cc2cdcd33ddfb4a7 /searchcore
parent66fa206a9e95fc5a0888b3a2949d70a9ab46d430 (diff)
Add support for matched-elements-only for array and weighted set attributes.
Diffstat (limited to 'searchcore')
-rw-r--r--searchcore/src/vespa/searchcore/proton/matching/docsum_matcher.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/searchcore/src/vespa/searchcore/proton/matching/docsum_matcher.cpp b/searchcore/src/vespa/searchcore/proton/matching/docsum_matcher.cpp
index c8d0a572cd9..361fde48aa8 100644
--- a/searchcore/src/vespa/searchcore/proton/matching/docsum_matcher.cpp
+++ b/searchcore/src/vespa/searchcore/proton/matching/docsum_matcher.cpp
@@ -128,6 +128,8 @@ void find_matching_elements(const MatchingElementsFields &fields, const std::vec
} else if (const AttrSearchCtx *attr_ctx = bp.get_attribute_search_context()) {
if (fields.has_struct_field(attr_ctx->attributeName())) {
find_matching_elements(docs, fields.get_enclosing_field(attr_ctx->attributeName()), *attr_ctx, result);
+ } else if (fields.has_field(attr_ctx->attributeName())) {
+ find_matching_elements(docs, attr_ctx->attributeName(), *attr_ctx, result);
}
} else if (auto and_not = as<AndNotBlueprint>(bp)) {
find_matching_elements(fields, docs, and_not->getChild(0), result);