Package com.flowable.indexing
Class SearchServiceImpl
- java.lang.Object
-
- com.flowable.indexing.SearchServiceImpl
-
- All Implemented Interfaces:
SearchService
public class SearchServiceImpl extends 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 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, List<LowLevelSearchResultEnhancer> searchResultEnhancers)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description com.fasterxml.jackson.databind.node.ObjectNode
createCustomQueryForParameters(com.fasterxml.jackson.databind.JsonNode customFilter, String queryName, Map<String,ConfigParameter> configParameters, Map<String,Object> payload)
com.fasterxml.jackson.databind.node.ObjectNode
createCustomQueryForParameters(IndexMapping indexMapping, Map<String,Object> params)
com.fasterxml.jackson.databind.node.ObjectNode
createCustomQueryForParameters(String templateResource, Map<String,Object> payload)
protected static String
escape(String s)
protected static String
escapeStringType(String s)
protected Stream<String>
getParamsStreamValue(String paramKey, Map<String,Object> params, ConfigParameter configParameter, String configName)
protected String
getParamsStringValue(String paramKey, Map<String,Object> params, ConfigParameter configParameter, String configName)
com.fasterxml.jackson.databind.node.ObjectNode
getSourceById(String index, 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 String
groupIdsToJsonArray(Set<String> groups)
protected com.fasterxml.jackson.databind.node.ObjectNode
handleQueryWithCustomFilter(IndexMapping indexMapping, CustomIndexConfiguration customIndexConfiguration, Map<String,Object> params, Map<String,ConfigParameter> configParams)
protected com.fasterxml.jackson.databind.node.ObjectNode
handleQueryWithCustomFilter(String indexMapping, String configName, Map<String,Object> params, Map<String,ConfigParameter> configParams)
protected com.fasterxml.jackson.databind.node.ObjectNode
handleQueryWithTemplate(Map<String,Object> params, CustomIndexConfiguration customIndexConfiguration)
protected com.fasterxml.jackson.databind.node.ObjectNode
handleQueryWithTemplate(Map<String,Object> params, String templateResource)
com.fasterxml.jackson.databind.JsonNode
query(String index, String queryBody)
com.fasterxml.jackson.databind.node.ObjectNode
resolveCustomQuery(String indexName, String queryName, Map<String,Object> params)
-
-
-
Field Detail
-
elasticsearchClient
protected ElasticsearchClient elasticsearchClient
-
indexManager
protected IndexManager indexManager
-
objectMapper
protected com.fasterxml.jackson.databind.ObjectMapper objectMapper
-
searchResultEnhancers
protected List<LowLevelSearchResultEnhancer> searchResultEnhancers
-
templateResourceHelper
protected IndexQueryTemplateResourceHelper templateResourceHelper
-
-
Constructor Detail
-
SearchServiceImpl
public SearchServiceImpl(ElasticsearchClient elasticsearchClient, IndexManager indexManager, com.fasterxml.jackson.databind.ObjectMapper objectMapper, ResourceHelper resourceHelper, List<LowLevelSearchResultEnhancer> searchResultEnhancers)
-
-
Method Detail
-
query
public com.fasterxml.jackson.databind.JsonNode query(String index, String queryBody)
- Specified by:
query
in interfaceSearchService
-
resolveCustomQuery
public com.fasterxml.jackson.databind.node.ObjectNode resolveCustomQuery(String indexName, String queryName, Map<String,Object> params)
- Specified by:
resolveCustomQuery
in interfaceSearchService
-
createCustomQueryForParameters
public com.fasterxml.jackson.databind.node.ObjectNode createCustomQueryForParameters(com.fasterxml.jackson.databind.JsonNode customFilter, String queryName, Map<String,ConfigParameter> configParameters, Map<String,Object> payload)
- Specified by:
createCustomQueryForParameters
in interfaceSearchService
-
createCustomQueryForParameters
public com.fasterxml.jackson.databind.node.ObjectNode createCustomQueryForParameters(String templateResource, Map<String,Object> payload)
- Specified by:
createCustomQueryForParameters
in interfaceSearchService
-
createCustomQueryForParameters
public com.fasterxml.jackson.databind.node.ObjectNode createCustomQueryForParameters(IndexMapping indexMapping, Map<String,Object> params)
-
handleQueryWithCustomFilter
protected com.fasterxml.jackson.databind.node.ObjectNode handleQueryWithCustomFilter(IndexMapping indexMapping, CustomIndexConfiguration customIndexConfiguration, Map<String,Object> params, Map<String,ConfigParameter> configParams)
-
handleQueryWithCustomFilter
protected com.fasterxml.jackson.databind.node.ObjectNode handleQueryWithCustomFilter(String indexMapping, String configName, Map<String,Object> params, Map<String,ConfigParameter> configParams)
-
handleQueryWithTemplate
protected com.fasterxml.jackson.databind.node.ObjectNode handleQueryWithTemplate(Map<String,Object> params, CustomIndexConfiguration customIndexConfiguration)
-
handleQueryWithTemplate
protected com.fasterxml.jackson.databind.node.ObjectNode handleQueryWithTemplate(Map<String,Object> params, String templateResource)
-
getParamsStringValue
protected String getParamsStringValue(String paramKey, Map<String,Object> params, ConfigParameter configParameter, String configName)
-
getParamsStreamValue
protected Stream<String> getParamsStreamValue(String paramKey, Map<String,Object> params, ConfigParameter configParameter, String configName)
-
getSourceById
public com.fasterxml.jackson.databind.node.ObjectNode getSourceById(String index, 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
-
-