-
Notifications
You must be signed in to change notification settings - Fork 43
Add test cases for dynamic_templates mappings #443
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
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Andriy Redko <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this test only tests whether it can create the index with the mapping but does not verify whether that actually works. as shown in #437 it currently adds something which it shouldn't and thus searching documents fails afterwards. i think it'd be great if this test here could cover that (in which case it'd currently fail until opensearch-project/opensearch-java#1513 gets resolved)
Signed-off-by: Andriy Redko <[email protected]>
@rursprung updated the tests but I have troubles reproducing the failure, could you please help me to craft it properly? Thank you. |
hm, interestingly enough i just created a test case which fails for both ORHLC and OSC (which isn't the bug which i had reported) 😅: in @Test
void shouldCreateDynamicTemplateWithDots() {
IndexOperations indexOperations = operations.indexOps(SampleDynamicTemplatesEntity.class);
assertThat(indexOperations.createWithMapping()).isTrue();
operations.save(new SampleDynamicTemplatesEntity(Map.of("A.B", "Smith")));
assertThat(operations.search(Query.findAll(), SampleDynamicTemplatesEntity.class).get().count()).isEqualTo(1L);
} the only change compared to since i can't push to your branch i created #446 to show a test which actually fails. note that you have to remove the |
@rursprung No, this is not supported: the values with dots are not accepted to |
…arch-project/opensearch-java#1513) Signed-off-by: Andriy Redko <[email protected]>
Description
Add test cases for dynamic_templates mappings
Issues Resolved
Followup on #437
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.