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

bug with collection vs _type #83

Closed jduss4 closed 4 years ago

jduss4 commented 6 years ago

We realized when indexing family_letters without the "collection" field that results were not showing up in the API. When interrogating elasticsearch directly, however, the results were stored under the correct _type. I suspect that the API is using "collection" instead of _type to retrieve results. Preferably we would use the _type result since that's more baked into elasticsearch, unless if there is some compelling reason anybody can think of where _type would not reflect the actual collection?

One case I could think of is if we want to have all cather materials under _type "cather" but have cather_letters and cather_calendar under separate collections?

That would make sense to me, but then we should just make that very clear so that we are aware of the behavior when posting from the data repository. Right now data repos do not technically have to use the same es_type as their directory name, etc.

jduss4 commented 4 years ago

Deprecated! We will use "collection" from here on out instead of type

https://www.elastic.co/guide/en/elasticsearch/reference/current/removal-of-types.html