public class UnifiedSearchService extends Object implements org.exoplatform.services.rest.resource.ResourceContainer, org.picocontainer.Startable
| Constructor and Description |
|---|
UnifiedSearchService(org.exoplatform.commons.api.search.SearchService searchService,
org.exoplatform.commons.api.settings.SettingService settingService,
org.exoplatform.portal.config.UserPortalConfigService userPortalConfigService,
org.exoplatform.web.WebAppController webAppController)
A constructor creates a instance of unified search service with the
specified parameters
|
| Modifier and Type | Method and Description |
|---|---|
static List<String> |
getEnabledSearchTypes() |
javax.ws.rs.core.Response |
REST_getQuicksearchSetting()
Gets current user's quick search settings.
|
javax.ws.rs.core.Response |
REST_getRegistry()
Gets all connectors which are registered in the system and are enabled.
|
javax.ws.rs.core.Response |
REST_getSearchSetting()
Gets current user's search settings.
|
javax.ws.rs.core.Response |
REST_getSites()
Gets all available sites in the system.
|
javax.ws.rs.core.Response |
REST_search(javax.ws.rs.core.UriInfo uriInfo,
String query,
String sSites,
String sTypes,
String sOffset,
String sLimit,
String sort,
String order,
String lang)
Searches for a query.
|
javax.ws.rs.core.Response |
REST_setEnabledSearchtypes(String searchTypes)
Sets the "enabledSearchTypes" variable in a global context.
|
javax.ws.rs.core.Response |
REST_setQuicksearchSetting(long resultsPerPage,
String searchTypes,
boolean searchCurrentSiteOnly)
Saves current user's quick search settings.
|
javax.ws.rs.core.Response |
REST_setSearchSetting(long resultsPerPage,
String searchTypes,
boolean searchCurrentSiteOnly,
boolean hideSearchForm,
boolean hideFacetsFilter)
Saves current user's search settings.
|
void |
start() |
void |
stop() |
public UnifiedSearchService(org.exoplatform.commons.api.search.SearchService searchService,
org.exoplatform.commons.api.settings.SettingService settingService,
org.exoplatform.portal.config.UserPortalConfigService userPortalConfigService,
org.exoplatform.web.WebAppController webAppController)
searchService - a service to work with other connectorssettingService - a service to store and get the setting valuesuserPortalConfigService - a service to get user information from
portalwebAppController - a controller to get configuration pathpublic void start()
start in interface org.picocontainer.Startablepublic void stop()
stop in interface org.picocontainer.Startablepublic javax.ws.rs.core.Response REST_search(@Context
javax.ws.rs.core.UriInfo uriInfo,
String query,
String sSites,
String sTypes,
String sOffset,
String sLimit,
String sort,
String order,
String lang)
uriInfo - Search contextquery - Searches for a query which is entered by the user.sSites - Searches in the specified sites only (for example, ACME or
Intranet).sTypes - Searches for these specified content types only (for example,
people, discussions, events, tasks, wikis, spaces, files, and
documents).sOffset - Starts the offset of the results set.sLimit - Limit the maximum size of the results set.sort - Defines the Sort type (relevancy, date, title).order - Defines the Sort order (ascending, descending).public javax.ws.rs.core.Response REST_getRegistry()
public javax.ws.rs.core.Response REST_getSites()
public javax.ws.rs.core.Response REST_getSearchSetting()
@RolesAllowed(value="administrators") public javax.ws.rs.core.Response REST_setSearchSetting(long resultsPerPage, String searchTypes, boolean searchCurrentSiteOnly, boolean hideSearchForm, boolean hideFacetsFilter)
public javax.ws.rs.core.Response REST_getQuicksearchSetting()
public javax.ws.rs.core.Response REST_setQuicksearchSetting(long resultsPerPage,
String searchTypes,
boolean searchCurrentSiteOnly)
public javax.ws.rs.core.Response REST_setEnabledSearchtypes(String searchTypes)
searchTypes - List of search types in the form of a comma-separated
string.Copyright © 2003–2020 eXo Platform SAS. All rights reserved.