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.
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.