diff options
author | Tor Egge <Tor.Egge@broadpark.no> | 2020-05-27 00:11:30 +0200 |
---|---|---|
committer | Tor Egge <Tor.Egge@broadpark.no> | 2020-05-27 10:33:07 +0200 |
commit | 555b6a64d56624d8c6e271cf2d74339030efd87a (patch) | |
tree | c0ffab55f54d9d36a282ee2ac42ed60a41a2def6 /searchlib | |
parent | 041116aae2c8882b1dcd4e72d15036fd441a36ba (diff) |
Record need for normal term field match data.
Diffstat (limited to 'searchlib')
-rw-r--r-- | searchlib/src/vespa/searchlib/features/fieldmatch/computer.cpp | 6 | ||||
-rw-r--r-- | searchlib/src/vespa/searchlib/features/fieldmatch/computer.h | 2 |
2 files changed, 8 insertions, 0 deletions
diff --git a/searchlib/src/vespa/searchlib/features/fieldmatch/computer.cpp b/searchlib/src/vespa/searchlib/features/fieldmatch/computer.cpp index 7c3c0c5d638..ab36f18bfa5 100644 --- a/searchlib/src/vespa/searchlib/features/fieldmatch/computer.cpp +++ b/searchlib/src/vespa/searchlib/features/fieldmatch/computer.cpp @@ -35,6 +35,10 @@ Computer::Computer(const ComputerSharedState& shared_state, const PhraseSplitter _alternativeSegmentationsTried(0), _cachedHits(_queryTerms.size()) { + for (const auto &qt : _queryTerms) { + // Record that we need normal term field match data + (void) qt.termData()->lookupField(_fieldId)->getHandle(MatchDataDetails::Normal); + } // num query terms searching in this field + 1 _segments.reserve(getNumQueryTerms() + 1); for (uint32_t i = 0; i < (getNumQueryTerms() + 1); ++i) { @@ -42,6 +46,8 @@ Computer::Computer(const ComputerSharedState& shared_state, const PhraseSplitter } } +Computer::~Computer() = default; + void Computer::reset(uint32_t docId) { diff --git a/searchlib/src/vespa/searchlib/features/fieldmatch/computer.h b/searchlib/src/vespa/searchlib/features/fieldmatch/computer.h index f684f42708a..e4dbde1248a 100644 --- a/searchlib/src/vespa/searchlib/features/fieldmatch/computer.h +++ b/searchlib/src/vespa/searchlib/features/fieldmatch/computer.h @@ -68,6 +68,8 @@ public: */ Computer(const ComputerSharedState& shared_state, const fef::PhraseSplitter& splitter); + ~Computer(); + /** * Resets this object according to the given document id * |