Interface ElasticsearchResultConverter.ResultMapper<T>
- Type Parameters:
T- the response object type according the index where the search was executed
- All Known Subinterfaces:
ActivityResultMapper, AgentInstanceResultMapper, AgentInvocationResultMapper, CaseInstanceResultMapper, ContentItemResultMapper, ConversationResultMapper, MessageComplianceResultMapper, MessageResultMapper, PlanItemResultMapper, PlatformGlobalSearchResultMapper, PlatformUserResultMapper, ProcessInstanceResultMapper, TaskResultMapper, WorkInstanceResultMapper
- All Known Implementing Classes:
ActivityJsonMapper, AgentInstanceJsonMapper, AgentInvocationJsonMapper, BaseJsonMapper, CaseInstanceJsonMapper, ContentItemJsonMapper, ConversationJsonMapper, MessageComplianceJsonMapper, MessageJsonMapper, PlanItemJsonMapper, PlatformGlobalSearchJsonMapper, PlatformUserMapper, ProcessInstanceJsonMapper, TaskJsonMapper, WorkInstanceJsonMapper
- Enclosing class:
ElasticsearchResultConverter
public static interface ElasticsearchResultConverter.ResultMapper<T>
The result mapper is used to map a hit returned by an Elasticsearch query into a response object. You can either implement this interface directly
or extend from the default implementations.
-
Method Summary
Modifier and TypeMethodDescriptionconvert(tools.jackson.databind.JsonNode sourceNode) Converts the given source node (not the full Elasticsearch hit document, just the source object within it).default TconvertHit(tools.jackson.databind.JsonNode hitNode) Implement this method, if you want to enhance or enrich the response with additional data outside of the source object within the hit document returned by Elasticsearch.
-
Method Details
-
convertHit
Implement this method, if you want to enhance or enrich the response with additional data outside of the source object within the hit document returned by Elasticsearch.- Parameters:
hitNode- the full hit document node as being returned by Elasticsearch- Returns:
- the response object with the mapped / extracted data from the hit
-
convert
Converts the given source node (not the full Elasticsearch hit document, just the source object within it).- Parameters:
sourceNode- the source object as being returned within the Elasticsearch hit document- Returns:
- the converted response object
-