File tree Expand file tree Collapse file tree 3 files changed +9
-2
lines changed
elasticsearch/helpers/vectorstore
test_elasticsearch/test_server/test_vectorstore Expand file tree Collapse file tree 3 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -291,7 +291,7 @@ def _hybrid(
291
291
rrf_options ["rank_constant" ] = self .rrf ["rank_constant" ]
292
292
if "window_size" in self .rrf :
293
293
# 'window_size' was renamed to 'rank_window_size', but we support
294
- # the older name for backwards compatiblit
294
+ # the older name for backwards compatibility
295
295
rrf_options ["rank_window_size" ] = self .rrf ["window_size" ]
296
296
if "rank_window_size" in self .rrf :
297
297
rrf_options ["rank_window_size" ] = self .rrf ["rank_window_size" ]
Original file line number Diff line number Diff line change @@ -291,7 +291,7 @@ def _hybrid(
291
291
rrf_options ["rank_constant" ] = self .rrf ["rank_constant" ]
292
292
if "window_size" in self .rrf :
293
293
# 'window_size' was renamed to 'rank_window_size', but we support
294
- # the older name for backwards compatiblit
294
+ # the older name for backwards compatibility
295
295
rrf_options ["rank_window_size" ] = self .rrf ["window_size" ]
296
296
if "rank_window_size" in self .rrf :
297
297
rrf_options ["rank_window_size" ] = self .rrf ["rank_window_size" ]
Original file line number Diff line number Diff line change 33
33
VectorStore ,
34
34
)
35
35
from elasticsearch .helpers .vectorstore ._sync ._utils import model_is_deployed
36
+ from test_elasticsearch .utils import es_version
36
37
37
38
from . import ConsistentFakeEmbeddings , FakeEmbeddings
38
39
@@ -337,6 +338,9 @@ def test_search_knn_with_hybrid_search(
337
338
self , sync_client : Elasticsearch , index : str
338
339
) -> None :
339
340
"""Test end to end construction and search with metadata."""
341
+ if es_version (sync_client ) < (8 , 14 ):
342
+ pytest .skip ("This test requires Elasticsearch 8.14 or newer" )
343
+
340
344
store = VectorStore (
341
345
index = index ,
342
346
retrieval_strategy = DenseVectorStrategy (hybrid = True ),
@@ -401,6 +405,9 @@ def test_search_knn_with_hybrid_search_rrf(
401
405
self , sync_client : Elasticsearch , index : str
402
406
) -> None :
403
407
"""Test end to end construction and rrf hybrid search with metadata."""
408
+ if es_version (sync_client ) < (8 , 14 ):
409
+ pytest .skip ("This test requires Elasticsearch 8.14 or newer" )
410
+
404
411
texts = ["foo" , "bar" , "baz" ]
405
412
406
413
def assert_query (
You can’t perform that action at this time.
0 commit comments