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.IndexProducer
A Elasticsearch-based SearchService implementation.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates a new instance of the search service index.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    activate(org.osgi.service.component.ComponentContext cc)
    Service activator, called via declarative services configuration.
    void
    addSynchronously(org.opencastproject.mediapackage.MediaPackage mediaPackage)
    Immediately adds the mediapackage to the search index.
    boolean
    Immediately removes the given series from the search service.
    boolean
    deleteSynchronously(String mediaPackageId)
    Immediately removes the given mediapackage from the search service.
    org.opencastproject.elasticsearch.index.rebuild.IndexRebuildService.Service
     
    void
    indexMediaPackage(String mediaPackageId)
     
    void
    repopulate(org.opencastproject.elasticsearch.index.rebuild.IndexRebuildService.DataType type)
     
    org.elasticsearch.action.search.SearchResponse
    search(org.elasticsearch.search.builder.SearchSourceBuilder searchSource)
     
    void
    setAuthorizationService(org.opencastproject.security.api.AuthorizationService authorizationService)
     
    void
    setEsIndex(org.opencastproject.elasticsearch.index.ElasticsearchIndex esIndex)
     
    void
    setListProvidersService(org.opencastproject.list.api.ListProvidersService listProvidersService)
     
    void
    setOrganizationDirectoryService(org.opencastproject.security.api.OrganizationDirectoryService organizationDirectory)
    Sets a reference to the organization directory service.
    void
     
    void
    setSecurityService(org.opencastproject.security.api.SecurityService securityService)
    Callback for setting the security service.
    void
    setSeriesService(org.opencastproject.series.api.SeriesService seriesService)
     
    void
    setWorkspace(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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.opencastproject.elasticsearch.index.rebuild.IndexProducer

    dataTypeSupported, getSupportedDataTypes
  • Field Details

  • Constructor Details

    • SearchServiceIndex

      public SearchServiceIndex()
      Creates a new instance of the search service index.
  • Method Details

    • getService

      public org.opencastproject.elasticsearch.index.rebuild.IndexRebuildService.Service getService()
      Specified by:
      getService in interface org.opencastproject.elasticsearch.index.rebuild.IndexProducer
    • activate

      public void activate(org.osgi.service.component.ComponentContext cc) throws IllegalStateException
      Service 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, SearchServiceDatabaseException
      Immediately 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 index
      IllegalArgumentException - if the media package is null
      org.opencastproject.security.api.UnauthorizedException - if the user does not have the rights to add the mediapackage
      SearchServiceDatabaseException
    • indexMediaPackage

      public void indexMediaPackage(String mediaPackageId) throws org.opencastproject.search.api.SearchException, SearchServiceDatabaseException, org.opencastproject.security.api.UnauthorizedException, org.opencastproject.util.NotFoundException
      Throws:
      org.opencastproject.search.api.SearchException
      SearchServiceDatabaseException
      org.opencastproject.security.api.UnauthorizedException
      org.opencastproject.util.NotFoundException
    • 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:
      true if 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(org.opencastproject.elasticsearch.index.rebuild.IndexRebuildService.DataType type) throws org.opencastproject.elasticsearch.index.rebuild.IndexRebuildException
      Specified by:
      repopulate in interface org.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
    • setListProvidersService

      public void setListProvidersService(org.opencastproject.list.api.ListProvidersService listProvidersService)