2

I am trying to migrate my data from MongoDB 3.6 running on one ec2 instance to AWS DocumentDB running on another ec2 instance by using mongodump and mongorestore commands. But I am always getting at least one of following errors:

  • createIndex error: Field 'default_language' is currently not supported
  • createIndex error: Field 'language_override' is currently not supported
  • createIndex error: Field 'weights' is currently not supported
  • createIndex error: Field 'textIndexVersion' is currently not supported

Can anyone suggest how to resolve this?

Dimpal Singh
  • 157
  • 12
  • 2
    Dimpal, happy to help! What type of indexes are these? DocumentDB supports single field, compound and multi key indexes - https://docs.aws.amazon.com/documentdb/latest/developerguide/mongo-apis.html#mongo-apis-index. – meet-bhagdev Nov 18 '20 at 17:55
  • these are text indexes with the combination of two fields of a collection. Following are index fields: { "field1" : "text", "field2" : "text" } Below are the index options: { "v" : 2, "name" : "field1_text_field2_text", "ns" : "db_name.collection_name", "background" : true, "weights" : { "field1" : 1, "field2" : 1 }, "default_language" : "english", "language_override" : "language", "textIndexVersion" : 3 } – Dimpal Singh Nov 18 '20 at 18:17
  • 1
    Amazon DocumentDB does not support text indexes. Does your workload require text indexes on the fields you specified? If you are looking to perform full text search queries over your data, we recommend you use Amazon Elasticsearch service (Amazon ES) along with Amazon DocumentDB. Amazon ES is purpose-built to enable you to run full text search queries over your data. Here is a blog that explains how to do so - https://aws.amazon.com/blogs/database/run-full-text-search-queries-on-amazon-documentdb-data-with-amazon-elasticsearch-service/ – meet-bhagdev Nov 23 '20 at 21:45

1 Answers1

0

I also faced this problem when migrating to DocumentDB 4.0

As @meet-bhagdev said before, such indexes and index options DocumentDB does not support.

Please look at DocumentDB Docs, there you will find the root cause of our problem. And so far nothing can be done about it.

enter image description here

Oleksandr
  • 450
  • 1
  • 6
  • 13