-
Notifications
You must be signed in to change notification settings - Fork 195
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
[BUG] Serialize DynamicMapping boolean type #256
Comments
@owaiskazi19 the way the parsers work is we read everything as strings first. Thats how the mapping is used as well, it parses the key and value, expect them to be a string. Do we really need to support |
Thanks for your insight @saratvemulapalli! The reason to support boolean mapping is because of the current mapping file present in the plugins which has the type boolean. Otherwise, we have to create two mapping files one for the plugin and one for extensions. This for maintaining the consistency across the clients. WDYT |
It definitely sounds like a one time change when a plugin moves to extension but anyway thats a totally different conversation which the client doesn't care about. Also reduce pain, could the plugin mapping be updated to |
If currently we have the capability to support boolean mapping and putting However in the case for AD, since OS supports both |
As I just stumbled upon this issue and it took me a minute to figure out what's going wrong, I would also like a fix for this as it's highly confusing at first. |
@patschl What would you propose to be the behavior? Would it be a breaking change? |
My proposal would be that both, a string and boolean values would be valid. I have a pretty simple fix in mind which would not be a breaking change. I'd like to extend the Is there any concern with this approach? |
@patschl Looks good. |
What is the bug?
With boolean type mapping. Ex(check "dynamic": false):
java client returns
This is because boolean values are treated as String.
Converting
"dynamic": false
->"dynamic": "false"
works though.How can one reproduce the bug?
Use a mapping file like and create an index using CreateIndexRequest.
What is the expected behavior?
JavaClient should treat boolean values as booleans and the request should be send successfully to create an index.
What is your host/environment?
Operating system, version.
Do you have any screenshots?
If applicable, add screenshots to help explain your problem.
Do you have any additional context?
Add any other context about the problem.
The text was updated successfully, but these errors were encountered: