From 46c2873edd1ef08749e1fb0c67008f2ac4895cd5 Mon Sep 17 00:00:00 2001 From: Anne Douwe Bouma Date: Tue, 3 Oct 2017 14:25:45 +0200 Subject: [PATCH] Add 2 basic _reindex usages --- index.html | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/index.html b/index.html index 31d33a5..a76c958 100644 --- a/index.html +++ b/index.html @@ -442,6 +442,37 @@

Create an index with settings and mapping

} +

Copy existing index to new index

+ +
POST /_reindex
+{
+  "source": {
+    "index": "old_index"
+  },
+  "dest": {
+    "index": "new_index"
+  }
+}
+ + +

Copy existing index to new index with only the documents matching the query

+ +
POST /_reindex
+{
+  "source": {
+    "index": "old_index"
+	"query": {
+	  "term": {
+	    "user": "johndoe"
+	  }
+	}
+  },
+  "dest": {
+    "index": "new_index"
+  }
+}
+ +

Update index settings dynamically

PUT /my_index_name/_settings