jina-ai / jina-ai/executor-simpleindexer
update endpoint will not insert to index
- Dominant language
- Python
- Stars
- 13
- Forks
- 2
- PR merge metrics
- No merged PRs in 30d
Description
with the update endpoint's code:
```
@requests(on='/update')
def update(self, docs: DocumentArray, **kwargs):
"""Update doc with the same id, if not present, append into storage
:param docs: the documents to update
"""
for doc in docs:
try:
self._index[doc.id] = doc
except IndexError:
self.logger.warning(
f'cannot update doc {doc.id} as it does not exist in storage'
)
```
it just skip doc not in self._index , but the description of the function says " if not present, append into storage"
it will be good if we have a endpoint like upsert
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.