Amazon CloudSearch создает фрагментированные поля при использовании DynamoDB для загрузки - PullRequest
0 голосов
/ 26 июня 2019

Я пытаюсь загрузить Dynamodb в CloudSearch. Я перепробовал много вещей, чтобы заставить это работать, но это терпит неудачу. Документ, который он создает, имеет фрагментированные поля, некоторые из которых имеют нулевой идентификатор. Когда на самом деле это должен быть только один блок.

Я получаю следующую ошибку:

Some errors occurred while the documents were being sent to your search domain.

Check your document data and indexing options for:

Index fields in the Needs Indexing or Processing states. Run indexing (if needed), wait until all index fields are in the ACTIVE state, and then upload your documents.

Index fields configured as single value fields when there are multiple values in the document data (or vice-versa). Update the index field types to match your document data, run indexing, and upload your documents once the fields are in the ACTIVE state.

Fields in your document data that are not configured in the domain's indexing options. Either remove the unconfigured fields from your data, or add the fields to your domain configuration.

Вот json для создаваемого документа:

{
  "type" : "add",
  "id" : "null",
  "fields" : {
    "modifieddate" : "2019-01-01",
    "postid" : "1131",
    "userprofileimage" : "http://profile.png"
  }
}, {
  "type" : "add",
  "id" : "123456",
  "fields" : {
    "createddate" : "2019-01-01",
    "commentid" : "123456",
    "content" : "Checkout my new video on youtube http://youtube.com"
  }
}

Это настройка моего домена в CloudSearch:

https://ibb.co/P5xsxr4

Я пробовал документы aws и сообщения stackoverflow (включая эту Amazon CloudSearch создает Null ID из DynamoDB ), но ни у кого нет ничего, чтобы исправить это.

Вывод должен быть таким:

 {
  "type" : "add",
  "id" : "123456",
  "fields" : {
    "createddate" : "2019-01-01",
    "commentid" : "123456",
    "content" : "Checkout my new video on youtube http://youtube.com",
    "modifieddate" : "2019-01-01",
    "postid" : "1131",
    "userprofileimage" : "http://profile.png"
   }
 }

Любая помощь будет принята с благодарностью! :)

...