In MongoDB Altlas, I try to use dynamic Index, but I have this error in the index creation status : "Your index could not be built: Unexpected error: DocValuesField "$type:date/claimDate" appears more than once in this document (only one value is allowed per field)"
I try to look at the possibles values for the field claimDate for all the collection.
db.shipments.aggregate([
{ $group: {
_id: { $type: "$claimDate" },
count: { $sum: 1 },
sample: { $first: "$$ROOT" }
} }
])
Possibles values are : null, date, missing
Atlas Search could handle this 3 possibles types.
Can you help me figure out what is preventing the creation of this dynamic index?