Package com.flowable.indexing.utils
Class ElasticsearchResultConverter
- java.lang.Object
-
- com.flowable.indexing.utils.ElasticsearchResultConverter
-
public class ElasticsearchResultConverter extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
ElasticsearchResultConverter.ResultMapper<T>
The result mapper is used to map a hit returned by an Elasticsearch query into a response object.
-
Field Summary
Fields Modifier and Type Field Description static String
NESTED_RESULT_NODE_NAME
static String
RESULT_CONTENT_NODE_NAME
static String
RESULT_CONTENT_SCORE_NODE_NAME
static String
RESULT_CONTENT_SOURCE_NODE_NAME
static String
RESULT_NODE_NAME
static String
TOTAL_COUNT_NODE_NAME
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description protected static <T> List<T>
convertHits(com.fasterxml.jackson.databind.JsonNode hitsRoot, ElasticsearchResultConverter.ResultMapper<T> resultMapper)
static <T> Page<T>
convertSearchResult(com.fasterxml.jackson.databind.JsonNode searchResult, ElasticsearchResultConverter.ResultMapper<T> resultMapper, int start, int size)
static <T> List<T>
convertSearchResultToList(com.fasterxml.jackson.databind.JsonNode searchResult, ElasticsearchResultConverter.ResultMapper<T> resultMapper)
static Optional<com.fasterxml.jackson.databind.JsonNode>
extractFirstContentSourceFromHits(com.fasterxml.jackson.databind.JsonNode resultNode)
static Optional<com.fasterxml.jackson.databind.node.ArrayNode>
extractHits(com.fasterxml.jackson.databind.JsonNode resultNode)
static long
getHitsTotalCount(com.fasterxml.jackson.databind.JsonNode hitsRoot)
-
-
-
Field Detail
-
RESULT_NODE_NAME
public static final String RESULT_NODE_NAME
- See Also:
- Constant Field Values
-
RESULT_CONTENT_NODE_NAME
public static final String RESULT_CONTENT_NODE_NAME
- See Also:
- Constant Field Values
-
RESULT_CONTENT_SOURCE_NODE_NAME
public static final String RESULT_CONTENT_SOURCE_NODE_NAME
- See Also:
- Constant Field Values
-
RESULT_CONTENT_SCORE_NODE_NAME
public static final String RESULT_CONTENT_SCORE_NODE_NAME
- See Also:
- Constant Field Values
-
TOTAL_COUNT_NODE_NAME
public static final String TOTAL_COUNT_NODE_NAME
- See Also:
- Constant Field Values
-
NESTED_RESULT_NODE_NAME
public static final String NESTED_RESULT_NODE_NAME
- See Also:
- Constant Field Values
-
-
Method Detail
-
convertSearchResult
public static <T> Page<T> convertSearchResult(com.fasterxml.jackson.databind.JsonNode searchResult, ElasticsearchResultConverter.ResultMapper<T> resultMapper, int start, int size)
-
convertSearchResultToList
public static <T> List<T> convertSearchResultToList(com.fasterxml.jackson.databind.JsonNode searchResult, ElasticsearchResultConverter.ResultMapper<T> resultMapper)
-
extractHits
public static Optional<com.fasterxml.jackson.databind.node.ArrayNode> extractHits(com.fasterxml.jackson.databind.JsonNode resultNode)
-
extractFirstContentSourceFromHits
public static Optional<com.fasterxml.jackson.databind.JsonNode> extractFirstContentSourceFromHits(com.fasterxml.jackson.databind.JsonNode resultNode)
-
convertHits
protected static <T> List<T> convertHits(com.fasterxml.jackson.databind.JsonNode hitsRoot, ElasticsearchResultConverter.ResultMapper<T> resultMapper)
-
getHitsTotalCount
public static long getHitsTotalCount(com.fasterxml.jackson.databind.JsonNode hitsRoot)
-
-