1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197
|
---
mapped_pages:
- https://www.elastic.co/guide/en/elasticsearch/client/curator/current/ex_reindex.html
---
# reindex [ex_reindex]
## Manually selected reindex of a single index [_manually_selected_reindex_of_a_single_index]
```yaml
---
# Remember, leave a key empty if there is no value. None will be a string,
# not a Python "NoneType"
#
# Also remember that all examples have 'disable_action' set to True. If you
# want to use this action as a template, be sure to set this to False after
# copying it.
actions:
1:
description: "Reindex index1 into index2"
action: reindex
options:
disable_action: True
wait_interval: 9
max_wait: -1
request_body:
source:
index: index1
dest:
index: index2
filters:
- filtertype: none
```
## Manually selected reindex of a multiple indices [_manually_selected_reindex_of_a_multiple_indices]
```yaml
---
# Remember, leave a key empty if there is no value. None will be a string,
# not a Python "NoneType"
#
# Also remember that all examples have 'disable_action' set to True. If you
# want to use this action as a template, be sure to set this to False after
# copying it.
actions:
1:
description: "Reindex index1,index2,index3 into new_index"
action: reindex
options:
disable_action: True
wait_interval: 9
max_wait: -1
request_body:
source:
index: ['index1', 'index2', 'index3']
dest:
index: new_index
filters:
- filtertype: none
```
## Filter-Selected Indices [_filter_selected_indices_2]
```yaml
---
# Remember, leave a key empty if there is no value. None will be a string,
# not a Python "NoneType"
#
# Also remember that all examples have 'disable_action' set to True. If you
# want to use this action as a template, be sure to set this to False after
# copying it.
actions:
1:
description: >-
'Reindex all daily logstash indices from March 2017 into logstash-2017.03'
action: reindex
options:
disable_action: True
wait_interval: 9
max_wait: -1
request_body:
source:
index: REINDEX_SELECTION
dest:
index: logstash-2017.03
filters:
- filtertype: pattern
kind: prefix
value: logstash-2017.03.
```
## Reindex From Remote [_reindex_from_remote_2]
```yaml
---
# Remember, leave a key empty if there is no value. None will be a string,
# not a Python "NoneType"
#
# Also remember that all examples have 'disable_action' set to True. If you
# want to use this action as a template, be sure to set this to False after
# copying it.
actions:
1:
description: >-
'Reindex all daily logstash indices from March 2017 into logstash-2017.03'
action: reindex
options:
disable_action: True
wait_interval: 9
max_wait: -1
request_body:
source:
remote:
host: http://otherhost:9200
username: myuser
password: mypass
index: index1
dest:
index: index1
filters:
- filtertype: none
```
## Reindex From Remote With Filter-Selected Indices [_reindex_from_remote_with_filter_selected_indices_2]
```yaml
---
# Remember, leave a key empty if there is no value. None will be a string,
# not a Python "NoneType"
#
# Also remember that all examples have 'disable_action' set to True. If you
# want to use this action as a template, be sure to set this to False after
# copying it.
actions:
1:
description: >-
Reindex all remote daily logstash indices from March 2017 into local index
logstash-2017.03
action: reindex
options:
disable_action: True
wait_interval: 9
max_wait: -1
request_body:
source:
remote:
host: http://otherhost:9200
username: myuser
password: mypass
index: REINDEX_SELECTION
dest:
index: logstash-2017.03
remote_filters:
- filtertype: pattern
kind: prefix
value: logstash-2017.03.
filters:
- filtertype: none
```
## Manually selected reindex of a single index with query [_manually_selected_reindex_of_a_single_index_with_query]
```yaml
---
# Remember, leave a key empty if there is no value. None will be a string,
# not a Python "NoneType"
#
# Also remember that all examples have 'disable_action' set to True. If you
# want to use this action as a template, be sure to set this to False after
# copying it.
actions:
1:
description: "Reindex index1 into index2"
action: reindex
options:
disable_action: True
wait_interval: 9
max_wait: -1
request_body:
source:
query:
range:
timestamp:
gte: "now-1h"
index: index1
dest:
index: index2
filters:
- filtertype: none
```
|