Changes between Initial Version and Version 1 of Ticket #108
- Timestamp:
- 09/03/09 11:02:10 (5 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #108 – Description
initial v1 1 Add package search facility in the rest api at /api/ rest/search1 Add package search facility in the rest api at /api/search 2 2 3 3 Queries can be provided as for the normal package search either by posting to that url or by performing a get with a query string. 4 4 5 E.g. .../api/ rest/search?q=xyz5 E.g. .../api/search/package?q=xyz 6 6 7 Additional parameters in addition to query ("q") are: 7 Query parameter q: 8 * keyword string (searches name, title, tags by default) 9 * split by words and ANDed 10 * Searching by specific fields (in addition to keyword string). Pass in a query parameter qjson '''instead''' of q. Payload to json is a JSON-encoded dict which is a dictionary with a q field for free text (keywords) and additional key/value pairs for specific fields 11 * if q and qjson specified ignore q and just process qjson value 12 13 Additional parameters in addition to query ("q" or "qjson") are: 8 14 * limit 9 15 * offset 10 * full 16 * fullinfo=0/1 - return full record for each result (default=0) 17 * order_by=field_name 18 * search_notes=0/1 (default 0) do we search notes field in a keyword search 11 19 12 20 Return value is json encoded dictionary with keys: 13 * 'packages': value is list of package names 21 * 'results': list of results 22 * 'count': total number of results 14 23 24 === Extras (for the future) === 25 26 * Prioritisation is not part of this ticket (requires fulltext support in DB or in external app such as Xapian) 15 27 TODO?: provide query parameters as key value pairs or as json-encoded dictionary?