Skip to content

Commit

Permalink
Merge pull request opensearch-project#256 from VijayanB/update-faiss
Browse files Browse the repository at this point in the history
Move ef_search param from index to mapping
  • Loading branch information
rishabh6788 authored Mar 25, 2024
2 parents ddf643b + dd9e9ef commit ba29d3a
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 @@ -29,15 +26,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 ba29d3a

Please sign in to comment.