Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Pull IndigoRecord attribute as the document ID for index updates in bingo-elastic #1987

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

rvaidya
Copy link

@rvaidya rvaidya commented Jun 5, 2024

Currently, there is no way to update existing records in ElasticSearch when calling ElasticRepository.indexRecords in bingo. This leads to lots of duplicate documents being inserted.

This uses the IndigoRecord internalID field as the ID field for the document, so that existing documents can be updated.

@rvaidya rvaidya changed the title use IndigoRecord.internalID as the document ID for index updates in bingo-elastic Pull IndigoRecord attribute as the document ID for index updates in bingo-elastic Jun 5, 2024
@rvaidya
Copy link
Author

rvaidya commented Jun 5, 2024

Made the attribute used for document id configurable - can either provide your own mapper from IndigoRecord to document id (if you want to pull from custom objects), or use IndigoRecord.internalID

Also provide optional implementation for auto flushing index

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant