k.explorer
k.explorer

Reputation: 321

Reindexing elastic search index which have parent-child types

Description of problem : I have a index(sourceIndex) which have two types(Type A & Type B), Type A is a child type and Type B is parent of Type A , i happened to update analyzers for documents in sourceIndex so i created "destinatedIndex" with new analyzers and now i want to move documents to destinationIndex , biut when i use 'ReIndex' Api i am getting below error ,


{
   "error": {
      "root_cause": [
         {
            "type": "illegal_argument_exception",
            "reason": "Can't specify parent if no parent field has been configured"
         }
      ],
      "type": "illegal_argument_exception",
      "reason": "Can't specify parent if no parent field has been configured"
   },
   "status": 400
}

How do i proceed to reindex documents from one index to another when when the source index ahve parent child relation types , also please let me know if i miss anything.

Thanks, K

Upvotes: 1

Views: 782

Answers (1)

k.explorer
k.explorer

Reputation: 321

I figured out a way to re-index in the above mentioned scenarios.

I created destination index with analyzers and parent child mappings(created parent and child types at a time) , and then used reindex query to reindex from source to destination(new index) indices.Doing so i was able to eliminate parent-child relation complexities.

Thanks, K.

Upvotes: 1

Related Questions