Class SearchServiceConnector

java.lang.Object
org.exoplatform.container.component.BaseComponentPlugin
io.meeds.notes.legacy.api.search.SearchServiceConnector
All Implemented Interfaces:
org.exoplatform.container.component.ComponentPlugin
Direct Known Subclasses:
ElasticSearchServiceConnector

@Deprecated(forRemoval=true, since="6.0.0") public abstract class SearchServiceConnector extends org.exoplatform.container.component.BaseComponentPlugin
Deprecated, for removal: This API element is subject to removal in a future version.
Copied from commons-search to this module. Should be reworked to be more simple.
Is extended by all SearchService connectors, and allows to build configuration needed by a list of connectors that is used for the Unified Search.
  • Field Summary

    Fields inherited from class org.exoplatform.container.component.BaseComponentPlugin

    desc, name
  • Constructor Summary

    Constructors
    Constructor
    Description
    SearchServiceConnector(org.exoplatform.container.xml.InitParams initParams)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Initializes a search service connector.
  • Method Summary

    Modifier and Type
    Method
    Description
    Deprecated, for removal: This API element is subject to removal in a future version.
    Gets a display name.
    Deprecated, for removal: This API element is subject to removal in a future version.
    Gets a search type.
    boolean
    Deprecated, for removal: This API element is subject to removal in a future version.
    is enable by default
    boolean
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    boolean
    Deprecated, for removal: This API element is subject to removal in a future version.
    Returns the status of the indexation for the id in parameter The connectors must implement this search method, with the parameters below.
    search(SearchContext context, String query, Collection<String> sites, int offset, int limit, String sort, String order)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Returns a collection of search results from the connectors.
    void
    setDisplayName(String displayName)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Sets a display name.
    void
    setEnable(boolean enable)
    Deprecated, for removal: This API element is subject to removal in a future version.
    set enable by default
    void
    setEnabledForAnonymous(boolean enabledForAnonymous)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    void
    setSearchType(String searchType)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Sets a search type.

    Methods inherited from class org.exoplatform.container.component.BaseComponentPlugin

    getDescription, getName, setDescription, setName

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • SearchServiceConnector

      public SearchServiceConnector(org.exoplatform.container.xml.InitParams initParams)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Initializes a search service connector. The constructor is default that connectors must implement.
      Parameters:
      initParams - The parameters which are used for initializing the search service connector from configuration.
      eXo level API
      Experimental
  • Method Details

    • getSearchType

      public String getSearchType()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Gets a search type.
      Returns:
      The string.
      eXo level API
      Experimental
    • setSearchType

      public void setSearchType(String searchType)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Sets a search type.
      Parameters:
      searchType - The search type to be set.
      eXo level API
      Experimental
    • getDisplayName

      public String getDisplayName()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Gets a display name.
      Returns:
      The string.
      eXo level API
      Experimental
    • setDisplayName

      public void setDisplayName(String displayName)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Sets a display name.
      Parameters:
      displayName - The display name to be set.
      eXo level API
      Experimental
    • isEnable

      public boolean isEnable()
      Deprecated, for removal: This API element is subject to removal in a future version.
      is enable by default
    • setEnable

      public void setEnable(boolean enable)
      Deprecated, for removal: This API element is subject to removal in a future version.
      set enable by default
    • isEnabledForAnonymous

      public boolean isEnabledForAnonymous()
      Deprecated, for removal: This API element is subject to removal in a future version.
    • setEnabledForAnonymous

      public void setEnabledForAnonymous(boolean enabledForAnonymous)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • search

      public abstract Collection<SearchResult> search(SearchContext context, String query, Collection<String> sites, int offset, int limit, String sort, String order)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns a collection of search results from the connectors. The connectors must implement this search method, with the parameters below.
      Parameters:
      context - The search context.
      query - The query statement.
      sites - Specified sites where the search is performed (for example Acme, or Intranet).
      offset - The start point from which the search results are returned.
      limit - The limitation number of search results.
      sort - The sorting criteria (title, relevancy and date).
      order - The sorting order (ascending and descending).
      Returns:
      The collection of search results.
      eXo level API
      Experimental
    • isIndexed

      public boolean isIndexed(SearchContext context, String id)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns the status of the indexation for the id in parameter The connectors must implement this search method, with the parameters below.
      Parameters:
      context - The search context.
      id - The id of the element
      Returns:
      true if the document is indexed
      eXo level API
      Experimental