Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Support deleting Odinson docs from index #362

Closed
myedibleenso opened this issue Jan 12, 2022 · 1 comment
Closed

Support deleting Odinson docs from index #362

myedibleenso opened this issue Jan 12, 2022 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@myedibleenso
Copy link
Member

myedibleenso commented Jan 12, 2022

Currently, there is not an easy way to delete an OdinsonDocument from an index. We should add support for deleting a block of documents (sentences).

Proposal

  1. OdinsonIndex.indexOdinsonDoc and its implementations should return the Lucene doc ID of the block's parent.
  1. OdinsonIndexReader should have a helper method (ex. deleteBlockByParentId) to delete a block of documents (sentences) from the index based on the Lucene doc ID of a block's parent (relates to OdinsonDocumentIndexReader.reader.deleteDocument()).

Issues

  • Deleting an OdinsonDocument should mean removing all Lucene documents created from that OdinsonDocument.
  • OdinsonIndexWriter.mkNestedDocument() creates a Lucene document, but that document does not include a field with OdinsonIndexWriter.DOC_ID_FIELD. This makes it easy to overlook when sweeping for all Lucene docs created from an OdinsonDocument.
@myedibleenso myedibleenso added the enhancement New feature or request label Jan 12, 2022
@myedibleenso
Copy link
Member Author

Relates to #279 (NOTE: we likely won't support all of those endpoints in the REST API).

@myedibleenso myedibleenso self-assigned this Jan 15, 2022
myedibleenso added a commit that referenced this issue Jan 15, 2022
working OdinsonIndex.deleteOdinsonDoc w/ tests
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant