Merge branch 'fix-milvus' into milvus-for-nullable
This commit is contained in:
commit
25a7408b31
1 changed files with 0 additions and 16 deletions
|
|
@ -220,19 +220,6 @@ class MilvusVectorDBStorage(BaseVectorStorage):
|
|||
logger.debug(f"IndexParams method failed for entity_name: {e}")
|
||||
self._create_scalar_index_fallback("entity_name", "INVERTED")
|
||||
|
||||
try:
|
||||
entity_type_index = self._get_index_params()
|
||||
entity_type_index.add_index(
|
||||
field_name="entity_type", index_type="INVERTED"
|
||||
)
|
||||
self._client.create_index(
|
||||
collection_name=self.namespace,
|
||||
index_params=entity_type_index,
|
||||
)
|
||||
except Exception as e:
|
||||
logger.debug(f"IndexParams method failed for entity_type: {e}")
|
||||
self._create_scalar_index_fallback("entity_type", "INVERTED")
|
||||
|
||||
elif "relationships" in self.namespace.lower():
|
||||
# Create indexes for relationship fields
|
||||
try:
|
||||
|
|
@ -287,7 +274,6 @@ class MilvusVectorDBStorage(BaseVectorStorage):
|
|||
# Create scalar indexes using fallback
|
||||
if "entities" in self.namespace.lower():
|
||||
self._create_scalar_index_fallback("entity_name", "INVERTED")
|
||||
self._create_scalar_index_fallback("entity_type", "INVERTED")
|
||||
elif "relationships" in self.namespace.lower():
|
||||
self._create_scalar_index_fallback("src_id", "INVERTED")
|
||||
self._create_scalar_index_fallback("tgt_id", "INVERTED")
|
||||
|
|
@ -313,14 +299,12 @@ class MilvusVectorDBStorage(BaseVectorStorage):
|
|||
if "entities" in self.namespace.lower():
|
||||
specific_fields = {
|
||||
"entity_name": {"type": "VarChar"},
|
||||
"entity_type": {"type": "VarChar"},
|
||||
"file_path": {"type": "VarChar"},
|
||||
}
|
||||
elif "relationships" in self.namespace.lower():
|
||||
specific_fields = {
|
||||
"src_id": {"type": "VarChar"},
|
||||
"tgt_id": {"type": "VarChar"},
|
||||
"weight": {"type": "Double"},
|
||||
"file_path": {"type": "VarChar"},
|
||||
}
|
||||
elif "chunks" in self.namespace.lower():
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue