Giter Site home page Giter Site logo

elasticsearch-reindex's Introduction

Purpose

This plugin can be used to

  • update all or selected documents of an index, e.g. after you change the settings of a type
  • to change the index settings like shard count: create a new index with that config and reindex all documents into that index
  • grab all or selected documents from another elasticsearch cluster and feed your local machine with that
  • and more like a filtered backup etc
  • See ExampleUsage.java on how to use this plugin as simple rewriter of your content

License

Apache License 2.0

Installation

./reinstall.sh

you should see 'loaded [reindex], sites []' in the logs. Or use the reinstall.sh script for development purposes. Be sure to use elasticsearch 1.4.0. For newer versions - please provide pull requests ;)

Note: This script will build and install the plugin assuming elasticsearch is found in /usr/share/elasticsearch. The script will call 'sudo' on the install part, so the script should be run as a user with sudo privileges. Since maven will be used to build the plugin, it requires maven to be installed, which can be installed with the command below on a debian/ubuntu system.

sudo apt-get install maven2

Deinstallation

sudo $ES_HOME/bin/plugin remove reindex

sudo service elasticsearch restart

Usage

WARNINGs / TODOs:

  • Please try this on your local machine before using it in production - especially the case searchHost!=localhost could be problematic for your performance/IO
  • The call is not async and not stopable (except you stop the requested server) => The plugin should probably be better a river
  • If you have two servers on localhost and the queried server port is 9201 and you want to search the different server at 9200 => then you have to use e.g. searchHost=127.0.0.1&searchPort=9200

Same cluster

curl -XPUT 'http://localhost:9200/indexnew/typenew/_reindex?searchIndex=indexold&searchType=typeold' -d ' { "term" : { "count" : 2 } }'

This refeeds all documents in index 'indexold' with type 'typeold' into the index 'indexnew' with type 'typenew'. But only documents matching the specified filter will be refeeded. The internal Java API will be used which should be efficient. In this example, the term filter is used to limit the documents that will be reindexed, you can leave out the filter to copy all documents to the new index.

Same cluster with create index api

curl -XPUT 'http://localhost:9200/_reindex?index=indexnew&type=*&searchIndex=indexold'

This command creates the indexnew if not exist (the newIndexShards can be set to specify the number of shards). If type=* reindex all types from the index. If you want to skip some type and skipType=type1,type2

Different cluster

Now JSONObjects and the HttpClient will be used. TODO that is probably not efficient in terms of RAM/CPU?!:

curl -XPUT 'http://localhost:9200/indexnew/typenew/_reindex?searchIndex=indexold&searchType=typeold&searchHost=yourElasticsearchHost.com&searchPort=9200' -d ' { "term" : { "count" : 2 } }'

Further parameters:

  • hitsPerPage - used as search limit and at the same time for bulk indexing (default 100)
  • keepTimeInMinutes - the maximum time in minutes a scroll search is valid (default 30) increase if you have more data
  • withVersion - if the version of a document should be respected (default false)
  • waitInSeconds - pause the specified time after every request pair (one search+one bulkIndex). This avoids heavy load on the search or on the indexing server/cluster. This way it is very easy e.g. to grab even a massive amount of data from your production servers into your local machine.

Hints:

  • the index 'indexnew' and the type 'typenew' should exist.
  • the parameters 'searchIndex' and 'searchType' are optional and the new ones will be used if not provided
  • the filter is also optional

elasticsearch-reindex's People

Contributors

jbdamiano avatar k4200 avatar karussell avatar konstantin-konstantin avatar paraseba avatar phungleson avatar vanatteveldt avatar youurayy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

elasticsearch-reindex's Issues

ES 1.5.0 adaptations

I've successfully used this plugin with ES 1.4.4. Thanks for this great tool.
What would be the adaptations to make it run with ES 1.5.0 ?

FileNotFoundException

Hi,
When i try to install it get the following FileNotFound error
Failed: FileNotFoundException[ (No such file or directory)]
Trying https://github.com/null/reindex/archive/master.zip...
Failed to install reindex, reason: failed to download out of all possible locations..., use --verbose to get detailed information

your help is much appreciated

River Automatic updation to elastic server index

Hi All,

I build ed index in cluster environment using mysql river.previously i builded index with out mentioning the scheduler keyword.I deleted river and created river again with the schedular key word.now schedular is working fine.but when populating updated data from table to ES index it is showing the following error.please suggest me where i am going wrong.

[ERROR][org.xbib.elasticsearch.river.jdbc.strategy.simple.SimpleRiverMouth] error, not indexing.

or

Is there any way to pull out updated information from database to elastic search index?

Thanks
phani.

only for 0.90.9: error. when trying to access the _reindex entrypoint

I have ES 0.90.9

trying to issue a

curl http://localhost:9200/new_index/new_type/_reindex?searchType=product&searchIndex=old_index

got

[2014-02-19 10:41:45,969][WARN ][http.netty               ] [Crucible] Caught exception while handling client http traffic, closing connection [id: 0x4d370761, /127.0.0.1:49544 => /127.0.0.1:9200]
java.lang.IncompatibleClassChangeError: Found interface org.elasticsearch.rest.RestRequest, but class was expected
        at com.pannous.es.reindex.ReIndexAction.handleRequest(ReIndexAction.java:55)
        at com.pannous.es.reindex.ReIndexAction.handleRequest(ReIndexAction.java:51)
        at org.elasticsearch.rest.RestController.executeHandler(RestController.java:159)
        at org.elasticsearch.rest.RestController.dispatchRequest(RestController.java:142)
        at org.elasticsearch.http.HttpServer.internalDispatchRequest(HttpServer.java:121)
        at org.elasticsearch.http.HttpServer$Dispatcher.dispatchRequest(HttpServer.java:83)
        at org.elasticsearch.http.netty.NettyHttpServerTransport.dispatchRequest(NettyHttpServerTransport.java:291)
        at org.elasticsearch.http.netty.HttpRequestHandler.messageReceived(HttpRequestHandler.java:43)
        at org.elasticsearch.common.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70)
        at org.elasticsearch.common.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)
        at org.elasticsearch.common.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791)
        at org.elasticsearch.common.netty.handler.codec.http.HttpChunkAggregator.messageReceived(HttpChunkAggregator.java:145)
        at org.elasticsearch.common.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70)
        at org.elasticsearch.common.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)
        at org.elasticsearch.common.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791)
        at org.elasticsearch.common.netty.channel.Channels.fireMessageReceived(Channels.java:296)
        at org.elasticsearch.common.netty.handler.codec.frame.FrameDecoder.unfoldAndFireMessageReceived(FrameDecoder.java:459)
        at org.elasticsearch.common.netty.handler.codec.replay.ReplayingDecoder.callDecode(ReplayingDecoder.java:536)
        at org.elasticsearch.common.netty.handler.codec.replay.ReplayingDecoder.messageReceived(ReplayingDecoder.java:435)
        at org.elasticsearch.common.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70)
        at org.elasticsearch.common.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)
        at org.elasticsearch.common.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791)
        at org.elasticsearch.common.netty.OpenChannelsHandler.handleUpstream(OpenChannelsHandler.java:74)
        at org.elasticsearch.common.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)
        at org.elasticsearch.common.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:559)
        at org.elasticsearch.common.netty.channel.Channels.fireMessageReceived(Channels.java:268)
        at org.elasticsearch.common.netty.channel.Channels.fireMessageReceived(Channels.java:255)
        at org.elasticsearch.common.netty.channel.socket.nio.NioWorker.read(NioWorker.java:88)
        at org.elasticsearch.common.netty.channel.socket.nio.AbstractNioWorker.process(AbstractNioWorker.java:108)
        at org.elasticsearch.common.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:318)
        at org.elasticsearch.common.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:89)
        at org.elasticsearch.common.netty.channel.socket.nio.NioWorker.run(NioWorker.java:178)
        at org.elasticsearch.common.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108)
        at org.elasticsearch.common.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:679)

looks like there's some minor tweaking to do for 0.90.9

Connection error ?

Hi, All.

When I do a reindex between two different clusters, I receive an error. Not matter if I lauch the reindex process in cluster A or in cluster B. The errorr is same:

{"error":"RuntimeException[java.lang.RuntimeException: Problem while GET, Error:Connection reset, url:http://lpels001:9210/_search/scroll?scroll=30m&scroll_id=[...]; nested: SocketException[Connection reset]; ","status":500}

This is my launch command:

curl -XPUT 'http://lpdef316:9210/indexctas_2007/movimientos/_reindex?searchIndex=indexctas_v12_2007&searchType=movimientos&searchHost=lpels001&searchPort=9210&routing=codigoInternoDelContratoIuc' -d '{
    "query": {
        "range": {
            "fechaMovimiento": {
                "gte": 20070101,
                "lt" : 20070115
             }
        }
    }
}'

Can you help me?
Thanks a lot.

reindex command indexes instead

I'm issuing the following command on my development ES setup (done via Homebrew):

curl -XPUT 'http://localhost:9200/dev/Application::Profile/_reindex?newIndex=index_test&newType=Application::Profile' -d '{ "match_all": {} }'

That actually creates a document in index dev with type Application::Profile with id _reindex. In other words, it's invoking the index API.

It looks like the reindex plugin is installed...

[2012-12-14 12:43:03,318][INFO ][plugins                  ] [Cyborg X] loaded [], sites [reindex]

Any ideas? Thanks for the help.

Elastic search records count difference

Hi All,

I builded elastic search index with 20 million records.Using mysql river to pull out the data.i observed once scenario like the records count is differ from database table record count and elastic search index records count but all records are populated to ES index.is there any specific reason to show difference in between these two counts.

Thanks
phani.

Incorrect description in Readme.md ?

I don't understand why

"you should see 'loaded [reindex], sites []' in the logs"

As far as I can see it's installed as site plugin, I believe description should be

"you should see 'loaded [], sites [reindex]' in the logs"

instead

Installation issue

I am using ES 1.0.0
and when try to install the plugin i get the following

~/elasticsearch-reindex# ./reinstall.sh
-> Removing reindex
Plugin reindex not found. Run plugin --list to get list of installed plugins.
./reinstall.sh: line 3: mvn: command not found
ls: cannot access ./target/elasticsearch-*zip: No such file or directory
-> Installing reindex...
Trying file:...
Failed: FileNotFoundException[ (No such file or directory)]
Trying https://github.com/null/reindex/archive/master.zip...
Failed to install reindex, reason: failed to download out of all possible locations..., use -verbose to get detailed information

  • Stopping Elasticsearch Server [ OK ]
  • Starting Elasticsearch Server
    [ OK ]

NullPointerException[null] error when reindexing empty _source

When the source index has an empty _source for all documents, this plugin returns the JSON:

{
"error": "NullPointerException[null]",
"status": 500
}

While reindexing an empty _source is not possible, I believe that the plugin should instead return an error message stating that.

Installation failure

When I try to install as per instructions, invoking reinstall.sh;

eric@raptor ~/elasticsearch-reindex (master) $ ./reinstall.sh
-> Removing reindex
./reinstall.sh: line 3: mvn: command not found
-> Installing reindex...
Trying file:./target/elasticsearch-0.90.0.zip...
Downloading .................................................................................................................................................................................DONE
Installed reindex

  • Stopping ElasticSearch Server [2013-05-07 11:27:13,610][INFO ][node ] [Spot] {0.90.0}[22598]: stopping ...
    [2013-05-07 11:27:13,713][INFO ][node ] [Spot] {0.90.0}[22598]: stopped
    [2013-05-07 11:27:13,714][INFO ][node ] [Spot] {0.90.0}[22598]: closing ...
    [2013-05-07 11:27:13,730][INFO ][node ] [Spot] {0.90.0}[22598]: closed
    [ OK ]
  • Starting ElasticSearch Server [2013-05-07 11:27:15,203][INFO ][node ] [Baron Samedi] {0.90.0}[22833]: initializing ...
    [2013-05-07 11:27:15,210][INFO ][plugins ] [Baron Samedi] loaded [], sites [inquisitor, browser]

I note that the plugin doesn't appear in the loaded message as specified in the readme. Also when I cloned there was no target directory that I could see the reinstall script was looking for, so I created it and put the elasticsearch 0.90 zip in that directory, that appears to have made the script happy but does not appear to have actually installed the plugin as reported.

Build failure

  1. Clone repo
  2. execute $ mvn install

reindexChilds(com.pannous.es.reindex.ReIndexActionJsonTest) Time elapsed: 0.67 sec <<< FAILURE!
java.lang.RuntimeException: Problem while POST, Error:Problem 404 while POST {"error":"IndexMissingException[[oldtweets] missing]","status":404}, url:http://localhost:9200/oldtweets/tweet/_search?search_type=scan&scroll=1m&size=10
at com.pannous.es.reindex.MySearchResponseJson.requestContent(MySearchResponseJson.java:253)
at com.pannous.es.reindex.MySearchResponseJson.doPost(MySearchResponseJson.java:211)
at com.pannous.es.reindex.MySearchResponseJson.(MySearchResponseJson.java:98)
at com.pannous.es.reindex.ReIndexActionJsonTest.scrollSearch(ReIndexActionJsonTest.java:9)
at com.pannous.es.reindex.ReIndexActionTester.scrollSearch(ReIndexActionTester.java:54)
at com.pannous.es.reindex.ReIndexActionTester.reindexChilds(ReIndexActionTester.java:101)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:84)
at org.testng.internal.Invoker.invokeMethod(Invoker.java:714)
at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:901)
at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1231)
at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:127)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:111)
at org.testng.TestRunner.privateRun(TestRunner.java:767)
at org.testng.TestRunner.run(TestRunner.java:617)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:334)
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:329)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:291)
at org.testng.SuiteRunner.run(SuiteRunner.java:240)
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
at org.testng.TestNG.runSuitesSequentially(TestNG.java:1224)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1149)
at org.testng.TestNG.run(TestNG.java:1057)
at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:77)
at org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.executeMulti(TestNGDirectoryTestSuite.java:159)
at org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.execute(TestNGDirectoryTestSuite.java:99)
at org.apache.maven.surefire.testng.TestNGProvider.invoke(TestNGProvider.java:106)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)
at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)
at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)
at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75)
Caused by: java.lang.RuntimeException: Problem 404 while POST {"error":"IndexMissingException[[oldtweets] missing]","status":404}
at com.pannous.es.reindex.MySearchResponseJson.requestContent(MySearchResponseJson.java:250)
... 39 more
Caused by: java.lang.RuntimeException: Problem 404 while POST {"error":"IndexMissingException[[oldtweets] missing]","status":404}
at com.pannous.es.reindex.MySearchResponseJson.requestContent(MySearchResponseJson.java:250)
... 39 more

Results :

Failed tests: reindexAll(com.pannous.es.reindex.ReIndexActionJsonTest): Problem while POST, Error:Problem 404 while POST {"error":"IndexMissingException[[oldtweets] missing]","status":404}, url:http://localhost:9200/oldtweets/tweet/_search?search_type=scan&scroll=1m&size=10
reindexAllPartial(com.pannous.es.reindex.ReIndexActionJsonTest): Problem while POST, Error:Problem 404 while POST {"error":"IndexMissingException[[oldtweets] missing]","status":404}, url:http://localhost:9200/oldtweets/tweet/_search?search_type=scan&scroll=1m&size=10
reindexChilds(com.pannous.es.reindex.ReIndexActionJsonTest): Problem while POST, Error:Problem 404 while POST {"error":"IndexMissingException[[oldtweets] missing]","status":404}, url:http://localhost:9200/oldtweets/tweet/_search?search_type=scan&scroll=1m&size=10

Tests run: 6, Failures: 3, Errors: 0, Skipped: 0

Support 'create' op_type on reindex

There are some cases where I would not want the reindex process to overwrite existing documents in the destination index.
An optional op_type parameter or at least option to choose between 'index' and 'create' operations would be nice. :)

Thanks.

Startup failure on elasticsearch 1.2.0

Hi,

The reindex plugin cannot be started on the latest 1.2.0 ES version. It throws the following exception:

{1.2.0}: Initialization Failed ...

  • ExecutionError[java.lang.NoClassDefFoundError: org/elasticsearch/rest/XContentRestResponse]
    NoClassDefFoundError[org/elasticsearch/rest/XContentRestResponse]
    ClassNotFoundException[org.elasticsearch.rest.XContentRestResponse]

installation and compatibility

Does it work with elastic-search 1.7.3?
How can i do offline installation(with jar) after checking out project and build with maven.for windows environment?

Does it work with elastic-search 1.3.1?

It appears that they might have made a breaking change with regards to an overload:

bin/elasticsearch
[2014-08-31 10:00:20,857][INFO ][node] [Jackpot] version[1.3.1], pid[8491], build[2de6dc5/2014-07-28T14:45:15Z]
[2014-08-31 10:00:20,857][INFO ][node] [Jackpot] initializing ...
[2014-08-31 10:00:20,868][INFO ][plugins] [Jackpot] loaded [marvel, reindex], sites [marvel, kopf]
{1.3.1}: Initialization Failed ...

  • VerifyError[class com.pannous.es.reindex.ReIndexAction overrides final method handleRequest.(Lorg/elasticsearch/rest/RestRequest;Lorg/elasticsearch/rest/RestChannel;)V]

java.lang.OutOfMemoryError: Java heap space

Is there any way to control memory consumption?
I'm trying to reindex ~12000 documents (~14gb) and my heap seems to be too small.
Problem is, I can't extend it because I don't have enough RAM

Can reindex be performed online?

Hi,All.

I'm confuse about wether reindex performed online?How elasticsearch-reindex solve the modified data when reindex?

Can you tell me more about this?

Thanks a lot.

Unable to connect to the server

Here are the steps I followed:

  • cloned it
  • ran build:
    • mvn -DskipTests clean package
  • uploaded the zip from "target” directory to a hosted foundcluster provided by https://found.no/
  • curl -XPUT https://username:[email protected]:9243/index_v2/my_type/_reindex?searchIndex=index_v1\&searchType=my_type
    • Then I received {"ok":false,"message":"Unable to connect to the server."}

Support for newer ElasticSearch versions?

Apparently the method org.elasticsearch.rest.RestRequest.contentAsString has disappeared on Jul 7. This produces the following exception:

[2012-12-28 17:10:31,348][WARN ][http.netty               ] [Locksmith] Caught exception while handling client http traffic, closing connection [id: 0xb336fb0a, /0:0:0:0:0:0:0:1:45974 => /0:0:0:0:0:0:0:1:9200]
java.lang.NoSuchMethodError: org.elasticsearch.rest.RestRequest.contentAsString()Ljava/lang/String;
    at com.pannous.es.reindex.ReIndexAction.handleRequest(ReIndexAction.java:66)
    at org.elasticsearch.rest.RestController.executeHandler(RestController.java:159)
    at org.elasticsearch.rest.RestController.dispatchRequest(RestController.java:142)
    at org.elasticsearch.http.HttpServer.internalDispatchRequest(HttpServer.java:120)
    at org.elasticsearch.http.HttpServer$Dispatcher.dispatchRequest(HttpServer.java:82)
    at org.elasticsearch.http.netty.NettyHttpServerTransport.dispatchRequest(NettyHttpServerTransport.java:285)
    at org.elasticsearch.http.netty.HttpRequestHandler.messageReceived(HttpRequestHandler.java:43)
    at org.elasticsearch.common.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:75)
    at org.elasticsearch.common.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:565)
    at org.elasticsearch.common.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:793)
    at org.elasticsearch.common.netty.handler.codec.http.HttpChunkAggregator.messageReceived(HttpChunkAggregator.java:149)
    at org.elasticsearch.common.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:75)
    at org.elasticsearch.common.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:565)
    at org.elasticsearch.common.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:793)
    at org.elasticsearch.common.netty.channel.Channels.fireMessageReceived(Channels.java:296)
    at org.elasticsearch.common.netty.handler.codec.frame.FrameDecoder.unfoldAndFireMessageReceived(FrameDecoder.java:455)
    at org.elasticsearch.common.netty.handler.codec.replay.ReplayingDecoder.callDecode(ReplayingDecoder.java:538)
    at org.elasticsearch.common.netty.handler.codec.replay.ReplayingDecoder.messageReceived(ReplayingDecoder.java:437)
    at org.elasticsearch.common.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:75)
    at org.elasticsearch.common.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:565)
    at org.elasticsearch.common.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:793)
    at org.elasticsearch.common.netty.OpenChannelsHandler.handleUpstream(OpenChannelsHandler.java:74)
    at org.elasticsearch.common.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:565)
    at org.elasticsearch.common.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:560)
    at org.elasticsearch.common.netty.channel.Channels.fireMessageReceived(Channels.java:268)
    at org.elasticsearch.common.netty.channel.Channels.fireMessageReceived(Channels.java:255)
    at org.elasticsearch.common.netty.channel.socket.nio.NioWorker.read(NioWorker.java:84)
    at org.elasticsearch.common.netty.channel.socket.nio.AbstractNioWorker.processSelectedKeys(AbstractNioWorker.java:471)
    at org.elasticsearch.common.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:332)
    at org.elasticsearch.common.netty.channel.socket.nio.NioWorker.run(NioWorker.java:35)
    at org.elasticsearch.common.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:102)
    at org.elasticsearch.common.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
    at java.lang.Thread.run(Thread.java:722)

Maybe using .content().toUtf8() instead could fix it. My understanding of ES internals is zero, so you shouldn't pay too much attention to my recommendation.

Thanks

Provide some info about the reindex process whether is successful or erroneous in the response

currently, the response is a simple 200 OK status response. with no info whatsoever of what just happened.

it could carry info about how many items were reindexed, the size, etc ...

also, in some cases that exceptions are thrown, the response is a 200 status one.

for example, when trying to reindex to a "_" prefixed type , the following exception is obtained

org.elasticsearch.indices.InvalidTypeNameException: mapping type name [_xx] can't start with '_'
        at org.elasticsearch.index.mapper.MapperService.merge(MapperService.java:212)
        at org.elasticsearch.index.mapper.MapperService.merge(MapperService.java:200)
        at org.elasticsearch.index.mapper.MapperService.documentMapperWithAutoCreate(MapperService.java:351)
        at org.elasticsearch.index.shard.service.InternalIndexShard.prepareIndex(InternalIndexShard.java:373)
        at org.elasticsearch.action.bulk.TransportShardBulkAction.shardIndexOperation(TransportShardBulkAction.java:397)
        at org.elasticsearch.action.bulk.TransportShardBulkAction.shardOperationOnPrimary(TransportShardBulkAction.java:156)
        at org.elasticsearch.action.support.replication.TransportShardReplicationOperationAction$AsyncShardOperationAction.performOnPrimary(TransportShardReplicationOperationAction.java:556)
        at org.elasticsearch.action.support.replication.TransportShardReplicationOperationAction$AsyncShardOperationAction$1.run(TransportShardReplicationOperationAction.java:426)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:679)

but the response has 200 status code.

I know I could just do it, but , to my shame, I'm no java coder ;-(

installation failure on windows

I'm using ES 0.90.9 and I'm trying to install using the following command:

plugin --install karussell/elasticsearch-reindex

I receive the following error:

D:\elasticsearch-0.90.9\bin>plugin --install karussell/elasticsearch-reindex
-> Installing karussell/elasticsearch-reindex...
Trying https://github.com/karussell/elasticsearch-reindex/archive/master.zip...
Downloading ..DONE
Installed karussell/elasticsearch-reindex into D:\elasticsearch-0.90.9\plugins\reindex
Usage:
-u, --url [plugin location] : Set exact URL to download the plugin fro
m
-i, --install [plugin name] : Downloads and installs listed plugins [*
]
-r, --remove [plugin name] : Removes listed plugins
-l, --list : List installed plugins
-v, --verbose : Prints verbose messages
-s, --silent : Run in silent mode
-h, --help : Prints this help message

[*] Plugin name could be:
elasticsearch/plugin/version for official elasticsearch plugins (download from download.elasticsearch.org)
groupId/artifactId/version for community plugins (download from maven central or oss sonatype)
username/repository for site plugins (download from github master)

Message:
Error while installing plugin, reason: IllegalArgumentException: Plugin installation assumed to be site plugin, but contains source code, aborting installation.

Any help you can give me would be appreciated.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.