diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2024-02-11 11:41:22 +0000 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2024-02-13 17:37:08 +0000 |
commit | 340d608aa37b5fff24a0916f0320eb131f3558e8 (patch) | |
tree | 9d905ef5d25eb88665864f1a24616387f78938c6 /streamingvisitors/src/vespa/searchvisitor/rankprocessor.cpp | |
parent | a2f05742236b0873bb6991b0134d6991d0b5d4b2 (diff) |
- Add inteface for getting summary features for a single hit too.
- Produce summaryhits for grouping results too.
Diffstat (limited to 'streamingvisitors/src/vespa/searchvisitor/rankprocessor.cpp')
-rw-r--r-- | streamingvisitors/src/vespa/searchvisitor/rankprocessor.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/streamingvisitors/src/vespa/searchvisitor/rankprocessor.cpp b/streamingvisitors/src/vespa/searchvisitor/rankprocessor.cpp index 167d5ecde4c..ac7a61e5888 100644 --- a/streamingvisitors/src/vespa/searchvisitor/rankprocessor.cpp +++ b/streamingvisitors/src/vespa/searchvisitor/rankprocessor.cpp @@ -256,6 +256,19 @@ RankProcessor::calculateFeatureSet() return sf; } +FeatureSet::SP +RankProcessor::calculateFeatureSet(search::DocumentIdT docId) +{ + LOG(debug, "Calculate feature set for docId = %d", docId); + RankProgram &rankProgram = *(_summaryProgram ? _summaryProgram : _rankProgram); + search::fef::FeatureResolver resolver(rankProgram.get_seeds(false)); + LOG(debug, "Feature handles: numNames(%ld)", resolver.num_features()); + RankProgramWrapper wrapper(*_match_data); + FeatureSet::SP sf = _hitCollector->getFeatureSet(wrapper, docId, resolver, _rankSetup.get_feature_rename_map()); + LOG(debug, "Feature set: numFeatures(%u), numDocs(%u)", sf->numFeatures(), sf->numDocs()); + return sf; +} + FeatureValues RankProcessor::calculate_match_features() { |