Class FakeFulltextIndexService
java.lang.Object
ch.tocco.nice2.enterprisesearch.impl.AbstractFulltextIndexService<Void>
ch.tocco.nice2.enterprisesearch.impl.elasticsearch.FakeFulltextIndexService
- All Implemented Interfaces:
FulltextIndexService
@Component
@Primary
public class FakeFulltextIndexService
extends AbstractFulltextIndexService<Void>
-
Field Summary
Fields inherited from class ch.tocco.nice2.enterprisesearch.impl.AbstractFulltextIndexService
businessUnitManager, commandExecutor, context, dataModel, dataSource, defaultDisplayService, exclusiveOperationInProgress, extractors, localeResolverService, logger, moduleManager, pageLoaderPartitionSize, persistenceService, queryBuilderFactory, queryProcessorService, securityManager, taskSchedulingService, textResources, typeManager
-
Constructor Summary
ConstructorDescriptionFakeFulltextIndexService
(DataModel dataModel, Context context, PersistenceService persistenceService, QueryProcessorService queryProcessorService, DefaultDisplayService defaultDisplayService, BusinessUnitManager businessUnitManager, QueryBuilderFactory queryBuilderFactory, SecurityManager securityManager, LocaleResolverService localeResolverService, TaskSchedulingService taskSchedulingService, DataSource dataSource, TextResources textResources, TypeManager typeManager, org.slf4j.Logger logger, CommandExecutor commandExecutor, ModuleManager moduleManager) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
deleteByEntityModel
(EntityModel entityModel) protected void
deleteByIds
(List<String> ids) protected void
deleteByQuery
(FulltextSearchQuery fulltextSearchQuery) protected void
doAddEntity
(Entity entity) protected void
doDeleteEntity
(EntityId entityId) protected void
doUpdateEntity
(Entity entity) fetchSuggestions
(String queryString) Runs a suggestion query against the index with the specified query string.protected void
handleIndexingForEntity
(EntityList entityList) protected FulltextSearchResponseImpl
handleQuery
(FulltextSearchQuery fulltextSearchQuery) void
Truncates (remove all records) the whole index.Methods inherited from class ch.tocco.nice2.enterprisesearch.impl.AbstractFulltextIndexService
addEntity, checkIndexForEntity, deleteEntity, filterEntityTypes, fixIndex, fixIndexForEntity, getExtractorResult, getIndexPriority, handleSecurity, isIndexed, prepareQuery, query, runAsAnonymous, runCompleteIndexCheck, runCompleteIndexing, runIndexingForEntity, setExtractors, setIndexFixPagingParams, updateEntity, wasTaskRun
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface ch.tocco.nice2.enterprisesearch.api.FulltextIndexService
setupIndex
-
Constructor Details
-
FakeFulltextIndexService
public FakeFulltextIndexService(DataModel dataModel, Context context, PersistenceService persistenceService, QueryProcessorService queryProcessorService, DefaultDisplayService defaultDisplayService, BusinessUnitManager businessUnitManager, QueryBuilderFactory queryBuilderFactory, SecurityManager securityManager, LocaleResolverService localeResolverService, TaskSchedulingService taskSchedulingService, DataSource dataSource, TextResources textResources, TypeManager typeManager, org.slf4j.Logger logger, CommandExecutor commandExecutor, ModuleManager moduleManager)
-
-
Method Details
-
doAddEntity
- Specified by:
doAddEntity
in classAbstractFulltextIndexService<Void>
-
doUpdateEntity
- Specified by:
doUpdateEntity
in classAbstractFulltextIndexService<Void>
-
doDeleteEntity
- Specified by:
doDeleteEntity
in classAbstractFulltextIndexService<Void>
-
deleteByEntityModel
- Specified by:
deleteByEntityModel
in classAbstractFulltextIndexService<Void>
-
handleIndexingForEntity
- Specified by:
handleIndexingForEntity
in classAbstractFulltextIndexService<Void>
-
handleQuery
- Specified by:
handleQuery
in classAbstractFulltextIndexService<Void>
-
deleteByQuery
- Specified by:
deleteByQuery
in classAbstractFulltextIndexService<Void>
-
deleteByIds
- Specified by:
deleteByIds
in classAbstractFulltextIndexService<Void>
-
truncateIndex
public void truncateIndex()Description copied from interface:FulltextIndexService
Truncates (remove all records) the whole index. USE WITH CARE! This method can only be executed once per instance. -
fetchSuggestions
Description copied from interface:FulltextIndexService
Runs a suggestion query against the index with the specified query string.- Parameters:
queryString
- any query string in lucene syntax- Returns:
- a list of strings with suggestions
-