use of org.springframework.data.elasticsearch.core.convert.MappingElasticsearchConverter in project spring-data-elasticsearch by spring-projects.
the class ElasticsearchConfigurationSupport method elasticsearchEntityMapper.
@Bean
public ElasticsearchConverter elasticsearchEntityMapper(SimpleElasticsearchMappingContext elasticsearchMappingContext, ElasticsearchCustomConversions elasticsearchCustomConversions) {
MappingElasticsearchConverter elasticsearchConverter = new MappingElasticsearchConverter(elasticsearchMappingContext);
elasticsearchConverter.setConversions(elasticsearchCustomConversions);
return elasticsearchConverter;
}
use of org.springframework.data.elasticsearch.core.convert.MappingElasticsearchConverter in project spring-data-elasticsearch by spring-projects.
the class EntityOperationsTest method setUpAll.
@BeforeAll
static void setUpAll() {
mappingContext = new SimpleElasticsearchMappingContext();
mappingContext.setInitialEntitySet(new HashSet<>(Arrays.asList(EntityWithRouting.class)));
mappingContext.afterPropertiesSet();
entityOperations = new EntityOperations(mappingContext);
MappingElasticsearchConverter converter = new MappingElasticsearchConverter(mappingContext, new GenericConversionService());
converter.afterPropertiesSet();
conversionService = converter.getConversionService();
}
use of org.springframework.data.elasticsearch.core.convert.MappingElasticsearchConverter in project spring-data-elasticsearch by spring-projects.
the class RequestFactoryTests method setUpAll.
@BeforeAll
static void setUpAll() {
SimpleElasticsearchMappingContext mappingContext = new SimpleElasticsearchMappingContext();
mappingContext.setInitialEntitySet(new HashSet<>(Arrays.asList(Person.class, EntityWithSeqNoPrimaryTerm.class)));
mappingContext.afterPropertiesSet();
converter = new MappingElasticsearchConverter(mappingContext, new GenericConversionService());
converter.afterPropertiesSet();
requestFactory = new RequestFactory((converter));
}
use of org.springframework.data.elasticsearch.core.convert.MappingElasticsearchConverter in project spring-data-elasticsearch by spring-projects.
the class AbstractElasticsearchTemplate method createElasticsearchConverter.
private ElasticsearchConverter createElasticsearchConverter() {
MappingElasticsearchConverter mappingElasticsearchConverter = new MappingElasticsearchConverter(new SimpleElasticsearchMappingContext());
mappingElasticsearchConverter.afterPropertiesSet();
return mappingElasticsearchConverter;
}
use of org.springframework.data.elasticsearch.core.convert.MappingElasticsearchConverter in project spring-data-elasticsearch by spring-projects.
the class ElasticsearchPartQueryTests method setUp.
@BeforeEach
public void setUp() {
converter = new MappingElasticsearchConverter(new SimpleElasticsearchMappingContext());
when(operations.getElasticsearchConverter()).thenReturn(converter);
}
Aggregations