From 9e650accbae323357890dc1410820d1ae26ef74d Mon Sep 17 00:00:00 2001 From: J Mackenzie Date: Fri, 7 Jun 2019 18:59:36 +1000 Subject: [PATCH] Patch BP (#206) --- src/recursive_graph_bisection.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/recursive_graph_bisection.cpp b/src/recursive_graph_bisection.cpp index 1e17cd5fb..106a88c44 100644 --- a/src/recursive_graph_bisection.cpp +++ b/src/recursive_graph_bisection.cpp @@ -122,11 +122,15 @@ int main(int argc, char const *argv[]) fwd.clear(); documents.clear(); reorder_inverted_index(input_basename, output_basename, mapping); + if(documents_filename) { - auto documents = Payload_Vector<>::from(*documents_filename); + auto doc_buffer = Payload_Vector_Buffer::from_file(*documents_filename); + auto documents = Payload_Vector(doc_buffer); std::vector reordered_documents(documents.size()); - for (size_t i = 0; i < documents.size(); ++i) { + pisa::progress doc_reorder("Reordering documents vector", documents.size()); + for (size_t i = 0; i < documents.size(); ++i) { reordered_documents[mapping[i]] = documents[i]; + doc_reorder.update(1); } encode_payload_vector(reordered_documents.begin(), reordered_documents.end()).to_file(*reordered_documents_filename); }