Package com.flowable.indexing
Class SearchServiceImpl
java.lang.Object
com.flowable.indexing.SearchServiceImpl
- All Implemented Interfaces:
SearchService
public class SearchServiceImpl extends java.lang.Object implements SearchService
-
Field Summary
Fields Modifier and Type Field Description protected ElasticsearchClient
elasticsearchClient
protected IndexManager
indexManager
protected com.fasterxml.jackson.databind.ObjectMapper
objectMapper
protected java.util.List<LowLevelSearchResultEnhancer>
searchResultEnhancers
protected IndexQueryTemplateResourceHelper
templateResourceHelper
Fields inherited from interface com.flowable.indexing.SearchService
CUSTOM_QUERY_CURRENT_GROUPS, CUSTOM_QUERY_CURRENT_TENANT_ID, CUSTOM_QUERY_CURRENT_TIME, CUSTOM_QUERY_CURRENT_USER_ID
-
Constructor Summary
Constructors Constructor Description SearchServiceImpl(ElasticsearchClient elasticsearchClient, IndexManager indexManager, com.fasterxml.jackson.databind.ObjectMapper objectMapper, ResourceHelper resourceHelper, java.util.List<LowLevelSearchResultEnhancer> searchResultEnhancers)
-
Method Summary
Modifier and Type Method Description com.fasterxml.jackson.databind.node.ObjectNode
createCustomQueryForParameters(IndexMapping indexMapping, java.util.Map<java.lang.String,java.lang.Object> params)
protected static java.lang.String
escape(java.lang.String s)
com.fasterxml.jackson.databind.node.ObjectNode
getSourceById(java.lang.String index, java.lang.String id)
This queries by id and removes the boilerplate json (_shards, hits, etc) from the result: it only returns the _source element of the query result.protected java.lang.String
groupIdsToJsonArray(java.util.Set<java.lang.String> groups)
protected com.fasterxml.jackson.databind.node.ObjectNode
handleQueryWithCustomFilter(IndexMapping indexMapping, CustomIndexConfiguration customIndexConfiguration, java.util.Map<java.lang.String,java.lang.Object> params, java.util.Map<java.lang.String,java.lang.String> configParams)
protected com.fasterxml.jackson.databind.node.ObjectNode
handleQueryWithTemplate(java.util.Map<java.lang.String,java.lang.Object> params, CustomIndexConfiguration customIndexConfiguration)
com.fasterxml.jackson.databind.JsonNode
query(java.lang.String index, java.lang.String queryBody)
com.fasterxml.jackson.databind.node.ObjectNode
resolveCustomQuery(java.lang.String indexName, java.lang.String queryName, java.util.Map<java.lang.String,java.lang.Object> params)
-
Field Details
-
elasticsearchClient
-
indexManager
-
objectMapper
protected com.fasterxml.jackson.databind.ObjectMapper objectMapper -
searchResultEnhancers
-
templateResourceHelper
-
-
Constructor Details
-
SearchServiceImpl
public SearchServiceImpl(ElasticsearchClient elasticsearchClient, IndexManager indexManager, com.fasterxml.jackson.databind.ObjectMapper objectMapper, ResourceHelper resourceHelper, java.util.List<LowLevelSearchResultEnhancer> searchResultEnhancers)
-
-
Method Details
-
query
public com.fasterxml.jackson.databind.JsonNode query(java.lang.String index, java.lang.String queryBody)- Specified by:
query
in interfaceSearchService
-
resolveCustomQuery
public com.fasterxml.jackson.databind.node.ObjectNode resolveCustomQuery(java.lang.String indexName, java.lang.String queryName, java.util.Map<java.lang.String,java.lang.Object> params)- Specified by:
resolveCustomQuery
in interfaceSearchService
-
createCustomQueryForParameters
public com.fasterxml.jackson.databind.node.ObjectNode createCustomQueryForParameters(IndexMapping indexMapping, java.util.Map<java.lang.String,java.lang.Object> params) -
handleQueryWithCustomFilter
protected com.fasterxml.jackson.databind.node.ObjectNode handleQueryWithCustomFilter(IndexMapping indexMapping, CustomIndexConfiguration customIndexConfiguration, java.util.Map<java.lang.String,java.lang.Object> params, java.util.Map<java.lang.String,java.lang.String> configParams) -
handleQueryWithTemplate
protected com.fasterxml.jackson.databind.node.ObjectNode handleQueryWithTemplate(java.util.Map<java.lang.String,java.lang.Object> params, CustomIndexConfiguration customIndexConfiguration) -
escape
protected static java.lang.String escape(java.lang.String s) -
groupIdsToJsonArray
protected java.lang.String groupIdsToJsonArray(java.util.Set<java.lang.String> groups) -
getSourceById
public com.fasterxml.jackson.databind.node.ObjectNode getSourceById(java.lang.String index, java.lang.String id)Description copied from interface:SearchService
This queries by id and removes the boilerplate json (_shards, hits, etc) from the result: it only returns the _source element of the query result.- Specified by:
getSourceById
in interfaceSearchService
-