Material indexing problems
There are a few problems with the way materials are indexed:
-
When an upload has multiple entries for completely new material, sometimes only one of the entries ends up in the
entries
subdocument (race condition). Likely caused by simultaneously processing two entries with the same material that does not yet exist in our index. Should be fixable by issuing an" "upsert" instead of a "create" for the material. -
Sometimes when indexing a new material, the document body is missing: a document with only
_id
(=material_id) and an empty list ofentries
is added. -
Phonon calculations are not being indexed correctly: only an empty dictionary is being created inside
entries
.
These also would need test cases in our regtests.