Comments (6)
POST http://127.0.0.1:9200/str_1970_01/_update_by_query
{
"query" : {
"term" : {
"source_id": "4543"
}
},
"script" : "ctx._source.source_id = 4544"
}
{
error: "NoClassDefFoundError[org/elasticsearch/rest/XContentThrowableRestResponse]; nested: ClassNotFoundException[org.elasticsearch.rest.XContentThrowableRestResponse]; "
status: 500
}
BTW does this plugin support filtering? Filters works quicked than search queries I guess.
from elasticsearch-action-updatebyquery.
+1
from elasticsearch-action-updatebyquery.
+1
from elasticsearch-action-updatebyquery.
@xawiers, filters are definitely supported.
The idea is to use either a constant_score
or a filtered
query (instead of term
et al), as follows:
curl -XPOST http://127.0.0.1:9200/str_1970_01/_update_by_query -d '{"query": {
"constant_score" : {
"filter" : {
"term" : {
"source_id" : "4543"
}
}
}
}, "script": "ctx._source.source_id = \"4544\";"}'
from elasticsearch-action-updatebyquery.
I started work on updating this plugin for ES 1.2.1. These are the changes I have made so far to the current master.
Pom.xml updates:
<properties>
<lucene.version>4.8.1</lucene.version>
<elasticsearch.version>1.2.1</elasticsearch.version>
<tests.jvms>1</tests.jvms>
<tests.shuffle>true</tests.shuffle>
<tests.output>onerror</tests.output>
<tests.client.ratio />
<es.logger.level>INFO</es.logger.level>
</properties>
To Resolve Failed test when packaging the code:
In src/main/java/org.elasticsearch.action.updatebyquery.TransportUpdateByQueryAction.java
From:
String[] concreteIndices = metaData.concreteIndices(request.indices(), IndicesOptions.lenient());
To:
String[] concreteIndices = metaData.concreteIndices(IndicesOptions.lenientExpandOpen() ,request.indices());
In src/main/java/org.elasticsearch.action.updatebyquery.TransportShardUpdateByQueryAction.java
From:
searchContext.clearAndRelease()
To:
searchContext.close()
( 3 instances )
To Resolve Warning:
elasticsearch-action-updatebyquery-master/src/main/java/org/elasticsearch/rest/action/updatebyquery/RestUpdateByQueryAction.java:40: error: cannot find symbol
The following Classes no longer exist in 1.2.1 (1.2.0 and above)
RestXContentBuilder
XContentRestResponse
XContentThrowableRestResponse
However, some of the code has to be re-written within RestUpdateByQueryAction.java to utilize the new JsonXContent method of parsing using Jackson, since we can't pass the request object into the function as we did previously.
from elasticsearch-action-updatebyquery.
I created a pull request that addresses this issue.
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
- Problem Elasticsearch 1.6 HOT 10
- 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.