Open techgique opened 4 years ago
Not sure whether recent development has fixed this issue
Currently it throws an elasticsearch error if it doesn't match the schema. I'm not sure error checking code on the Datura side would be helpful (unless we implement stricter schema checking).
I think since the elasticsearch schema will be more strict and throw an error if the post does not match the schema, we don't need to worry about this too much.
The
person
andpeople
fields require an array and will crash the transform/post if they are not: https://github.com/CDRH/datura/blob/dev/lib/datura/to_es/tei_to_es/fields.rb#L123Adding a check or conversion to an Array object ought to prevent this crashing.
Also related to #170 , but assume that will require more discussion / thought and this may be a quicker "fix" for this mildly error-prone code.