diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2023-07-26 11:43:36 +0000 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2023-07-28 02:47:23 +0000 |
commit | 062c811dff0e19d7d86f7c1536a8a29ac1e2583f (patch) | |
tree | 330864f32a46fb80c2fa8066bb0a10dcd160a00c | |
parent | 9603d4f58cf9bd327ac640f9270e5be66c4fe421 (diff) |
No need to copy a name you already have.
-rw-r--r-- | searchlib/src/vespa/searchlib/queryeval/matching_elements_search.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/searchlib/src/vespa/searchlib/queryeval/matching_elements_search.cpp b/searchlib/src/vespa/searchlib/queryeval/matching_elements_search.cpp index a5c3bc8c247..4c696be51e3 100644 --- a/searchlib/src/vespa/searchlib/queryeval/matching_elements_search.cpp +++ b/searchlib/src/vespa/searchlib/queryeval/matching_elements_search.cpp @@ -45,7 +45,6 @@ template <typename BufferType, typename AttributeType> class FilterMatchingElementsSearch : public MatchingElementsSearch { const AttributeType& _attr; AttributeContent<BufferType> _content; - vespalib::string _field_name; using EqualFunc = std::conditional_t<std::is_same_v<BufferType, const char *>, EqualCStringValue, std::equal_to<>>; vespalib::hash_set<BufferType, vespalib::hash<BufferType>, EqualFunc> _matches; @@ -59,7 +58,6 @@ template <typename BufferType, typename AttributeType> FilterMatchingElementsSearch<BufferType, AttributeType>::FilterMatchingElementsSearch(const IAttributeVector &attr, EntryRef dictionary_snapshot, vespalib::ConstArrayRef<IDocumentWeightAttribute::LookupResult> dict_entries) : _attr(dynamic_cast<const AttributeType &>(attr)), _content(), - _field_name(_attr.getName()), _matches() { auto dwa = attr.asDocumentWeightAttribute(); @@ -86,7 +84,7 @@ FilterMatchingElementsSearch<BufferType, AttributeType>::find_matching_elements( ++element_id; } if (!_matching_elements.empty()) { - result.add_matching_elements(doc_id, _field_name, _matching_elements); + result.add_matching_elements(doc_id, _attr.getName(), _matching_elements); } } |