From 44a5b03764221749688010b4b4e6bf055c0297af Mon Sep 17 00:00:00 2001 From: Michal Siedlaczek Date: Tue, 15 Jan 2019 19:07:44 -0500 Subject: [PATCH] Fix block traversal issue --- include/query/algorithm/exhaustive_taat_query.hpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/query/algorithm/exhaustive_taat_query.hpp b/include/query/algorithm/exhaustive_taat_query.hpp index 730f7dca7..4bad21d1b 100644 --- a/include/query/algorithm/exhaustive_taat_query.hpp +++ b/include/query/algorithm/exhaustive_taat_query.hpp @@ -227,14 +227,15 @@ struct Simple_Accumulator : public std::vector { struct Taat_Traversal { template - void static traverse_term(Cursor &cursor, Score score, Acc &acc) { + void static traverse_term(Cursor &cursor, Score score, Acc &acc) + { if constexpr (std::is_same_v) { while (cursor.docid() < acc.size()) { auto const &documents = cursor.document_buffer(); auto const &freqs = cursor.frequency_buffer(); for (uint32_t idx = 0; idx < documents.size(); ++idx) { - acc.accumulate(documents[idx], score(documents[idx], freqs[idx])); + acc.accumulate(documents[idx], score(documents[idx], freqs[idx] + 1)); } cursor.next_block(); }