Search in sources :

Example 1 with InnerField

use of org.springframework.data.elasticsearch.annotations.InnerField in project spring-data-elasticsearch by spring-projects.

the class MappingParametersTest method shouldCreateParametersForInnerFieldAnnotation.

// DATAES-621
@Test
public void shouldCreateParametersForInnerFieldAnnotation() {
    MultiField multiField = entity.getRequiredPersistentProperty("mainField").findAnnotation(MultiField.class);
    InnerField innerField = multiField.otherFields()[0];
    MappingParameters mappingParameters = MappingParameters.from(innerField);
    assertThat(mappingParameters).isNotNull();
}
Also used : InnerField(org.springframework.data.elasticsearch.annotations.InnerField) MultiField(org.springframework.data.elasticsearch.annotations.MultiField) Test(org.junit.jupiter.api.Test)

Aggregations

Test (org.junit.jupiter.api.Test)1 InnerField (org.springframework.data.elasticsearch.annotations.InnerField)1 MultiField (org.springframework.data.elasticsearch.annotations.MultiField)1