Changes between Version 3 and Version 4 of Ticket #1547


Ignore:
Timestamp:
01/16/12 14:26:15 (2 years ago)
Author:
amercader
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #1547

    • Property Milestone changed from ckan-sprint-2011-12-19 to current-ckan-sprint-2012-01-23
    • Property Summary changed from Add a search method to the IPackageController interface to Add search methods (before and after) to the IPackageController interface
  • Ticket #1547 – Description

    v3 v4  
    1 Add a search method to the IPackageController interface so extensions can modify the package results. 
    2 Extensions implementing the IPackageController interface will get the results from a SOLR query, and after playing with them should return an object with the same structure (so it can be transparently used by the web UI, etc) I.e. results should be a list of package_dictize outputs: 
     1Time estimate: 1d 
    32 
    4 {{{ 
    5 { 
    6          'count': count, 
    7          'facets': facets, 
    8          'results': results 
    9      } 
     3Add a two search method to the IPackageController interface so extensions can: 
     4 
     5 * Modify the query being sent to Solr  
     6 
     7 {{{ 
     8 
     9def before_search(search_params): 
     10 
     11    return search_params 
     12 
    1013}}} 
     14 
     15 * Modify the results returned (`after_search`) 
     16 
     17 {{{ 
     18 
     19def after_search(search_results, search_params): 
     20 
     21    return search_results 
     22 
     23}}} 
     24 
     25 
     26Please see this pad for implementation details: 
     27 
     28http://ckan.okfnpad.org/search