You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have read and followed the docs and still think this is a bug
Description
I'm seeing an odd behavior which may be a bug on the WeaviateIndex implementation:
I have a document with subindices. Expected Behavior
When that document is saved in the Weaviate store and i then try to save it again, should I expect the record to be updated for the same docarrayid? Actual Behavior
What happens is that the parent index e.g. RecipeIndex doesn't get duplicated. However, all the subindices get created again and they all have the same parent_id. My expectation would be to update the children classes like a RecipeIndex_name that have the same parent_id as the RecipeIndex class I am updating get updated and not duplicated.
###Update
There is the same issue when using store.delitem => only the parent record is deleted. Then subindices are still there after the delete operation.
Example Code
importdocarrayfromdocarray.documentsimportTextDocclassRecipeRecord(BaseDoc):
recipe_id: strname: DocList[TextDoc]
fromdocarray.index.backends.weaviateimportWeaviateDocumentIndeximportweaviatehost="http://localhost:9999"dbconfig=WeaviateDocumentIndex.DBConfig(
host=host,
index_name='RecipeIndex'
) # Replace with your endpoint)store=WeaviateDocumentIndex[RecipeRecord](db_config=dbconfig)
doc=RecipeRecord(
id='id123'recipe_id='id123',
name=DocList[TextDoc]([TextDoc(text='test name',embedding=None)])
)
docList=DocList[RecipeRecord]()
docList.append(doc)
store.index(docList)
#upon running the index again, there will be partial duplicationstore.index(docList)
vincetrep
changed the title
problem with updating existing records on WeaviateIndex store
problem with delete or update existing records on WeaviateIndex store
Jun 9, 2023
Initial Checks
Description
I'm seeing an odd behavior which may be a bug on the WeaviateIndex implementation:
I have a document with subindices.
Expected Behavior
When that document is saved in the Weaviate store and i then try to save it again, should I expect the record to be updated for the same docarrayid?
Actual Behavior
What happens is that the parent index e.g. RecipeIndex doesn't get duplicated. However, all the subindices get created again and they all have the same parent_id. My expectation would be to update the children classes like a RecipeIndex_name that have the same parent_id as the RecipeIndex class I am updating get updated and not duplicated.
###Update
There is the same issue when using store.delitem => only the parent record is deleted. Then subindices are still there after the delete operation.
Example Code
Python, Pydantic & OS Version
Affected Components
The text was updated successfully, but these errors were encountered: