rode / grafeas-elasticsearch

An implementation of the Grafeas storage backend based on Elasticsearch
Apache License 2.0
12 stars 5 forks source link

Rode 47 updateOccurrence #55

Closed gesparza3 closed 3 years ago

gesparza3 commented 3 years ago

This PR implements the updateOccurrence method for updating occurrences with new data. This approach utilizes Elasticsearch's ability to update documents when re-indexing an existing document. This allows us to keep track of the version of documents in Elasticsearch as changes are made to occurrence documents.

In addition a new return variable was added to genericGet to provide the ES document ID for use in targeting an individual occurrence document when making updates.

New unit and integration tests are included with these changes.