Skip to content

Commit

Permalink
introduce more hgraph param to config by user (antgroup#226)
Browse files Browse the repository at this point in the history
Signed-off-by: LHT129 <[email protected]>
  • Loading branch information
LHT129 authored Dec 19, 2024
1 parent cdc79d0 commit 413d456
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
2 changes: 2 additions & 0 deletions include/vsag/constants.h
Original file line number Diff line number Diff line change
Expand Up @@ -101,5 +101,7 @@ extern const char* const HGRAPH_USE_REORDER;
extern const char* const HGRAPH_BASE_QUANTIZATION_TYPE;
extern const char* const HGRAPH_GRAPH_MAX_DEGREE;
extern const char* const HGRAPH_BUILD_EF_CONSTRUCTION;
extern const char* const HGRAPH_INIT_CAPACITY;
extern const char* const HGRAPH_BUILD_THREAD_COUNT;

} // namespace vsag
2 changes: 2 additions & 0 deletions src/constants.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,5 +102,7 @@ const char* const HGRAPH_USE_REORDER = HGRAPH_USE_REORDER_KEY;
const char* const HGRAPH_BASE_QUANTIZATION_TYPE = "base_quantization_type";
const char* const HGRAPH_GRAPH_MAX_DEGREE = "max_degree";
const char* const HGRAPH_BUILD_EF_CONSTRUCTION = "ef_construction";
const char* const HGRAPH_INIT_CAPACITY = "hgraph_init_capacity";
const char* const HGRAPH_BUILD_THREAD_COUNT = "build_thread_count";

}; // namespace vsag
4 changes: 3 additions & 1 deletion src/index/hgraph_zparameters.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ const std::unordered_map<std::string, std::vector<std::string>> HGraphParameters
{{HGRAPH_USE_REORDER, {HGRAPH_USE_REORDER_KEY}},
{HGRAPH_BASE_QUANTIZATION_TYPE, {HGRAPH_BASE_CODES_KEY, QUANTIZATION_TYPE_KEY}},
{HGRAPH_GRAPH_MAX_DEGREE, {HGRAPH_GRAPH_KEY, GRAPH_PARAMS_KEY, GRAPH_PARAM_MAX_DEGREE}},
{HGRAPH_BUILD_EF_CONSTRUCTION, {BUILD_PARAMS_KEY, BUILD_EF_CONSTRUCTION}}};
{HGRAPH_BUILD_EF_CONSTRUCTION, {BUILD_PARAMS_KEY, BUILD_EF_CONSTRUCTION}},
{HGRAPH_INIT_CAPACITY, {HGRAPH_GRAPH_KEY, GRAPH_PARAMS_KEY, GRAPH_PARAM_INIT_MAX_CAPACITY}},
{HGRAPH_BUILD_THREAD_COUNT, {BUILD_PARAMS_KEY, BUILD_THREAD_COUNT}}};

HGraphParameters::HGraphParameters(JsonType& hgraph_param, const IndexCommonParam& common_param)
: common_param_(common_param) {
Expand Down

0 comments on commit 413d456

Please sign in to comment.