Closed jduss4 closed 6 years ago
This is like that rabbit/duck picture my brain keep flipping as to which way to think about it.
Is there any reason to indicate whether a field is multivalued in ES?
Only insofar as it might be nice for us to be able to tell at a glance, but ES itself doesn't care if you send it an array (multivalued) or something singular. it will toggle the field as needed, I believe.
ES does care if you send it a list or single item for a nested field, though, as I rediscovered during the VRA addition a few days ago
So I guess the question is, do WE need the reminder as to what's multivalued? I would tend towards no, as that should be marked in the schema.
Should we nave a name that indicated nested fields?
Here's a quick survey of the current state of things.
Field | Comments |
---|---|
annotations | |
rights | generally a single string, but could be multivalued? |
Field | Comments |
---|---|
creator | collection of nested objects (no .role ) |
contributor | nested, contains multivalued .role |
coverage.spatial | nested |
person | nested, contains multivalued .role , people field also exists |
recipient | nested, contains multivalued .role |
Field | Comments |
---|---|
subject |
Field | Comments |
---|---|
topics | |
keywords | |
people | |
places | |
works |
Decisions:
Change annotations
to annotations_text
Change subject
to subjects
Leave rights
since grammatically it makes more sense than right
image_id
should be implemented (is not currently)
Other fields remain with current naming convention. Plural -- multivalued like "people" are distinct cdrh fields, not modeled on Dublin Core. They should be LISTS and not strings separated by semi-colon.
Note: creator_sort
is specified in the API Schema
Currently, it is awkward to iterate over "singular" fields in applications:
At the same time, the alternative is to use plural for things which seem more singular, like API facet requests:
Discussion:
Anyway, we have lots of things to think about, and I'm writing them down here for now. Changes we make will affect the data repo, orchid, existing projects based on orchid, and this repo.