@CacheControl(isPrivate=true, maxAge=20) @Path(value="/lumis/service/search/rest") @StableMinor(version="12.3", sinceVersion="8.1") public class SearchResource extends Object
Constructor and Description |
---|
SearchResource() |
Modifier and Type | Method and Description |
---|---|
Response |
goToSearchResults(String query,
String pageId,
String interfaceId)
Redirects the request to the nearest page that contains the search results service interface.
|
String |
search(String userQuery,
String serviceInterfaceInstanceId,
Integer autoCompleteSuggestionsCount,
Integer quickSearchSuggestionsCount)
Executes an auto complete and a quick search using the user query.
|
@Path(value="/autocomplete") @GET @Produces(value="application/json") public String search(@QueryParam(value="q") @NotNull String userQuery, @QueryParam(value="ii") @NotNull String serviceInterfaceInstanceId, @QueryParam(value="as") @DefaultValue(value="5") @Min(value=0L) @Max(value=10L) Integer autoCompleteSuggestionsCount, @QueryParam(value="qs") @DefaultValue(value="5") @Min(value=0L) @Max(value=10L) Integer quickSearchSuggestionsCount) throws Exception
userQuery
- the user query.serviceInterfaceInstanceId
- the search service interface instance identifier.autoCompleteSuggestionsCount
- the maximum number of auto complete suggestions to return.quickSearchSuggestionsCount
- the maximum number of quick search results to return.Exception
@Path(value="/search") @GET @Produces(value="text/html") public Response goToSearchResults(@QueryParam(value="q") @NotNull String query, @QueryParam(value="sourcePageId") @NotNull String pageId, @QueryParam(value="targetInterfaceId") @DefaultValue(value="lumis.service.search.searchResults") String interfaceId)
Uses the given page identifier parameter as the source page, to calculate the nearest search results page.
The interface identifier parameter represents the interface identifier of the desired search results interface.
It defaults to lumis.service.search.searchResults
.
The query parameter is added to the target URL after the base URL is processed (thus, it will not be
added to the WebResource calculation).
The response will be one of:
Temporary redirect
: if the search results page could be found and correctly calculated.
Not found
: if the search results page could not be found.
Internal server error
: if some error occur during calculation.
query
- the user query.pageId
- the source page identifier.interfaceId
- the (optional) search results service interface identifier (defaults to lumis.service.search.searchResults
).LumisXP 12.3.0.200408 - Copyright © 2006–2020 Lumis EIP Tecnologia da Informação LTDA. All Rights Reserved.