-
Notifications
You must be signed in to change notification settings - Fork 802
Store.save raises if document id provided in _id field #964
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
Comments
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This looks a bit aggressive closing policy to me given that there were no commits for 4 months. Is this repository still actively maintained? |
@mariokostelac sorry about that, the repository is still being maintained but other work has taken priority over it. That being said I am modifying |
@picandocodigo that makes perfect sense. Thanks for being transparent. |
Store.save(document)
with a document serializing_id
field raises because ElasticSearch does not allow_id
being serialized as part of the document body.While investigating the fix, I've found interesting differences between
update
andsave
methods__extract_id_from_document
, whichid
as_id
for routing_id
andid
from the documentid
outside of_id
fieldid
as_id
for routing__get_id_from_document
, whichid
as_id
for routing_id
orid
from the documentid
if it exists_id
.Having this behaviour forces users to define :id field, instead of being able to define :_id only. Is this a bug or such behaviour is introduced on purpose?
If it's on purpose, I'd like to get some guidance on using :id and :_id field with this gem.
The text was updated successfully, but these errors were encountered: