Class ElasticsearchCategoryService
java.lang.Object
org.alfresco.repo.search.impl.AbstractCategoryServiceImpl
org.alfresco.repo.search.impl.elasticsearch.ElasticsearchCategoryService
- All Implemented Interfaces:
CategoryService
Tag and category support using Elasticsearch.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.alfresco.service.cmr.search.CategoryService
CategoryService.Depth, CategoryService.Mode -
Field Summary
Fields inherited from class org.alfresco.repo.search.impl.AbstractCategoryServiceImpl
dictionaryService, indexerAndSearcher, namespacePrefixResolver, nodeService, publicNodeService, queryFetchSize, tenantService -
Constructor Summary
ConstructorsConstructorDescriptionElasticsearchCategoryService(NodeService publicNodeService, IndexerAndSearcher indexerAndSearcher, NodeService nodeService) -
Method Summary
Modifier and TypeMethodDescriptionvoiddeleteCategory(NodeRef nodeRef) Delete a categorygetRootCategories(StoreRef storeRef, QName aspectName) Get the root categories for an aspect/classificationgetRootCategories(StoreRef storeRef, QName aspectName, String filter) Get the root categories for an aspect/classification with names that start with filtergetRootCategories(StoreRef storeRef, QName aspectName, String name, boolean create) Gets root categories by name, optionally creating one if one does not exist.org.alfresco.query.PagingResults<ChildAssociationRef> getRootCategories(StoreRef storeRef, QName aspectName, org.alfresco.query.PagingRequest pagingRequest, boolean sortByName) Get a paged list of the root categories for an aspect/classificationorg.alfresco.query.PagingResults<ChildAssociationRef> getRootCategories(StoreRef storeRef, QName aspectName, org.alfresco.query.PagingRequest pagingRequest, boolean sortByName, String filter) Get a paged list of the root categories for an aspect/classificationorg.alfresco.query.PagingResults<ChildAssociationRef> getRootCategories(StoreRef storeRef, QName aspectName, org.alfresco.query.PagingRequest pagingRequest, boolean sortByName, Collection<String> exactNamesFilter, Collection<String> alikeNamesFilter) Get a paged list of the root categories for an aspect/classification supporting multiple name filters.getTopCategories(StoreRef storeRef, QName aspectName, int count) Get the most polular categoriesvoidsetQueryFetchSize(int queryFetchSize) Methods inherited from class org.alfresco.repo.search.impl.AbstractCategoryServiceImpl
createCategory, createClassification, createRootCategory, createSearchTopCategoriesParameters, deleteClassification, getCategories, getCategory, getChildren, getChildren, getClassificationAspects, getClassificationNodes, getClassifications, getPrefix, getRootCategories, getRootCategoryNodeRef, setDictionaryService, setIndexerAndSearcher, setNamespacePrefixResolver, setNodeService, setPublicNodeService, setTenantService
-
Constructor Details
-
ElasticsearchCategoryService
public ElasticsearchCategoryService(NodeService publicNodeService, IndexerAndSearcher indexerAndSearcher, NodeService nodeService)
-
-
Method Details
-
setQueryFetchSize
public void setQueryFetchSize(int queryFetchSize) - Overrides:
setQueryFetchSizein classAbstractCategoryServiceImpl
-
getRootCategories
Description copied from interface:CategoryServiceGet the root categories for an aspect/classification- Specified by:
getRootCategoriesin interfaceCategoryService- Overrides:
getRootCategoriesin classAbstractCategoryServiceImpl- Parameters:
storeRef- StoreRefaspectName- QName
-
getRootCategories
public Collection<ChildAssociationRef> getRootCategories(StoreRef storeRef, QName aspectName, String filter) Description copied from interface:CategoryServiceGet the root categories for an aspect/classification with names that start with filter- Specified by:
getRootCategoriesin interfaceCategoryService- Overrides:
getRootCategoriesin classAbstractCategoryServiceImpl- Parameters:
storeRef- StoreRefaspectName- QNamefilter- String
-
getRootCategories
public Collection<ChildAssociationRef> getRootCategories(StoreRef storeRef, QName aspectName, String name, boolean create) Description copied from interface:CategoryServiceGets root categories by name, optionally creating one if one does not exist. Index-independent so can be used for cluster-safe existence checks.- Specified by:
getRootCategoriesin interfaceCategoryService- Overrides:
getRootCategoriesin classAbstractCategoryServiceImpl- Parameters:
storeRef- the store refaspectName- the aspect namename- the aspect namecreate- should a category node be created if one does not exist?- Returns:
- the root categories
-
getRootCategories
public org.alfresco.query.PagingResults<ChildAssociationRef> getRootCategories(StoreRef storeRef, QName aspectName, org.alfresco.query.PagingRequest pagingRequest, boolean sortByName) Description copied from interface:CategoryServiceGet a paged list of the root categories for an aspect/classification- Specified by:
getRootCategoriesin interfaceCategoryService- Overrides:
getRootCategoriesin classAbstractCategoryServiceImpl- Parameters:
storeRef- StoreRefaspectName- QNamepagingRequest- PagingRequestsortByName- boolean
-
getRootCategories
public org.alfresco.query.PagingResults<ChildAssociationRef> getRootCategories(StoreRef storeRef, QName aspectName, org.alfresco.query.PagingRequest pagingRequest, boolean sortByName, String filter) Description copied from interface:CategoryServiceGet a paged list of the root categories for an aspect/classification- Specified by:
getRootCategoriesin interfaceCategoryService- Overrides:
getRootCategoriesin classAbstractCategoryServiceImpl- Parameters:
storeRef-aspectName-pagingRequest-sortByName-filter-- Returns:
-
getRootCategories
public org.alfresco.query.PagingResults<ChildAssociationRef> getRootCategories(StoreRef storeRef, QName aspectName, org.alfresco.query.PagingRequest pagingRequest, boolean sortByName, Collection<String> exactNamesFilter, Collection<String> alikeNamesFilter) Description copied from interface:CategoryServiceGet a paged list of the root categories for an aspect/classification supporting multiple name filters.- Specified by:
getRootCategoriesin interfaceCategoryService- Overrides:
getRootCategoriesin classAbstractCategoryServiceImpl- Parameters:
storeRef-aspectName-pagingRequest-sortByName-exactNamesFilter-alikeNamesFilter-- Returns:
-
deleteCategory
Description copied from interface:CategoryServiceDelete a category- Specified by:
deleteCategoryin interfaceCategoryService- Overrides:
deleteCategoryin classAbstractCategoryServiceImpl- Parameters:
nodeRef- NodeRef
-
getTopCategories
Description copied from interface:CategoryServiceGet the most polular categories- Specified by:
getTopCategoriesin interfaceCategoryService- Specified by:
getTopCategoriesin classAbstractCategoryServiceImpl- Parameters:
storeRef- StoreRefaspectName- QNamecount- int- Returns:
- List
-