Package io.jmix.search.searching.impl
Class EntitySearcherImpl
java.lang.Object
io.jmix.search.searching.impl.EntitySearcherImpl
- All Implemented Interfaces:
EntitySearcher
@Component("search_EntitySearcher")
public class EntitySearcherImpl
extends Object
implements EntitySearcher
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.elasticsearch.client.RestHighLevelClientprotected IdSerializationprotected IndexConfigurationManagerprotected InstanceNameProviderprotected Metadataprotected MetadataToolsprotected PolicyStoreprotected SearchPropertiesprotected SearchStrategyManagerprotected DataManagerprotected SecureOperations -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidconfigureHighlight(org.elasticsearch.action.search.SearchRequest searchRequest) protected org.elasticsearch.action.search.SearchRequestcreateBaseSearchRequest(List<String> targetIndexes) protected org.elasticsearch.action.search.SearchRequestcreateSearchRequest(List<String> targetIndexes, SearchContext searchContext, SearchStrategy searchStrategy) protected SearchResultEntrycreateSearchResultEntry(String entityId, String instanceName, String entityName, org.elasticsearch.search.SearchHit searchHit) protected voidfillSearchResult(SearchResultImpl searchResultImpl, Map<MetaClass, List<org.elasticsearch.search.SearchHit>> hitsByEntityName) protected StringformatFieldName(String fieldName) groupSearchHitsByEntity(org.elasticsearch.search.SearchHits searchHits) protected SearchResultImplinitSearchResult(SearchContext searchContext, SearchStrategy searchStrategy) protected booleanisDisplayedField(String fieldName) protected booleanisResultFull(SearchResultImpl searchResultImpl, SearchContext searchContext) protected voidpostStrategyConfiguration(org.elasticsearch.action.search.SearchRequest searchRequest, SearchContext searchContext) reloadIds(MetaClass metaClass, Collection<Object> entityIds) resolveTargetIndexes(SearchContext searchContext) search(SearchContext searchContext) Performs search in search indexes according to providedSearchContextand defaultSearchStrategy.search(SearchContext searchContext, SearchStrategy searchStrategy) Performs search in search indexes according to providedSearchContextandSearchStrategy.searchNextPage(SearchResult previousSearchResult) Performs search of next page according toSearchContextandSearchResultcontained in providedSearchStrategyrelated to previous page.protected voidupdateRequestOffset(org.elasticsearch.action.search.SearchRequest searchRequest, SearchResultImpl searchResult)
-
Field Details
-
esClient
@Autowired protected org.elasticsearch.client.RestHighLevelClient esClient -
metadata
-
metadataTools
-
secureDataManager
-
instanceNameProvider
-
searchProperties
-
idSerialization
-
secureOperations
-
indexConfigurationManager
-
policyStore
-
searchStrategyManager
-
-
Constructor Details
-
EntitySearcherImpl
public EntitySearcherImpl()
-
-
Method Details
-
search
Description copied from interface:EntitySearcherPerforms search in search indexes according to providedSearchContextand defaultSearchStrategy.- Specified by:
searchin interfaceEntitySearcher- Parameters:
searchContext- runtime settings of specific search- Returns:
SearchResultwith found objects
-
search
Description copied from interface:EntitySearcherPerforms search in search indexes according to providedSearchContextandSearchStrategy.- Specified by:
searchin interfaceEntitySearcher- Parameters:
searchContext- runtime settings of specific searchsearchStrategy- the way incoming search text should be processed- Returns:
SearchResultwith found objects
-
searchNextPage
Description copied from interface:EntitySearcherPerforms search of next page according toSearchContextandSearchResultcontained in providedSearchStrategyrelated to previous page.- Specified by:
searchNextPagein interfaceEntitySearcher- Parameters:
previousSearchResult-SearchResultof previous page- Returns:
SearchResultwith found objects
-
initSearchResult
protected SearchResultImpl initSearchResult(SearchContext searchContext, SearchStrategy searchStrategy) -
createSearchRequest
protected org.elasticsearch.action.search.SearchRequest createSearchRequest(List<String> targetIndexes, SearchContext searchContext, SearchStrategy searchStrategy) -
createBaseSearchRequest
-
postStrategyConfiguration
protected void postStrategyConfiguration(org.elasticsearch.action.search.SearchRequest searchRequest, SearchContext searchContext) -
resolveTargetIndexes
-
configureHighlight
protected void configureHighlight(org.elasticsearch.action.search.SearchRequest searchRequest) -
updateRequestOffset
protected void updateRequestOffset(org.elasticsearch.action.search.SearchRequest searchRequest, SearchResultImpl searchResult) -
isResultFull
-
groupSearchHitsByEntity
-
fillSearchResult
protected void fillSearchResult(SearchResultImpl searchResultImpl, Map<MetaClass, List<org.elasticsearch.search.SearchHit>> hitsByEntityName) -
createSearchResultEntry
protected SearchResultEntry createSearchResultEntry(String entityId, String instanceName, String entityName, org.elasticsearch.search.SearchHit searchHit) -
isDisplayedField
-
reloadIds
-
formatFieldName
-