I used the mongoDB method update to modify existing documents in a collection named annotations
. My command, written in a Python script, is:
db['annotations'].update({'_id': annotation['_id']}, {'$set': {'orthologs': orthologs}}, False)
The field orthologs
must be modify to contain a new subfield UniProt
that is given by the variable named orthologs
.
Surprisingly, a new collection was created with the name annotations_keys
. It contains only one document : { "_id" : "UniProt", "value" : null }
.
Is it normal? If not, what is the problem?