Package org.cyclos.impl.search
Interface SearchHandler
-
- All Superinterfaces:
ApplicationInitializationListener,BaseApplicationInitializationListener,CustomBean
- All Known Implementing Classes:
DbSearchHandlerImpl,ElasticsearchSearchHandlerImpl,PostgresqlSearchHandlerImpl
public interface SearchHandler extends CustomBean, ApplicationInitializationListener
Handler used to perform [full-text / geo-distance] searches, as well as eventually handling indexing on entities. The entities that can be searched are: users, contacts, advertisements and records.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classSearchHandler.PerformIndexResult
-
Field Summary
Fields Modifier and Type Field Description static intINDEX_BATCH_SIZEThe maximum number of entities that should be batched to be indexed at once-
Fields inherited from interface org.cyclos.impl.BaseApplicationInitializationListener
MAX_PRIORITY, MIN_PRIORITY, NORMAL_PRIORITY
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description AdSearchHandlerad()Returns the handler for searching advertisementsContactSearchHandlercontact()Returns the handler for searching contactsInstallmentSearchHandlerinstallment()Returns the handler for searching installmentsbooleanisPhraseSearchSupported()Returns whether phrase searches are supported within full-text queriesbooleanisTranslationSupported()Returns whether translated values are supportedSearchHandler.PerformIndexResultperformIndex(String index, List<Long> ids)Updates the given index for the entity with the given identifiers.RecordSearchHandlerrecord()Returns the handler for searching recordsvoidreindex()Reindexes all data.<S extends SearchHandler>
Sself()Returns the own implementationTransactionSearchHandlertransaction()Returns the handler for searching transactionsTransferSearchHandlertransfer()Returns the handler for searching transfersUserSearchHandleruser()Returns the handler for searching users-
Methods inherited from interface org.cyclos.impl.ApplicationInitializationListener
onApplicationInitialization
-
Methods inherited from interface org.cyclos.impl.BaseApplicationInitializationListener
applicationInitializationPriority, getInitializationId
-
-
-
-
Field Detail
-
INDEX_BATCH_SIZE
static final int INDEX_BATCH_SIZE
The maximum number of entities that should be batched to be indexed at once- See Also:
- Constant Field Values
-
-
Method Detail
-
ad
AdSearchHandler ad()
Returns the handler for searching advertisements
-
contact
ContactSearchHandler contact()
Returns the handler for searching contacts
-
installment
InstallmentSearchHandler installment()
Returns the handler for searching installments
-
isPhraseSearchSupported
boolean isPhraseSearchSupported()
Returns whether phrase searches are supported within full-text queries
-
isTranslationSupported
boolean isTranslationSupported()
Returns whether translated values are supported
-
performIndex
SearchHandler.PerformIndexResult performIndex(String index, List<Long> ids)
Updates the given index for the entity with the given identifiers.- Returns:
- Either null, indicating a no-op, or a result with the affected rows and failures.
-
record
RecordSearchHandler record()
Returns the handler for searching records
-
reindex
void reindex()
Reindexes all data. This is only called by scripts, in case the admin needs to reindex the data
-
self
<S extends SearchHandler> S self()
Returns the own implementation
-
transaction
TransactionSearchHandler transaction()
Returns the handler for searching transactions
-
transfer
TransferSearchHandler transfer()
Returns the handler for searching transfers
-
user
UserSearchHandler user()
Returns the handler for searching users
-
-