Frequently Asked Question

How to move selected doc from one index to another index
Last Updated 3 years ago

To copy selected documents from one index to another, matching by specific field parameter, use the following command

POST _reindex {
  "source" : { "index" : "source_index", 
               "query": { "match": { "field_name": "value" } } 
             }, 
  "dest" : { "index" : "destination_index" } 
 }

To delete the documents in the source index use the following command

POST /source_index/_delete_by_query 
{ 
    "query": { 
             "match": { 
                      "field_name": "value" 
             } 
    } 
 }

Loading ...