diff options
Diffstat (limited to 'searchlib/src/tests/queryeval/weak_and/rise_wand.h')
-rw-r--r-- | searchlib/src/tests/queryeval/weak_and/rise_wand.h | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/searchlib/src/tests/queryeval/weak_and/rise_wand.h b/searchlib/src/tests/queryeval/weak_and/rise_wand.h index 057cfec1b5d..fc060f7c469 100644 --- a/searchlib/src/tests/queryeval/weak_and/rise_wand.h +++ b/searchlib/src/tests/queryeval/weak_and/rise_wand.h @@ -15,14 +15,14 @@ namespace rise { struct TermFreqScorer { - TermFrequencyScorer _termFrequencyScorer; + [[no_unique_address]] TermFrequencyScorer _termFrequencyScorer; TermFreqScorer() noexcept : _termFrequencyScorer() { } - int64_t calculateMaxScore(const wand::Term &term) { + int64_t calculateMaxScore(const wand::Term &term) const noexcept { return _termFrequencyScorer.calculateMaxScore(term); } - int64_t calculateScore(const wand::Term &term, uint32_t docId) { + static int64_t calculateScore(const wand::Term &term, uint32_t docId) { term.search->unpack(docId); return term.maxScore; } @@ -95,7 +95,7 @@ private: * * @return whether a valid pivot index is found */ - bool _findPivotFeatureIdx(const score_t threshold, uint32_t &pivotIdx); + bool _findPivotFeatureIdx(score_t threshold, uint32_t &pivotIdx); /** * let the first numStreamsToMove streams in the stream @@ -103,7 +103,7 @@ private: * * @param numStreamsToMove the number of streams that should move */ - void _moveStreamsAndSort(const uint32_t numStreamsToMove); + void _moveStreamsAndSort(uint32_t numStreamsToMove); /** * let the first numStreamsToMove streams in the stream @@ -115,7 +115,7 @@ private: * @param desiredDocId desired doc id * */ - void _moveStreamsToDocAndSort(const uint32_t numStreamsToMove, const docid_t desiredDocId); + void _moveStreamsToDocAndSort(uint32_t numStreamsToMove, docid_t desiredDocId); /** * do sort and merge for WAND @@ -124,7 +124,7 @@ private: * be sorted and then merge sort with the rest * */ - void _sortMerge(const uint32_t numStreamsToSort); + void _sortMerge(uint32_t numStreamsToSort); public: RiseWand(const Terms &terms, uint32_t n); @@ -134,8 +134,8 @@ public: void doUnpack(uint32_t docid) override; }; -using TermFrequencyRiseWand = RiseWand<TermFreqScorer, std::greater_equal<uint64_t> >; -using DotProductRiseWand = RiseWand<DotProductScorer, std::greater<uint64_t> >; +using TermFrequencyRiseWand = RiseWand<TermFreqScorer, std::greater_equal<> >; +using DotProductRiseWand = RiseWand<DotProductScorer, std::greater<> >; } // namespacve rise |