public class HighlightResultMapper extends Object implements org.springframework.data.elasticsearch.core.SearchResultMapper
| Constructor and Description |
|---|
HighlightResultMapper() |
| Modifier and Type | Method and Description |
|---|---|
Map<String,BiConsumer<?,String>> |
getPropertyMapping(Class clazz) |
<T> org.springframework.data.elasticsearch.core.aggregation.AggregatedPage<T> |
mapResults(org.elasticsearch.action.search.SearchResponse searchResponse,
Class<T> clazz,
org.springframework.data.domain.Pageable pageable) |
<T> T |
mapSearchHit(org.elasticsearch.search.SearchHit searchHit,
Class<T> aClass) |
<T> void |
registerHitMapping(Class<T> clazz,
GetPropertyFunction<T,String> getSearchPropertyFunc,
BiConsumer<T,String> setHighLightPropertyFunc)
注册高亮映射
|
<T> void |
registerScoreMapping(Class<T> clazz,
BiConsumer<T,Float> setScorePropertyFunc)
注册分数映射
|
public Map<String,BiConsumer<?,String>> getPropertyMapping(Class clazz)
public <T> void registerScoreMapping(Class<T> clazz, BiConsumer<T,Float> setScorePropertyFunc)
T - 泛型clazz - 类型setScorePropertyFunc - 分数属性public <T> void registerHitMapping(Class<T> clazz, GetPropertyFunction<T,String> getSearchPropertyFunc, BiConsumer<T,String> setHighLightPropertyFunc)
T - 泛型clazz - 类型getSearchPropertyFunc - 搜索属性setHighLightPropertyFunc - 设置高亮属性方法public <T> org.springframework.data.elasticsearch.core.aggregation.AggregatedPage<T> mapResults(org.elasticsearch.action.search.SearchResponse searchResponse,
Class<T> clazz,
org.springframework.data.domain.Pageable pageable)
mapResults in interface org.springframework.data.elasticsearch.core.SearchResultMapperpublic <T> T mapSearchHit(org.elasticsearch.search.SearchHit searchHit,
Class<T> aClass)
mapSearchHit in interface org.springframework.data.elasticsearch.core.SearchResultMapperCopyright © 2021 wz2cool. All rights reserved.