CDRH / api

Codenamed "Apium": An API to access all public Center for Digital Research in the Humanities resources
https://cdrhdev1.unl.edu/api_frontend
MIT License
3 stars 1 forks source link

Mapping Keywords #16

Closed jduss4 closed 7 years ago

jduss4 commented 7 years ago

At the moment, PUTting this mapping

properties:
  cdrh-identifier:
    type: keyword
  dc-identifier:
    type: keyword
  cdrh-shortname:
    type: keyword

But the fields are coming out looking much differently

"cdrh-identifier": {
    "fields": {
        "keyword": {
            "ignore_above": 256,
            "type": "keyword"
        }
    },
    "type": "text"
},

This means that when sorting or aggregating, you have to append .keyword onto the end of the fieldname. It annoys me. Also I wonder if the filter matching is doing a lot more work because it thinks the fields are text fields.

Look into mappings and how to do correctly.

jduss4 commented 7 years ago

This was resolved magically by deleting the index and starting afresh