Changes between Initial Version and Version 1 of Ticket #108


Ignore:
Timestamp:
09/03/09 11:02:10 (5 years ago)
Author:
dread
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #108 – Description

    initial v1  
    1 Add package search facility in the rest api at /api/rest/search 
     1Add package search facility in the rest api at /api/search 
    22 
    33Queries can be provided as for the normal package search either by posting to that url or by performing a get with a query string. 
    44 
    5 E.g. .../api/rest/search?q=xyz 
     5E.g. .../api/search/package?q=xyz 
    66 
    7 Additional parameters in addition to query ("q") are: 
     7Query 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 
     13Additional parameters in addition to query ("q" or "qjson") are: 
    814  * limit 
    915  * 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 
    1119 
    1220Return 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 
    1423 
     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)  
    1527TODO?: provide query parameters as key value pairs or as json-encoded dictionary?