Package org.opencastproject.search.impl
Class SearchServiceIndex
- java.lang.Object
-
- org.opencastproject.elasticsearch.index.rebuild.AbstractIndexProducer
-
- org.opencastproject.search.impl.SearchServiceIndex
-
- All Implemented Interfaces:
org.opencastproject.elasticsearch.index.rebuild.IndexProducer
public final class SearchServiceIndex extends org.opencastproject.elasticsearch.index.rebuild.AbstractIndexProducer implements org.opencastproject.elasticsearch.index.rebuild.IndexProducerA Elasticsearch-basedSearchServiceimplementation.
-
-
Field Summary
Fields Modifier and Type Field Description static StringINDEX_NAME
-
Constructor Summary
Constructors Constructor Description SearchServiceIndex()Creates a new instance of the search service index.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidactivate(org.osgi.service.component.ComponentContext cc)Service activator, called via declarative services configuration.voidaddSynchronously(org.opencastproject.mediapackage.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.org.opencastproject.elasticsearch.index.rebuild.IndexRebuildService.ServicegetService()voidrepopulate()org.elasticsearch.action.search.SearchResponsesearch(org.elasticsearch.search.builder.SearchSourceBuilder searchSource)voidsetAuthorizationService(org.opencastproject.security.api.AuthorizationService authorizationService)voidsetEsIndex(org.opencastproject.elasticsearch.index.ElasticsearchIndex esIndex)voidsetOrganizationDirectoryService(org.opencastproject.security.api.OrganizationDirectoryService organizationDirectory)Sets a reference to the organization directory service.voidsetPersistence(SearchServiceDatabase persistence)voidsetSecurityService(org.opencastproject.security.api.SecurityService securityService)Callback for setting the security service.voidsetSeriesService(org.opencastproject.series.api.SeriesService seriesService)voidsetWorkspace(org.opencastproject.workspace.api.Workspace workspace)-
Methods inherited from class org.opencastproject.elasticsearch.index.rebuild.AbstractIndexProducer
logIndexRebuildBegin, logIndexRebuildBegin, logIndexRebuildError, logIndexRebuildError, logIndexRebuildError, logIndexRebuildProgress, logIndexRebuildProgress, logIndexRebuildProgress, logIndexRebuildProgress, logSkippingElement, logSkippingElement
-
-
-
-
Field Detail
-
INDEX_NAME
public static final String INDEX_NAME
- See Also:
- Constant Field Values
-
-
Method Detail
-
getService
public org.opencastproject.elasticsearch.index.rebuild.IndexRebuildService.Service getService()
- Specified by:
getServicein interfaceorg.opencastproject.elasticsearch.index.rebuild.IndexProducer
-
activate
public void activate(org.osgi.service.component.ComponentContext cc) throws IllegalStateExceptionService activator, called via declarative services configuration.- Parameters:
cc- the component context- Throws:
IllegalStateException
-
setEsIndex
public void setEsIndex(org.opencastproject.elasticsearch.index.ElasticsearchIndex esIndex)
-
search
public org.elasticsearch.action.search.SearchResponse search(org.elasticsearch.search.builder.SearchSourceBuilder searchSource) throws org.opencastproject.search.api.SearchException- Throws:
org.opencastproject.search.api.SearchException
-
addSynchronously
public void addSynchronously(org.opencastproject.mediapackage.MediaPackage mediaPackage) throws org.opencastproject.search.api.SearchException, IllegalArgumentException, org.opencastproject.security.api.UnauthorizedException, SearchServiceDatabaseExceptionImmediately adds the mediapackage to the search index.- Parameters:
mediaPackage- the media package- Throws:
org.opencastproject.search.api.SearchException- if the media package cannot be added to the search indexIllegalArgumentException- if the media package isnullorg.opencastproject.security.api.UnauthorizedException- if the user does not have the rights to add the mediapackageSearchServiceDatabaseException
-
deleteSynchronously
public boolean deleteSynchronously(String mediaPackageId) throws org.opencastproject.search.api.SearchException
Immediately removes the given mediapackage from the search service.- Parameters:
mediaPackageId- the media package identifier- Returns:
trueif the mediapackage was deleted- Throws:
org.opencastproject.search.api.SearchException- if deletion failed
-
deleteSeriesSynchronously
public boolean deleteSeriesSynchronously(String seriesId) throws org.opencastproject.search.api.SearchException
Immediately removes the given series from the search service.- Parameters:
seriesId- the series- Throws:
org.opencastproject.search.api.SearchException
-
repopulate
public void repopulate() throws org.opencastproject.elasticsearch.index.rebuild.IndexRebuildException- Specified by:
repopulatein interfaceorg.opencastproject.elasticsearch.index.rebuild.IndexProducer- Throws:
org.opencastproject.elasticsearch.index.rebuild.IndexRebuildException
-
setPersistence
public void setPersistence(SearchServiceDatabase persistence)
-
setSeriesService
public void setSeriesService(org.opencastproject.series.api.SeriesService seriesService)
-
setWorkspace
public void setWorkspace(org.opencastproject.workspace.api.Workspace workspace)
-
setAuthorizationService
public void setAuthorizationService(org.opencastproject.security.api.AuthorizationService authorizationService)
-
setSecurityService
public void setSecurityService(org.opencastproject.security.api.SecurityService securityService)
Callback for setting the security service.- Parameters:
securityService- the securityService to set
-
setOrganizationDirectoryService
public void setOrganizationDirectoryService(org.opencastproject.security.api.OrganizationDirectoryService organizationDirectory)
Sets a reference to the organization directory service.- Parameters:
organizationDirectory- the organization directory
-
-