GetDKAN / dkan

DKAN Open Data Portal
https://dkan.readthedocs.io/en/latest/index.html
GNU General Public License v2.0
373 stars 171 forks source link

Facet API is not picking up new fields #3302

Open janette opened 3 years ago

janette commented 3 years ago

Steps To Reproduce

  1. Go to admin/config/search/search-api/index/dkan/fields
  2. Click Add fields
  3. Add 'license' field and 'distributionitemformat' and save
  4. Rebuild tracking information, re-index, and clear cache
  5. Confirm you see the search_api.... tables for the new fields in your database
  6. Go to api/1/search/facets
  7. Confirm the new fields are not displaying

Expected behavior

I expect the new fields to be available at this endpoint

Frontend steps once that is working:

  1. Edit dkan/modules/metastore/modules/metastore_search/src/Service.php line 234
    $facetsTypes = ['theme', 'keyword', 'publisher__name', 'license', 'distribution__item__format'];
  2. Edit src/frontend/src/config/search.jsx ~line 33
    "distribution__item__format": {
    "label": "Format",
    "field": "distribution__item__format",
    "showAll": false,
    "limit": 10,
    "reset": {
      "active": false,
      "icon": <span></span>
    },
    },
      "license": {
      "label": "License",
      "field": "license",
      "showAll": false,
      "limit": 10,
      "reset": {
      "active": false,
      "icon": <span></span>
    },
  3. rebuild
susisiman commented 3 years ago

Rewrite user story that describes interface that will be built.