3

I am getting this error while migrating data from mongodb to documentdb. Indexes were created on documentdb side without problems.

2019-04-26T17:40:20.118+0000    error: multiple fields of compound index cannot be arrays
2019-04-26T17:40:20.445+0000    error: multiple fields of compound index cannot be arrays
2019-04-26T17:40:22.057+0000    error: multiple fields of compound index cannot be arrays

I see similar questions asked way back about mongodb, how is documentdb implementation differ from it? I did not see any issues while creating indexes in documentdb, only see it in restore during the restore

oshaiken
  • 2,593
  • 1
  • 15
  • 25

2 Answers2

2

Amazon DocumentDB does not yet support creating a compound index with multiple keys on the same array. A workaround is to create individual indexes on the desired array fields, as the Amazon DocumentDB query planner is capable of using multiple indexes in a single query.

https://docs.aws.amazon.com/documentdb/latest/developerguide/functional-differences.html

Joseph Idziorek
  • 4,853
  • 6
  • 23
  • 37
0

Similar to MongoDB, Amazon DocumentDB does not support more than one array field in a compound index.

tmcallaghan
  • 1,292
  • 2
  • 10
  • 20