-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Use MultiFieldMapper as base for the core-mappers #885
Conversation
… serialized json result
If store and enable are the same values as the server are configured as the items are not returned back as response when get-mapping are executed.
@gmarz What do you think of this solution? |
@Tasteful, I like the general idea of this solution- great work. My only reservation is that I think it might be better to introduce a new abstract base class instead of using the existing |
The problem if a new abstract base class are introduced with the fields are The backward compatibility was the reason to still use the I agree that it should be better with probably two base classes (one for Not sure if the backward compatibility can be solved with explicit/implicit
|
Hm, but we can just leave The only downside to this approach is that we'll have this hybrid I can try this out and open a PR, then we can review both and decide which we like better. Thoughts? |
If we in 1.x version let core-mappers (will use Then users that are using the library today can still use that but can also upgrade to the new version that are directly based on the
The json-serialization will be for the For version 2.0 we are renaming the This will also make it possible for users that are using the library to upgrade their code before doing that when the If we in 1.x adding a new This will make it possible to create a multi-field direct direct from a
but the result will be in consequent that we create from one type and getting another type back. |
Hey @Tasteful, take a look at #883, particularly this commit. I don't think this will introduce any breaking changes, and in 2.0 we can simply remove |
Hi @gmarz, this implementation is good for me what I can see now the code will work in future, maybe some more cleanup/refactoring to move other common fields, like The only thing are if you are using the NEST library and have code like below; it will be a breaking change, indirect...
the object The only usage for the It's a hard line to say where the breaking changes are in this case. |
Ah, good catch. 👍
will definitely break. I'll merge your changes into 1.1 and #883 into 2.0. I also agree that we can refactor the base-class further to include more of the common properties- I was actually contemplating doing so in that same PR but wanted to keep the intentions of the fix clear. |
Use MultiFieldMapper as base for the core-mappers
Using MultiFieldMapper as a base class for the other core-mappers will make everything to work and we got the best of two solutions (adding all properties for mapping into MultiFieldMapper (#883) and depricate the MultiFieldMapper) see #873.
This change should not be any breaking change and we are still supporting version of ES (if it exists) that still sending out the "multi_field" as the mapping type.