Target release1.0
Source (e.g. Github)

https://github.com/tum-gis/ckanext-datesearch

Main featuresThis extension provides temporal search for those datasets which have a date range for the period in which they are collected or carried out (archive or real-time).
Prerequisite / Dependencies

his extension is tested with CKAN 2.8.0.

LicenseAGPL-3.0 License
Installed by
Document status

COMPLETED

Background and strategic fit

Apart from spatial search, in the field of agricultural science temporal aspect plays a critical role. Hence, we needed to add the temporal search for our catalog.

This code is inspired by these sources:

https://github.com/okfn/ckanext-tsbsatellites/blob/master/ckanext/tsbsatellites/plugin.py#L73

https://github.com/okfn/ckanext-tsbsatellites

https://github.com/geosolutions-it/ckanext-datesearch

https://github.com/EUDAT-B2FIND/ckanext-timeline

The important point here is, that this temporal search is only for the content of the catalog entry and not the creation and modification time of that entry in the catalog [creation_date & modification_data which are stored directly by catalog software]. 

Installations and Requirements

To install ckanext-datesearch on a production site:

  1. Activate your CKAN virtual environment, for example:

    ENV /usr/lib/ckan/default/bin/activate
  2. Install the ckanext-datesearch Python package into your virtual environment:

    pip install -e 'git+https://github.com/MandanaMoshref/ckanext-datesearch.git#egg=ckanext-datesearch'
  3. Add datesearch to the ckan.plugins setting in your CKAN config file.

  4. Restart CKAN. For example, if you've deployed CKAN with Apache on Ubuntu:

    sudo service apache2 reload

Requirements & configuration:

You may need to check you schema.xml to see that this line exists:

<dynamicField name="extras_*" type="text" indexed="true" stored="true" multiValued="false"/>

If you use the default ckan metadata, as the extra field you may add two (or only one of them) attributes (key): "begin-collection_date" and "end-collection_date". In case you use ckanext-scheming, then you need to add these two fields into your schema json file.


User interaction and design


Questions and Answers

Below is a list of Q&A from user sides:

QuestionAnswers
How does the search functionality work?The user chooses the period of time, in that datasets are collected or generated or manages. The result will include all entries which cover this time period. This means even a dataset which has a wider time range (incl. the search time period) will be chosen.
Also, the user can define only start or end date. In this way, whose dataset which have no date will be also chosen.

Further steps