Skip to content

Commit 4f74548

Browse files
committed
[EXT] Removes reindex
1 parent 40f74bf commit 4f74548

File tree

4 files changed

+0
-466
lines changed

4 files changed

+0
-466
lines changed

elasticsearch-extensions/README.md

Lines changed: 0 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -53,55 +53,6 @@ Perform the backup with the Backup gem's command line utility:
5353
See more information in the [`Backup::Database::Elasticsearch`](lib/elasticsearch/extensions/backup.rb)
5454
class documentation.
5555

56-
### Reindex
57-
58-
Copy documents from one index and cluster into another one, for example for purposes of changing
59-
the settings and mappings of the index.
60-
61-
**NOTE:** Elasticsearch natively supports re-indexing since version 2.3. This extension is useful
62-
when you need the feature on older versions.
63-
64-
When the extension is loaded together with the
65-
[Ruby client for Elasticsearch](../elasticsearch/README.md),
66-
a `reindex` method is added to the client:
67-
68-
require 'elasticsearch'
69-
require 'elasticsearch/extensions/reindex'
70-
71-
client = Elasticsearch::Client.new
72-
target_client = Elasticsearch::Client.new url: 'http://localhost:9250', log: true
73-
74-
client.index index: 'test', type: 'd', body: { title: 'foo' }
75-
76-
client.reindex source: { index: 'test' },
77-
target: { index: 'test', client: target_client },
78-
transform: lambda { |doc| doc['_source']['title'].upcase! },
79-
refresh: true
80-
# => { errors: 0 }
81-
82-
target_client.search index: 'test'
83-
# => ... hits ... "title"=>"FOO"
84-
85-
The method takes similar arguments as the core API
86-
[`reindex`](http://www.rubydoc.info/gems/elasticsearch-api/Elasticsearch/API/Actions#reindex-instance_method)
87-
method.
88-
89-
You can also use the `Reindex` class directly:
90-
91-
require 'elasticsearch'
92-
require 'elasticsearch/extensions/reindex'
93-
94-
client = Elasticsearch::Client.new
95-
96-
reindex = Elasticsearch::Extensions::Reindex.new \
97-
source: { index: 'test', client: client },
98-
target: { index: 'test-copy' }
99-
100-
reindex.perform
101-
102-
See more information in the [`Elasticsearch::Extensions::Reindex::Reindex`](lib/elasticsearch/extensions/reindex.rb)
103-
class documentation.
104-
10556
### ANSI
10657

10758
Colorize and format selected Elasticsearch response parts in terminal:

elasticsearch-extensions/lib/elasticsearch/extensions/reindex.rb

Lines changed: 0 additions & 187 deletions
This file was deleted.

elasticsearch-extensions/test/reindex/integration/reindex_test.rb

Lines changed: 0 additions & 107 deletions
This file was deleted.

0 commit comments

Comments
 (0)