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

Smart update with :update index with lazy attributes #11

Merged
merged 4 commits into from
Aug 2, 2024

Conversation

marcosgz
Copy link
Owner

@marcosgz marcosgz commented Aug 2, 2024

Indexes where lazy_document_attribute doc attributes are defined, use the :update method instead of :index during the after commit on update. It should avoid lose data. Note that if the document is not yet indexed, a second attempt using :index request will be done.

marcosgz added 4 commits July 31, 2024 19:15
The document itself may not include the lazy attributes, and by
performing :index request all the updated done through the lazy update
attribute actions will be lost. So updated the logic to attempt push
document using :update api with a :index fallback in case doc does not
exist yet. This behaviour can be overriten by passing with: :index
@marcosgz marcosgz merged commit 6646e96 into main Aug 2, 2024
18 checks passed
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