org.exoplatform.commons.api.search
Class SearchServiceConnector

java.lang.Object
  extended by org.exoplatform.container.component.BaseComponentPlugin
      extended by org.exoplatform.commons.api.search.SearchServiceConnector
All Implemented Interfaces:
org.exoplatform.container.component.ComponentPlugin

public abstract class SearchServiceConnector
extends org.exoplatform.container.component.BaseComponentPlugin

This abstract class is extended by the SearchService connectors which provide search result for a specific content type Created by The eXo Platform SAS Author : Tung Vu Minh tungvm@exoplatform.com Nov 21, 2012


Field Summary
 
Fields inherited from class org.exoplatform.container.component.BaseComponentPlugin
desc, name
 
Constructor Summary
SearchServiceConnector(org.exoplatform.container.xml.InitParams initParams)
           
 
Method Summary
 String getDisplayName()
           
 String getSearchType()
           
abstract  Collection<SearchResult> search(SearchContext context, String query, Collection<String> sites, int offset, int limit, String sort, String order)
          The connectors must implement this search method, with the following parameters and return a collection of SearchResult
 void setDisplayName(String displayName)
           
 void setSearchType(String searchType)
           
 
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 Detail

SearchServiceConnector

public SearchServiceConnector(org.exoplatform.container.xml.InitParams initParams)
Method Detail

getSearchType

public String getSearchType()

setSearchType

public void setSearchType(String searchType)

getDisplayName

public String getDisplayName()

setDisplayName

public void setDisplayName(String displayName)

search

public abstract Collection<SearchResult> search(SearchContext context,
                                                String query,
                                                Collection<String> sites,
                                                int offset,
                                                int limit,
                                                String sort,
                                                String order)
The connectors must implement this search method, with the following parameters and return a collection of SearchResult

Parameters:
context - Search context
query - The user-input query to search for
sites - Search on these specified sites only (e.g acme, intranet...)
offset - Start offset of the result set
limit - Maximum size of the result set
sort - The field to sort the result set
order - Sort order (ASC, DESC)
Returns:
a collection of SearchResult


Copyright © 2013 eXo Platform SAS. All Rights Reserved.