Skip to content

Commit 49f51f2

Browse files
authored
azureaisearch: prefer using hybrid_top_k over similarity_top_k for hybrid search (#17612)
1 parent 0391539 commit 49f51f2

File tree

2 files changed

+3
-2
lines changed
  • llama-index-integrations/vector_stores/llama-index-vector-stores-azureaisearch

2 files changed

+3
-2
lines changed

llama-index-integrations/vector_stores/llama-index-vector-stores-azureaisearch/llama_index/vector_stores/azureaisearch/base.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1567,7 +1567,8 @@ def _create_query_vector(self) -> Optional[List[Any]]:
15671567

15681568
vectorized_query = VectorizedQuery(
15691569
vector=self._query.query_embedding,
1570-
k_nearest_neighbors=self._query.similarity_top_k,
1570+
k_nearest_neighbors=self._query.hybrid_top_k
1571+
or self._query.similarity_top_k,
15711572
fields=self._field_mapping["embedding"],
15721573
)
15731574
vector_queries = [vectorized_query]

llama-index-integrations/vector_stores/llama-index-vector-stores-azureaisearch/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ exclude = ["**/BUILD"]
2828
license = "MIT"
2929
name = "llama-index-vector-stores-azureaisearch"
3030
readme = "README.md"
31-
version = "0.3.4"
31+
version = "0.3.5"
3232

3333
[tool.poetry.dependencies]
3434
python = ">=3.9,<4.0"

0 commit comments

Comments
 (0)