Class ElasticsearchRecordSearchHandlerImpl
- java.lang.Object
-
- org.cyclos.impl.search.elasticsearch.ElasticsearchEntitySearchHandlerImpl<Record,RecordQuery,RecordVO>
-
- org.cyclos.impl.search.elasticsearch.ElasticsearchRecordSearchHandlerImpl
-
- All Implemented Interfaces:
EntitySearchHandler<Record,RecordQuery,RecordVO>,RecordSearchHandler,RemovableEntitySearchHandler<Record,RecordQuery,RecordVO>
public class ElasticsearchRecordSearchHandlerImpl extends ElasticsearchEntitySearchHandlerImpl<Record,RecordQuery,RecordVO> implements RecordSearchHandler
Searches for users in Elasticsearch
-
-
Field Summary
Fields Modifier and Type Field Description static StringINDEXstatic StringVERSION-
Fields inherited from class org.cyclos.impl.search.elasticsearch.ElasticsearchEntitySearchHandlerImpl
$, client, configurationHandler, contactInfoFieldService, conversionHandler, customFieldValueHandler, cyclosProperties, entityType, groupsHandler, idPath, jsonConverter, logger, nativeQueryHandler, pollingTaskHandler, profileFieldHandler, rawEntityManagerHandler, requestOptions, searchHandler, userLocatorHandler, userService
-
-
Constructor Summary
Constructors Constructor Description ElasticsearchRecordSearchHandlerImpl(ElasticsearchSearchHandlerImpl searchHandler)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<RecordCountResult>counts(User user)Returns the counts of records per type, for the given userprotected voidfillSource(Record record, SourceAccessor source)Appends all source fields from the entity in the given contentStringindexName()Returns the name of the external index, or null if external indexing isn't usedStringindexVersion()The current version for the Elasticsearch indexprotected ResultsCollector<RecordQuery,RecordVO>resultsCollector(RecordQuery params)Returns the results collector to be used on the default queryprotected List<org.elasticsearch.search.sort.SortBuilder<?>>toSort(RecordQuery params)Converts the given query parameters to the sort criteriaprotected org.elasticsearch.index.query.QueryBuildertoWhere(RecordQuery params)Converts the given query parameters to a query condition-
Methods inherited from class org.cyclos.impl.search.elasticsearch.ElasticsearchEntitySearchHandlerImpl
allIdsToIndexQuery, defaultSearchCustomizer, entityToMap, entityToMap, exactMatchNames, fieldWeights, find, findAll, getCreateIndexSource, getFormatter, index, indexAll, indexDescriptorName, iterateEntities, iterateIds, loadScript, main, message, message, phoneNumberNames, preExecuteSearch, reindex, reindexBatchSize, remove, search, search, search, syncIndex, visibility
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.cyclos.impl.search.EntitySearchHandler
index, iterateEntities, iterateIds, reindex, search
-
Methods inherited from interface org.cyclos.impl.search.RemovableEntitySearchHandler
remove
-
-
-
-
Field Detail
-
INDEX
public static final String INDEX
- See Also:
- Constant Field Values
-
VERSION
public static final String VERSION
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ElasticsearchRecordSearchHandlerImpl
public ElasticsearchRecordSearchHandlerImpl(ElasticsearchSearchHandlerImpl searchHandler)
-
-
Method Detail
-
counts
public List<RecordCountResult> counts(User user)
Description copied from interface:RecordSearchHandlerReturns the counts of records per type, for the given user- Specified by:
countsin interfaceRecordSearchHandler
-
indexName
public String indexName()
Description copied from interface:EntitySearchHandlerReturns the name of the external index, or null if external indexing isn't used- Specified by:
indexNamein interfaceEntitySearchHandler<Record,RecordQuery,RecordVO>
-
indexVersion
public String indexVersion()
Description copied from class:ElasticsearchEntitySearchHandlerImplThe current version for the Elasticsearch index- Specified by:
indexVersionin classElasticsearchEntitySearchHandlerImpl<Record,RecordQuery,RecordVO>
-
fillSource
protected void fillSource(Record record, SourceAccessor source)
Description copied from class:ElasticsearchEntitySearchHandlerImplAppends all source fields from the entity in the given content- Specified by:
fillSourcein classElasticsearchEntitySearchHandlerImpl<Record,RecordQuery,RecordVO>
-
resultsCollector
protected ResultsCollector<RecordQuery,RecordVO> resultsCollector(RecordQuery params)
Description copied from class:ElasticsearchEntitySearchHandlerImplReturns the results collector to be used on the default query- Specified by:
resultsCollectorin classElasticsearchEntitySearchHandlerImpl<Record,RecordQuery,RecordVO>
-
toSort
protected List<org.elasticsearch.search.sort.SortBuilder<?>> toSort(RecordQuery params)
Description copied from class:ElasticsearchEntitySearchHandlerImplConverts the given query parameters to the sort criteria- Specified by:
toSortin classElasticsearchEntitySearchHandlerImpl<Record,RecordQuery,RecordVO>
-
toWhere
protected org.elasticsearch.index.query.QueryBuilder toWhere(RecordQuery params)
Description copied from class:ElasticsearchEntitySearchHandlerImplConverts the given query parameters to a query condition- Specified by:
toWherein classElasticsearchEntitySearchHandlerImpl<Record,RecordQuery,RecordVO>
-
-