Closed rsignell-usgs closed 5 years ago
Yes, we should add these controls. We're already working on adding the facet filter for resource types (or protocols), see #90, but we haven't yet added organization or time based filtering.
I think the time search/filter may need to be implemented in CKAN, I know it was missing at one point. @lukecampbell can you add this to an upcoming sprint?
Unless the time filtering is part of the core CKAN library, this will probably be a lot of work for me. I'm surprised it's not part of CKAN.
I think the thing to do would be to ask the experts. I'm not sure if it is or not. It may have been added in the past couple years, but I know it wasn't implemented 2 - 3 years ago. I'll send an email to some of the contacts I know.
@rsignell-usgs How does this example time filter functionality meet your needs?
I think time-based filtering is the only capability still missing from Catalog from your original request.
cc @ocefpaf
@rsignell-usgs I've been cranking away at adding temporal search functionality into CKAN, and as a result, I have a much better understanding of its search capabilities I'll address the individual points raised in the original post.
Space/geospatial: For the spatial search, we already have search functionality through ckanext-spatial
. We don't have a way of filtering by region yet, although a while back I think I saw a world oceans shapefile. It'd be possible through loading such a file into Solr's geospatial features and doing calculations against the geospatial extents of the datasets.
Time: Work on temporal search is underway and there is a functional prototype which uses ISO 19115 dataset time extents: https://github.com/ioos/catalog-ckan/tree/draft_time_search
It's not currently deployed to production, but after a couple tweaks it should be ready for primetime. As it's using a solr.DateRangeField
, it'd also be possible.
Right now, an intersection with the date range is the default operation, but it'd also be possible to add Contains and Within operations in the UI if desired, similar to the above posted picture: https://lucene.apache.org/solr/guide/6_6/working-with-dates.html#WorkingwithDates-MoreDateRangeFieldDetails
Institution: Organization (in CKAN) filters already exist, but for something more similar to https://github.com/ioos/catalog/issues/41, would prefer discussion continue there if the topic at hand is indeed similar.
Protocol/Resource type: CKAN uses Solr underneath the hood and specifies a number of fields by default. There is a multivalued text field named res_format
which is probably of interest here:
https://github.com/ckan/ckan/blob/b9e45e2723d4abd70fa72b16ec4a0bebc795c56b/ckan/config/solr/schema.xml#L119
It can be selected in the search filters in the CKAN datasets search page
https://data.ioos.us/dataset?res_format=ERDDAP
It is also possible to search using the package_search
functionality of the CKAN API using the q
or fq
search parameters, which take a Solr search string (https://docs.ckan.org/en/latest/api/#ckan.logic.action.get.package_search). For example, the above query could be issued to the API to fetch the first hundred rows:
https://data.ioos.us/api/3/action/package_search?fq=res_format:ERDDAP&rows=100
EDIT: temporal search for datasets can now be tinkered with at https://dev-catalog.ioos.us/dataset
Closing this issue. Features are implemented in development branch. If you have specific features for search functionality you would like to see implemented, please open a separate issue.
Currently the CKAN catalog page https://dev-catalog.ioos.us/dataset has "filter by location" on the left side:![2016-11-22_6-57-57](https://cloud.githubusercontent.com/assets/1872600/20523298/5cf2a1e4-b082-11e6-83c7-3b3c44878a0e.png)
In the white space below the "filter by location" map, are there plans to add controls to filter by data start/stop time, protocol (e.g. opendap, wms), and institution/region?
It would be great if we could have the same functionality as the NCEI catalog:![2016-11-22_7-02-28](https://cloud.githubusercontent.com/assets/1872600/20523319/768760a4-b082-11e6-9874-272877806d71.png)