Package org.opencastproject.search.impl
Class SearchServiceIndex
java.lang.Object
org.opencastproject.elasticsearch.index.rebuild.AbstractIndexProducer
org.opencastproject.search.impl.SearchServiceIndex
- All Implemented Interfaces:
IndexProducer
A Elasticsearch-based
SearchService implementation.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidactivate(org.osgi.service.component.ComponentContext cc) Service activator, called via declarative services configuration.voidaddSynchronously(MediaPackage mediaPackage) Immediately adds the mediapackage to the search index.booleandeleteSeriesSynchronously(String seriesId) Immediately removes the given series from the search service.booleandeleteSynchronously(String mediaPackageId) Immediately removes the given mediapackage from the search service.Get the service that implements IndexProducer.voidindexMediaPackage(String mediaPackageId) voidRe-add the data of this service to the index.org.elasticsearch.action.search.SearchResponsesearch(org.elasticsearch.search.builder.SearchSourceBuilder searchSource) voidsetAuthorizationService(AuthorizationService authorizationService) voidsetEsIndex(ElasticsearchIndex esIndex) voidsetListProvidersService(ListProvidersService listProvidersService) voidsetOrganizationDirectoryService(OrganizationDirectoryService organizationDirectory) Sets a reference to the organization directory service.voidsetPersistence(SearchServiceDatabase persistence) voidsetSecurityService(SecurityService securityService) Callback for setting the security service.voidsetSeriesService(SeriesService seriesService) voidsetWorkspace(Workspace workspace) Methods inherited from class org.opencastproject.elasticsearch.index.rebuild.AbstractIndexProducer
logIndexRebuildBegin, logIndexRebuildBegin, logIndexRebuildError, logIndexRebuildError, logIndexRebuildError, logIndexRebuildProgress, logIndexRebuildProgress, logIndexRebuildProgress, logIndexRebuildProgress, logSkippingElement, logSkippingElementMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.opencastproject.elasticsearch.index.rebuild.IndexProducer
dataTypeSupported, getSupportedDataTypes
-
Field Details
-
INDEX_NAME
- See Also:
-
-
Constructor Details
-
SearchServiceIndex
public SearchServiceIndex()Creates a new instance of the search service index.
-
-
Method Details
-
getService
Description copied from interface:IndexProducerGet the service that implements IndexProducer.- Specified by:
getServicein interfaceIndexProducer- Returns:
- service The service that implements IndexProducer.
-
activate
Service activator, called via declarative services configuration.- Parameters:
cc- the component context- Throws:
IllegalStateException
-
setEsIndex
-
search
public org.elasticsearch.action.search.SearchResponse search(org.elasticsearch.search.builder.SearchSourceBuilder searchSource) throws SearchException - Throws:
SearchException
-
addSynchronously
public void addSynchronously(MediaPackage mediaPackage) throws SearchException, IllegalArgumentException, UnauthorizedException, SearchServiceDatabaseException Immediately adds the mediapackage to the search index.- Parameters:
mediaPackage- the media package- Throws:
SearchException- if the media package cannot be added to the search indexIllegalArgumentException- if the media package isnullUnauthorizedException- if the user does not have the rights to add the mediapackageSearchServiceDatabaseException
-
indexMediaPackage
public void indexMediaPackage(String mediaPackageId) throws SearchException, SearchServiceDatabaseException, UnauthorizedException, NotFoundException -
deleteSynchronously
Immediately removes the given mediapackage from the search service.- Parameters:
mediaPackageId- the media package identifier- Returns:
trueif the mediapackage was deleted- Throws:
SearchException- if deletion failed
-
deleteSeriesSynchronously
Immediately removes the given series from the search service.- Parameters:
seriesId- the series- Throws:
SearchException
-
repopulate
Description copied from interface:IndexProducerRe-add the data of this service to the index.- Specified by:
repopulatein interfaceIndexProducer- Parameters:
type- Limit the data added to the index. Use ALL to re-index all data.- Throws:
IndexRebuildException
-
setPersistence
-
setSeriesService
-
setWorkspace
-
setAuthorizationService
-
setSecurityService
Callback for setting the security service.- Parameters:
securityService- the securityService to set
-
setOrganizationDirectoryService
Sets a reference to the organization directory service.- Parameters:
organizationDirectory- the organization directory
-
setListProvidersService
-