test: improve vector store tests (#3855)
This commit is contained in:
parent
4d66a86579
commit
045827043d
6 changed files with 58 additions and 74 deletions
|
|
@ -1,7 +1,7 @@
|
|||
from core.rag.datasource.vdb.milvus.milvus_vector import MilvusConfig, MilvusVector
|
||||
from tests.integration_tests.vdb.test_vector_store import (
|
||||
AbstractTestVector,
|
||||
get_sample_text,
|
||||
get_example_text,
|
||||
setup_mock_redis,
|
||||
)
|
||||
|
||||
|
|
@ -21,15 +21,15 @@ class TestMilvusVector(AbstractTestVector):
|
|||
|
||||
def search_by_full_text(self):
|
||||
# milvus dos not support full text searching yet in < 2.3.x
|
||||
hits_by_full_text = self.vector.search_by_full_text(query=get_sample_text())
|
||||
hits_by_full_text = self.vector.search_by_full_text(query=get_example_text())
|
||||
assert len(hits_by_full_text) == 0
|
||||
|
||||
def delete_document_by_id(self):
|
||||
self.vector.delete_by_document_id(self.dataset_id)
|
||||
def delete_by_document_id(self):
|
||||
self.vector.delete_by_document_id(document_id=self.example_doc_id)
|
||||
|
||||
def get_ids_by_metadata_field(self):
|
||||
ids = self.vector.get_ids_by_metadata_field('document_id', self.dataset_id)
|
||||
assert len(ids) >= 1
|
||||
ids = self.vector.get_ids_by_metadata_field(key='document_id', value=self.example_doc_id)
|
||||
assert len(ids) == 1
|
||||
|
||||
|
||||
def test_milvus_vector(setup_mock_redis):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue