Skip to content

Commit

Permalink
Add new parameter to vector tracks to set vector index type (elastic#537
Browse files Browse the repository at this point in the history
)

* Add new parameter to vector tracks to set vector index type
* Update README.md
* Update index-vectors-only-mapping.json
* Update index-vectors-with-text-mapping.json
* Filter new parameter though tojson

---------

Co-authored-by: Jason Bryan <[email protected]>
  • Loading branch information
benwtrent and inqueue authored Jan 25, 2024
1 parent b812ad8 commit 8f081e2
Show file tree
Hide file tree
Showing 10 changed files with 25 additions and 6 deletions.
1 change: 1 addition & 0 deletions cohere_vector/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,4 @@ This track accepts the following parameters with Rally 0.8.0+ using `--track-par
- post_ingest_sleep (default: false): Whether to pause after ingest and prior to subsequent operations.
- post_ingest_sleep_duration (default: 30): Sleep duration in seconds.
- standalone_search_iterations (default: 10000)
- vector_index_type (default: "hnsw"): The index kind for storing the vectors.
5 changes: 4 additions & 1 deletion cohere_vector/index-vectors-only-mapping.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@
"element_type": "float",
"dims": 768,
"index": true,
"similarity": "max_inner_product"
"similarity": "max_inner_product",
"index_options": {
"type": {{ vector_index_type | default("hnsw") | tojson }}
}
}
}
}
Expand Down
5 changes: 4 additions & 1 deletion cohere_vector/index-vectors-with-text-mapping.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,10 @@
"element_type": "float",
"dims": 768,
"index": true,
"similarity": "max_inner_product"
"similarity": "max_inner_product",
"index_options": {
"type": {{ vector_index_type | default("hnsw") |tojson }}
}
}
}
}
Expand Down
1 change: 1 addition & 0 deletions dense_vector/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,4 @@ This track accepts the following parameters with Rally 0.8.0+ using `--track-par
* `number_of_replicas` (default: 0)
* `post_ingest_sleep` (default: false): Whether to pause after ingest and prior to subsequent operations.
* `post_ingest_sleep_duration` (default: 30): Sleep duration in seconds.
* `vector_index_type` (default: "hnsw"): The index kind for storing the vectors.
2 changes: 1 addition & 1 deletion dense_vector/index.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"index" : true,
"similarity": "dot_product",
"index_options": {
"type": "hnsw",
"type": {{ vector_index_type | default("hnsw") | tojson }},
"m": 32,
"ef_construction": 100
}
Expand Down
1 change: 1 addition & 0 deletions openai_vector/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ This track accepts the following parameters with Rally 0.8.0+ using `--track-par
- post_ingest_sleep_duration (default: 30): Sleep duration in seconds.
- standalone_search_clients (default: 8)
- standalone_search_iterations (default: 10000)
- vector_index_type (default: "hnsw"): The index kind for storing the vectors.

### License

Expand Down
5 changes: 4 additions & 1 deletion openai_vector/index-vectors-only-mapping.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@
"element_type": "float",
"dims": 1536,
"index": true,
"similarity": "dot_product"
"similarity": "dot_product",
"index_options": {
"type": {{ vector_index_type | default("hnsw") | tojson }}
}
}
}
}
Expand Down
5 changes: 4 additions & 1 deletion openai_vector/index-vectors-with-text-mapping.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,10 @@
"element_type": "float",
"dims": 1536,
"index": true,
"similarity": "dot_product"
"similarity": "dot_product",
"index_options": {
"type": {{ vector_index_type | default("hnsw") | tojson }}
}
}
}
}
Expand Down
1 change: 1 addition & 0 deletions so_vector/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ This track accepts the following parameters with Rally 0.8.0+ using `--track-par
* `max_num_segments` (default: 1)
* `include_non_serverless_index_settings` (default: true for non-serverless clusters, false for serverless clusters): Whether to include non-serverless index settings.
* `include_force_merge` (default: true for non-serverless clusters, false for serverless clusters): Whether to include force merge operation.
* `vector_index_type` (default: "hnsw"): The index kind for storing the vectors.

### License
We use the same license for the data as the original data: [CC-SA-4.0](http://creativecommons.org/licenses/by-sa/4.0/).
Expand Down
5 changes: 4 additions & 1 deletion so_vector/index.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,10 @@
"type": "dense_vector",
"dims" : 768,
"index" : true,
"similarity": "dot_product"
"similarity": "dot_product",
"index_options": {
"type": {{ vector_index_type | default("hnsw") | tojson }}
}
},
"acceptedAnswerId": {
"type": "keyword"
Expand Down

0 comments on commit 8f081e2

Please sign in to comment.