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

Question: Document Patches #22

Closed
Crispy1975 opened this issue Mar 22, 2017 · 3 comments
Closed

Question: Document Patches #22

Crispy1975 opened this issue Mar 22, 2017 · 3 comments

Comments

@Crispy1975
Copy link
Contributor

Wanted to get a better understanding of how the various PATCH options work with monstache. We have turned on the enable-patches option to see if we can speed up operations some more (they are fast now, but more speed is always good :)

Does this option stop monstache from removing the ES document and then inserting a fresh copy by updating/patching the existing ES document?

@rwynn
Copy link
Owner

rwynn commented Mar 22, 2017

@Crispy1975,

When enable-patches is set to true, monstache needs to do more work and would actually be slower. Sorry if I was not clear enough with what that setting does. When enabled, monstache will compare new or updated documents from MongoDB to the latest corresponding (by _id) document in Elasticsearch and create a merge patch document will the difference between the two. Then, it will add the difference to the new or update MongoDB document before indexing it into ElasticSearch.

Then enable-patches setting does not affect the behavior of deletes, only inserts and updates. For an insert, the difference is just the whole document itself. For an update, monstache needs to call the Elasticsearch REST API to get the previous version in order to do the compare.

@Crispy1975
Copy link
Contributor Author

@rwynn thanks for the clarification. 👍

@rwynn
Copy link
Owner

rwynn commented Apr 30, 2017

@Crispy1975 just release monstache 3.0 which some major internal changes. There are a couple of configuration changes with regards to Elasticsearch but nothing drastic. Hopefully, this version will give you better performance. Thanks!

@rwynn rwynn closed this as completed Jun 3, 2017
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

No branches or pull requests

2 participants