@Path(value="/search") public class SearchResource extends RestResource
API_KEY_CLIENT_ID, API_KEY_TOKEN, API_KEY_USER, apiClientId, apiToken, apiUser, AUTHENTICATION_PARAM_NAME, hmacHeader, querySessionId, REMOTE_USER_ID, REMOTE_USER_TOKEN, remoteUserId, remoteUserToken, request, sessionId, WOR_PARTNER_TOKEN, worPartnerToken
Constructor and Description |
---|
SearchResource() |
Modifier and Type | Method and Description |
---|---|
javax.ws.rs.core.Response |
getIndexStatus(String indexType) |
javax.ws.rs.core.Response |
search(boolean searchWeb,
SearchQuery query)
Advanced Search.
|
javax.ws.rs.core.Response |
search(String queryString,
boolean searchWeb,
int offset,
int limit,
String sort,
boolean asc)
Keyword search
|
javax.ws.rs.core.Response |
searchPartFields(String token,
String field,
int limit)
Search entries by using filters on the values
|
javax.ws.rs.core.Response |
updateBlastIndex()
Rebuild the blast database
|
javax.ws.rs.core.Response |
updateLuceneIndex()
Rebuild the lucene indexes used for searching
|
addHeaders, getThisServer, getUserId, getUserId, getWebPartner, log, requireUserId, requireUserIdOrWebPartner, requireWebPartner, respond, respond, respond, respond
@GET @Produces(value="application/json") @Consumes(value="application/json") @Path(value="/filter") public javax.ws.rs.core.Response searchPartFields(@DefaultValue(value="") @QueryParam(value="token") String token, @DefaultValue(value="SELECTION_MARKERS") @QueryParam(value="field") String field, @DefaultValue(value="8") @QueryParam(value="limit") int limit)
@POST @Produces(value="application/json") @Consumes(value="application/json") public javax.ws.rs.core.Response search(@DefaultValue(value="false") @QueryParam(value="webSearch") boolean searchWeb, SearchQuery query)
searchWeb
- whether to perform a web of registry search or notquery
- parameters to the search@GET @Produces(value="application/json") public javax.ws.rs.core.Response search(@QueryParam(value="q") String queryString, @DefaultValue(value="false") @QueryParam(value="webSearch") boolean searchWeb, @DefaultValue(value="0") @QueryParam(value="offset") int offset, @DefaultValue(value="15") @QueryParam(value="limit") int limit, @DefaultValue(value="relevance") @QueryParam(value="sort") String sort, @DefaultValue(value="false") @QueryParam(value="asc") boolean asc)
queryString
- keywords to search onsearchWeb
- whether to perform a web of registry search or notoffset
- result startlimit
- result count upper limitsort
- result sortasc
- true if return results in ascending order, false otherwise@PUT @Path(value="/indexes/lucene") public javax.ws.rs.core.Response updateLuceneIndex()
@PUT @Path(value="/indexes/blast") public javax.ws.rs.core.Response updateBlastIndex()
@GET @Path(value="/indexes/{type}/status") public javax.ws.rs.core.Response getIndexStatus(@PathParam(value="type") String indexType)
Copyright © 2017. All rights reserved.