@Path(value="product/{dsName}/{shopGuid}/search")
public class SearchResource
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private FallbackSearchStrategy |
fallback |
private Searcher |
searcher |
Constructor and Description |
---|
SearchResource(Searcher searcher,
FallbackSearchStrategy fallback) |
Modifier and Type | Method and Description |
---|---|
javax.ws.rs.core.Response |
searchProducts(java.lang.String dsName,
GUID shopGuid,
SearchParams params)
Performs a search on the index (this POST call is idempotent) Uses an
idempotent POST call as suggested in the RESTful Web Services Cookbook.
|
private final Searcher searcher
private final FallbackSearchStrategy fallback
@Inject public SearchResource(Searcher searcher, FallbackSearchStrategy fallback)
@POST @Produces(value={"application/json","application/xml"}) public javax.ws.rs.core.Response searchProducts(@PathParam(value="dsName") java.lang.String dsName, @PathParam(value="shopGuid") GUID shopGuid, SearchParams params)
dsName
- is the datasource name (i.e. epages6 Storename).shopGuid
- is the GUID identifier of a shop.params
- are the search params.