mirror of
https://git.victorphan.net/basketballcantho/Teedy_custom.git
synced 2026-08-05 14:03:10 +07:00
Finding several documents by their title in a single query (#696)
This commit is contained in:
@@ -495,7 +495,36 @@ public class DocumentResource extends BaseResource {
|
||||
|
||||
return Response.ok().entity(response.build()).build();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns all documents.
|
||||
*
|
||||
* @api {post} /document/list Get documents
|
||||
* @apiDescription Get documents exposed as a POST endpoint to allow longer search parameters, see the GET endpoint for the API info
|
||||
* @apiName PostDocumentList
|
||||
* @apiGroup Document
|
||||
* @apiVersion 1.12.0
|
||||
*
|
||||
* @param limit Page limit
|
||||
* @param offset Page offset
|
||||
* @param sortColumn Sort column
|
||||
* @param asc Sorting
|
||||
* @param search Search query
|
||||
* @param files Files list
|
||||
* @return Response
|
||||
*/
|
||||
@POST
|
||||
@Path("list")
|
||||
public Response listPost(
|
||||
@FormParam("limit") Integer limit,
|
||||
@FormParam("offset") Integer offset,
|
||||
@FormParam("sort_column") Integer sortColumn,
|
||||
@FormParam("asc") Boolean asc,
|
||||
@FormParam("search") String search,
|
||||
@FormParam("files") Boolean files) {
|
||||
return list(limit, offset, sortColumn, asc, search, files);
|
||||
}
|
||||
|
||||
/**
|
||||
* Parse a query according to the specified syntax, eg.:
|
||||
* tag:assurance tag:other before:2012 after:2011-09 shared:yes lang:fra thing
|
||||
@@ -663,7 +692,7 @@ public class DocumentResource extends BaseResource {
|
||||
break;
|
||||
case "title":
|
||||
// New title criteria
|
||||
documentCriteria.setTitle(paramValue);
|
||||
documentCriteria.getTitleList().add(paramValue);
|
||||
break;
|
||||
default:
|
||||
fullQuery.add(criteria);
|
||||
|
||||
Reference in New Issue
Block a user