Skip to content

Commit

Permalink
Output distance file in memory index search (#382)
Browse files Browse the repository at this point in the history
* Output distance file

* fix

---------

Co-authored-by: Shengjie Qian <[email protected]>
  • Loading branch information
initc and Shengjie Qian authored Jun 28, 2023
1 parent d6d2719 commit 132b62a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion apps/search_memory_index.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -247,8 +247,14 @@ int search_memory_index(diskann::Metric &metric, const std::string &index_path,
diskann::cout << "Ignoring search with L:" << L << " since it's smaller than K:" << recall_at << std::endl;
continue;
}
std::string cur_result_path = result_path_prefix + "_" + std::to_string(L) + "_idx_uint32.bin";
std::string cur_result_path_prefix = result_path_prefix + "_" + std::to_string(L);

std::string cur_result_path = cur_result_path_prefix + "_idx_uint32.bin";
diskann::save_bin<uint32_t>(cur_result_path, query_result_ids[test_id].data(), query_num, recall_at);

cur_result_path = cur_result_path_prefix + "_dists_float.bin";
diskann::save_bin<float>(cur_result_path, query_result_dists[test_id].data(), query_num, recall_at);

test_id++;
}

Expand Down

0 comments on commit 132b62a

Please sign in to comment.