Add test cases for dynamic_templates mappings#443
Add test cases for dynamic_templates mappings#443reta wants to merge 3 commits intoopensearch-project:mainfrom
Conversation
rursprung
left a comment
There was a problem hiding this comment.
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)
@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 |
Signed-off-by: Andriy Redko <drreta@gmail.com>
Signed-off-by: Andriy Redko <drreta@gmail.com>
…arch-project/opensearch-java#1513) Signed-off-by: Andriy Redko <drreta@gmail.com>
this adds a test case to reproduce opensearch-project#1513 essentially this is a port of opensearch-project/spring-data-opensearch#443 which purely uses the `opensearch-java` APIs rather than going through the Spring APIs. this does not attempt to fix the bug, it just adds an ignored test case which will make it easier to reproduce & fix the bug.
this adds a test case to reproduce opensearch-project#1513 essentially this is a port of opensearch-project/spring-data-opensearch#443 which purely uses the `opensearch-java` APIs rather than going through the Spring APIs. this does not attempt to fix the bug, it just adds an ignored test case which will make it easier to reproduce & fix the bug. Signed-off-by: Ralph Ursprung <Ralph.Ursprung@avaloq.com>
|
i've ported this over to |
this adds a test case to reproduce opensearch-project#1513 essentially this is a port of opensearch-project/spring-data-opensearch#443 which purely uses the `opensearch-java` APIs rather than going through the Spring APIs. this does not attempt to fix the bug, it just adds an ignored test case which will make it easier to reproduce & fix the bug. Signed-off-by: Ralph Ursprung <Ralph.Ursprung@avaloq.com>
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.