mirror of
https://github.com/spring-projects/spring-data-elasticsearch.git
synced 2025-06-15 08:32:18 +00:00
DATAES-141 add new constructor to fix: Mapping Context is null in
DefaultResultMapper when using custom Entitymapper (cherry picked from commit 2367d89)
This commit is contained in:
parent
acecc003cb
commit
0eaa4db1af
@ -65,6 +65,13 @@ public class DefaultResultMapper extends AbstractResultMapper {
|
|||||||
super(entityMapper);
|
super(entityMapper);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public DefaultResultMapper(
|
||||||
|
MappingContext<? extends ElasticsearchPersistentEntity<?>, ElasticsearchPersistentProperty> mappingContext,
|
||||||
|
EntityMapper entityMapper) {
|
||||||
|
super(entityMapper);
|
||||||
|
this.mappingContext = mappingContext;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public <T> FacetedPage<T> mapResults(SearchResponse response, Class<T> clazz, Pageable pageable) {
|
public <T> FacetedPage<T> mapResults(SearchResponse response, Class<T> clazz, Pageable pageable) {
|
||||||
long totalHits = response.getHits().totalHits();
|
long totalHits = response.getHits().totalHits();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user