aboutsummaryrefslogtreecommitdiffstats
path: root/searchlib
diff options
context:
space:
mode:
authorArne Juul <arnej@verizonmedia.com>2020-02-26 11:09:53 +0000
committerArne Juul <arnej@verizonmedia.com>2020-02-26 11:33:31 +0000
commitbe8f9cc5c7bc8555e766b95b1e0c4cc6a0bb12b1 (patch)
treee5b43e93a5e42aa8cb8f7ce9552bacf932224a30 /searchlib
parentb3eff781ae386d2f169dcde363ecf1f94e1397cd (diff)
rename config variable
Diffstat (limited to 'searchlib')
-rw-r--r--searchlib/src/tests/attribute/tensorattribute/tensorattribute_test.cpp2
-rw-r--r--searchlib/src/vespa/searchlib/tensor/hnsw_index.cpp4
-rw-r--r--searchlib/src/vespa/searchlib/tensor/hnsw_index.h8
3 files changed, 7 insertions, 7 deletions
diff --git a/searchlib/src/tests/attribute/tensorattribute/tensorattribute_test.cpp b/searchlib/src/tests/attribute/tensorattribute/tensorattribute_test.cpp
index 1f3ad7c2fec..a0538952ad9 100644
--- a/searchlib/src/tests/attribute/tensorattribute/tensorattribute_test.cpp
+++ b/searchlib/src/tests/attribute/tensorattribute/tensorattribute_test.cpp
@@ -501,7 +501,7 @@ TEST_F("Hnsw index is instantiated in dense tensor attribute when specified in c
const auto& cfg = hnsw_index->config();
EXPECT_EQUAL(8u, cfg.max_links_at_level_0());
- EXPECT_EQUAL(4u, cfg.max_links_at_hierarchic_levels());
+ EXPECT_EQUAL(4u, cfg.max_links_on_inserts());
EXPECT_EQUAL(20u, cfg.neighbors_to_explore_at_construction());
EXPECT_TRUE(cfg.heuristic_select_neighbors());
}
diff --git a/searchlib/src/vespa/searchlib/tensor/hnsw_index.cpp b/searchlib/src/vespa/searchlib/tensor/hnsw_index.cpp
index a39fdb856f2..1472ba6d21f 100644
--- a/searchlib/src/vespa/searchlib/tensor/hnsw_index.cpp
+++ b/searchlib/src/vespa/searchlib/tensor/hnsw_index.cpp
@@ -47,7 +47,7 @@ HnswIndex::make_default_link_store_config()
uint32_t
HnswIndex::max_links_for_level(uint32_t level) const
{
- return (level == 0) ? _cfg.max_links_at_level_0() : _cfg.max_links_at_hierarchic_levels();
+ return (level == 0) ? _cfg.max_links_at_level_0() : _cfg.max_links_on_inserts();
}
uint32_t
@@ -325,7 +325,7 @@ HnswIndex::add_document(uint32_t docid)
while (search_level >= 0) {
// TODO: Rename to search_level?
search_layer(input, _cfg.neighbors_to_explore_at_construction(), best_neighbors, search_level);
- auto neighbors = select_neighbors(best_neighbors.peek(), _cfg.max_links_at_hierarchic_levels());
+ auto neighbors = select_neighbors(best_neighbors.peek(), _cfg.max_links_on_inserts());
connect_new_node(docid, neighbors.used, search_level);
// TODO: Shrink neighbors if needed
--search_level;
diff --git a/searchlib/src/vespa/searchlib/tensor/hnsw_index.h b/searchlib/src/vespa/searchlib/tensor/hnsw_index.h
index b0c1cd1dcfd..b70efe692ef 100644
--- a/searchlib/src/vespa/searchlib/tensor/hnsw_index.h
+++ b/searchlib/src/vespa/searchlib/tensor/hnsw_index.h
@@ -35,22 +35,22 @@ public:
class Config {
private:
uint32_t _max_links_at_level_0;
- uint32_t _max_links_at_hierarchic_levels;
+ uint32_t _max_links_on_inserts;
uint32_t _neighbors_to_explore_at_construction;
bool _heuristic_select_neighbors;
public:
Config(uint32_t max_links_at_level_0_in,
- uint32_t max_links_at_hierarchic_levels_in,
+ uint32_t max_links_on_inserts_in,
uint32_t neighbors_to_explore_at_construction_in,
bool heuristic_select_neighbors_in)
: _max_links_at_level_0(max_links_at_level_0_in),
- _max_links_at_hierarchic_levels(max_links_at_hierarchic_levels_in),
+ _max_links_on_inserts(max_links_on_inserts_in),
_neighbors_to_explore_at_construction(neighbors_to_explore_at_construction_in),
_heuristic_select_neighbors(heuristic_select_neighbors_in)
{}
uint32_t max_links_at_level_0() const { return _max_links_at_level_0; }
- uint32_t max_links_at_hierarchic_levels() const { return _max_links_at_hierarchic_levels; }
+ uint32_t max_links_on_inserts() const { return _max_links_on_inserts; }
uint32_t neighbors_to_explore_at_construction() const { return _neighbors_to_explore_at_construction; }
bool heuristic_select_neighbors() const { return _heuristic_select_neighbors; }
};