Ticket #2438 (closed enhancement: fixed)

Opened 2 years ago

Last modified 22 months ago

resource_search action not accessible via GET request

Reported by: icmurray Owned by: icmurray
Priority: awaiting merge Milestone: ckan-v1.8
Component: ckan Keywords: [1d]
Cc: Repository: ckan
Theme: none

Description

This action is not currently usable via a GET request as it relies upon a nested dict of fields.

Change History

comment:1 Changed 2 years ago by icmurray

  • Milestone changed from ckan-v1.8 to current-ckan-sprint-2012-06-25

comment:2 Changed 2 years ago by icmurray

  • Keywords [1d] added; [?d] removed
  • Owner set to icmurray
  • Status changed from new to assigned

Proposed solution:

Add a new q field which can be specified multiple times. Each q parameter is a string: {field}:term. : characters are escaped in the {field} by \:.

Mark the fields parameters as deprecated.

comment:3 Changed 23 months ago by icmurray

  • Milestone changed from current-ckan-sprint-2012-06-25 to ckan-v1.8

comment:4 Changed 23 months ago by icmurray

  • Status changed from assigned to accepted

comment:5 Changed 22 months ago by icmurray

  • Priority changed from minor to awaiting merge

Ready to be merged [1]

Brief synopsis of changes:

  • altered return type of the action: from Resource domain objects to dictized resources. This is required if this action is to be made accessible through the action api as the domain object is not json-serializable. The 'old' return type is still available by passing in a flag in the context. In fact, this is required as the search layer uses this action, and deals with the domain objects directly.
  • decided that escaping the ':' (as described in above comments) wasn't necessary as resource fields shouldn't have ':' characters in them anyway.
  • improved action's docstring
  • 'fields' parameter has been deprecated ( see #2603 ). Use of it by the search layer has been removed in favour of the new 'query' parameter. But it still works, and correctly maintains backward compatibility.

[1] https://github.com/okfn/ckan/pull/37

comment:6 Changed 22 months ago by amercader

  • Status changed from accepted to closed
  • Resolution set to fixed
Note: See TracTickets for help on using tickets.