Skip to content

Commit

Permalink
Move ef_search param from index to mapping
Browse files Browse the repository at this point in the history
faiss accepts ef_search as mapping param instead of indexing param.

Signed-off-by: Vijayan Balasubramanian <balasvij@amazon.com>
  • Loading branch information
VijayanB committed Mar 25, 2024
1 parent d234efa commit dd9e9ef
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 13 deletions.
27 changes: 15 additions & 12 deletions vectorsearch/indices/faiss-index.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@
{%- if target_index_replica_shards is defined and target_index_replica_shards %}
,"number_of_replicas": {{ target_index_replica_shards }}
{%- endif %}
{%- if hnsw_ef_search is defined and hnsw_ef_search %}
,"knn.algo_param.ef_search": {{ hnsw_ef_search }}
{%- endif %}
}
},
"mappings": {
Expand All @@ -24,15 +21,21 @@
"space_type": "{{ target_index_space_type }}",
"engine": "faiss",
"parameters": {
{%- if hnsw_ef_construction is defined and hnsw_ef_construction %}
"ef_construction": {{ hnsw_ef_construction }}
{%- endif %}
{%- if hnsw_m is defined and hnsw_m %}
{%- if hnsw_ef_construction is defined and hnsw_ef_construction %}
,
{%- endif %}
"m": {{ hnsw_m }}
{%- endif %}
{%- if hnsw_ef_search is defined and hnsw_ef_search %}
"ef_search": {{ hnsw_ef_search }}
{%- endif %}
{%- if hnsw_ef_construction is defined and hnsw_ef_construction %}
{%- if hnsw_ef_search is defined and hnsw_ef_search %}
,
{%- endif %}
"ef_construction": {{ hnsw_ef_construction }}
{%- endif %}
{%- if hnsw_m is defined and hnsw_m %}
{%- if hnsw_ef_construction is defined and hnsw_ef_construction %}
,
{%- endif %}
"m": {{ hnsw_m }}
{%- endif %}
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion vectorsearch/test_procedures/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"default": false,
"schedule": [
{{ benchmark.collect(parts="common/index-only-schedule.json") }},
{{ benchmark.collect(parts="common/force-merge-schedule.json") }},
{{ benchmark.collect(parts="common/force-merge-schedule.json") }}
]
},
{
Expand Down

0 comments on commit dd9e9ef

Please sign in to comment.