Comments (10)
+1
I've created the tweeter index to test and doing as the README says, I get the same error
from elasticsearch-action-updatebyquery.
+1
from elasticsearch-action-updatebyquery.
I have "fix" it by simple remove all things that uses contentUnsafe() - it works now on 1.6 but i think it's not much good....
from elasticsearch-action-updatebyquery.
+1 as I see the same on my dev box
NoSuchMethodError[org.elasticsearch.rest.RestRequest.contentUnsafe()Z]
@comdiv so this ctx._source.somevalue = 100
uses contentUnsafe()
? How we can replace it with something else?
I see this ticket in ES itself https://github.com/elastic/elasticsearch-transport-memcached/issues/40 and the commit elastic/elasticsearch-transport-memcached@32415cc but there is no info on what we can use instead
from elasticsearch-action-updatebyquery.
That is patch
diff --git a/src/main/java/org/elasticsearch/action/updatebyquery/ShardUpdateByQueryRequest.java b/src/main/java/org/elasticsearch/action/updatebyquery/ShardUpdateByQueryRequest.java
index 7d6718d..a4288c5 100644
--- a/src/main/java/org/elasticsearch/action/updatebyquery/ShardUpdateByQueryRequest.java
+++ b/src/main/java/org/elasticsearch/action/updatebyquery/ShardUpdateByQueryRequest.java
@@ -97,12 +97,6 @@ public class ShardUpdateByQueryRequest extends ShardReplicationOperationRequest
return bulkResponseOption;
}
- @Override
- public void beforeLocalFork() {
- if (sourceUnsafe) {
- source = source.copyBytesArray();
- }
- }
@Override
public ActionRequestValidationException validate() {
diff --git a/src/main/java/org/elasticsearch/action/updatebyquery/TransportShardUpdateByQueryAction.java b/src/main/java/org/elasticsearch/action/updatebyquery/TransportShardUpdateByQueryAction.java
index 577ca93..fd42403 100644
--- a/src/main/java/org/elasticsearch/action/updatebyquery/TransportShardUpdateByQueryAction.java
+++ b/src/main/java/org/elasticsearch/action/updatebyquery/TransportShardUpdateByQueryAction.java
@@ -114,7 +114,6 @@ public class TransportShardUpdateByQueryAction extends TransportAction<ShardUpda
}
if (request.operationThreaded()) {
- request.beforeLocalFork();
threadPool.executor(ThreadPool.Names.BULK).execute(new Runnable() {
public void run() {
diff --git a/src/main/java/org/elasticsearch/rest/action/updatebyquery/RestUpdateByQueryAction.java b/src/main/java/org/elasticsearch/rest/action/updatebyquery/RestUpdateByQueryAction.java
index 1ddf630..55e43e1 100644
--- a/src/main/java/org/elasticsearch/rest/action/updatebyquery/RestUpdateByQueryAction.java
+++ b/src/main/java/org/elasticsearch/rest/action/updatebyquery/RestUpdateByQueryAction.java
@@ -87,7 +87,7 @@ public class RestUpdateByQueryAction extends BaseRestHandler {
// see if we have it in the body
if (request.hasContent()) {
- udqRequest.source(request.content(), request.contentUnsafe());
+ udqRequest.source(request.content(), false);
} else if (request.hasParam("source")) {
udqRequest.source(new BytesArray(request.param("source")), false);
} else if (request.hasParam("q")) {
And it works - maybe it work not "safe" but all groovy scripts are executed well
from elasticsearch-action-updatebyquery.
OK, thanks, I'll try with my tests and let you know
from elasticsearch-action-updatebyquery.
@comdiv @apeteri Thanks guys after applying pull request on my repo it works great.
We run some automated and manual tests against a dev cluster and we see no issues with update_by_query. I hope this pull request will get merged quickly.
from elasticsearch-action-updatebyquery.
Any updates on this? When should we expect the fix to be merged? ES is on 1.7.1 now
from elasticsearch-action-updatebyquery.
v2.6.0, supporting ES 1.6.x is not released and should be available within 2-4 hours.
from elasticsearch-action-updatebyquery.
v2.6.0 supports ES 1.7.1 as well.
from elasticsearch-action-updatebyquery.
Related Issues (20)
- UpdateByQueryRequestBuilder.request() doesn't build source HOT 1
- Does someone know how to install the "updatebyquery" plugin in local? for the server cannot connect to Internert HOT 2
- Elasticsearch 1.5.1 HOT 1
- Question: How to read a script from a file? HOT 2
- Not updating any documents HOT 2
- Update object HOT 4
- Allow to put some limit on number of updated items HOT 1
- elasticsearch-action-updatebyquery updated 0 doc HOT 6
- No support for retry_on_conflict
- It's highly required to support min_score and ctx._score HOT 5
- Hangs if not existed index is queryied HOT 1
- The number of updated documents is not equal the total of documents that match query HOT 2
- Problem related usage HOT 3
- Not working on ES 2.0 HOT 9
- UpdateByQueryResponse throwing timeout HOT 2
- No such method error on ES 1.7.0
- Elasticsearch [1.5.2] update_by_query plugin doesn't work as expected HOT 1
- Help!does jdbc-importer support ES template?
- not working with 1.0.7 version of Elasticsearch
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from elasticsearch-action-updatebyquery.