Support for automatic "Advanced Search" forms.
- Dominant language
- Python
- Stars
- 102
- Forks
- 182
- PR merge metrics
- No merged PRs in 30d
Description
This feature adds a new optional field-level flag, `make_searchable: True`. When this field exists on at least one field an advanced search page will be created. Currently it adds a link under the search bar:

This page will render all fields in the schema marked `make_searchable`, re-using the existing form snippets to render them.

If a date pair exists (`start_date` and `end_date` by default), a date range selector will be rendered instead using bootstraprap-daterangepicker (with small fixes to make it compatible with all versions of CKAN bootstrap and icons):

Hitting search generates a query and redirects to the normal search page. If you got to the advanced search page from a type-specific page (ex: /my-schema) it'll redirect there. Since this tool is just a query builder, normal search plugins, sort, faceting etc all work as expected.

The one gotcha is that date fields need to end in `_date` when using the default CKAN solr schema, since this will cause them to index as TrieDateField.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.