Ticket #1352 (new enhancement)

Opened 3 years ago

Last modified 23 months ago

Use logic functions instead of as_dict when indexing entities

Reported by: amercader Owned by:
Priority: major Milestone: ckan-backlog
Component: ckan Keywords: search
Cc: david.raznick@…, john.glover@… Repository: ckan
Theme: none

Description (last modified by amercader) (diff)

The current search implementation uses the output of the the as_dict method of the domain Package object to update the index

https://bitbucket.org/okfn/ckan/src/56c79e3fc44c/ckan/lib/search/index.py#cl-48

It also uses package_to_api1 in the SynchronousSearch? plugin:

https://bitbucket.org/okfn/ckan/src/f9dfb0506594/ckan/lib/search/__init__.py#cl-93

This prevents extensions from being able to index custom properties (e.g. faceting by custom extras not included in the model).

The search should use the logic function to get the package properties:

get_action('package_show')(context,data_dict)

Change History

comment:1 Changed 3 years ago by amercader

  • Description modified (diff)

comment:2 Changed 23 months ago by seanh

  • Milestone set to ckan-backlog
Note: See TracTickets for help on using tickets.