Questions tagged [update-by-query]

26 questions
2
votes
1 answer

add the count of doc in list inside python code to a field in elasticsearch

I need to update a field of a doc in Elasticsearch and add the count of that doc in a list inside python code. The weight field contains the count of the doc in a dataset. The dataset needs to be updated from time to time.So the count of each…
Marzi Heidari
  • 2,660
  • 4
  • 25
  • 57
1
vote
1 answer

How elasticsearch updateByQuery syntax works

I've been working with Elasticsearch for some days. As i'm creating a CRUD, I've come across the updateByQuery method. I'm working with nestjs, and the way that I'm updating a field is: await this.elasticSearch.updateByQuery( { …
PedroSG
  • 466
  • 2
  • 9
  • 38
1
vote
1 answer

Add geoIP data to old data from Elasticsearch index

I recently added a GeoIP processor to my ingestion pipeline in Elasticsearch. this works well and adds new fields to the newly ingested documents. I wanted to add the GeoIP fields to older data by doing an _update_by_query on an index, however, it…
Saba Far
  • 133
  • 2
  • 9
1
vote
1 answer

_update_by_query + script do not work correctly,error:Trying to create too many scroll contexts

Elasticsearch version: 7.6.2 JVM:13.0.2 OS version:centeros7 This is my code POST recommend_index/_update_by_query { "script": { "source": "ctx._source.rec_doctor_id = 1" }, "query": { …
1
vote
0 answers

Elasticsearch - Update a field of several records already indexed based on a value from a new record still not indexed

I need to update a field of several records already indexed based on a value from a new record still not indexed. Is there any way to implement it? The table below describes my index with current docs. The yellow line would be a new doc…
1
vote
0 answers

Elasticsearch : UpdateByQuery API Response returns wrong status

I am facing issue with UpdateByQuery API while trying to update a document which doesn’t exist in Elastic search Problem description We are creating one index for each day like test_index-2020.03.11, test_index-2020.03.12… and we maintain eight…
1
vote
1 answer

version_conflict_engine_exception with _update_by_query

I use ElasticSearch update by query API in flink, flink parallelism is 1. But I got version_conflict_engine_exception, This is my code in flink RichSinkFunction like this: UpdateByQueryRequestBuilder builder =…
0
votes
1 answer

Elastic update_by_query inside array

I have an array which looks like this: "_source": { "dateCreated": "2023-07-12", "sources": [ { "1": null, "lastUpdateDate": "2023-08-10T11:12:36.9848505", "postedDate": "2023-08-10T10:38:57.9440773" How can…
Stefan
  • 3
  • 4
0
votes
1 answer

Fastest way to perform multiple "_update_by_query" in elasticsearch

What is the fastest way to perform multiple "_update_by_query" in elasticsearch The brute force way is to just use a for that runs every single update, Another way for my problem would be searching for each document an then using BULK API to update…
0
votes
0 answers

ElasticSearch updateByQuery fails when updating a text field that has zero as value in it

My index has around 170 Million documents. An example document would be like : { "_index" : "ppdata", "_type" : "_doc", "_id" : "E-cA_H8BvtbXwHDqN7ne", "_score" : 1.0, "_source" : { "gender" : 0, …
Apricot
  • 2,925
  • 5
  • 42
  • 88
0
votes
1 answer

Problem with _update_by_the_query elastic search

Elasticsearch version is about 7.x I want to update all documents in an index and I find in the documentation that I have to use "_update_to_the_query". This is the code: curl -XPOST 127.0.0.1:9200/hamlet-raw/_update_by_the_query -d' { "query":…
Vinz1396
  • 25
  • 5
0
votes
1 answer

How to map array inside message in Logstash HTTP Output

I am using Logstash to update by query existing Elasticsearch documents with an additional field that contains aggregate values extracted from Potgresql table. I use elastichsearch output to load one index using document_id and http output to update…
0
votes
0 answers

Elasticsearch UpdateByQuery memory usage optimisation

We're getting the exception below when performing an update-by-query via Elastic's NEST api. We understand the exception relates to the memory allocation of Elasticsearch's java heap but we would like to explore ways to resolve the issue without…
Drammy
  • 940
  • 12
  • 30
0
votes
1 answer

ElasticSearch Illegal list shortcut value [id] "Update By Query"

I get Illegal list shortcut value [id]. trying to update this document with this query. What Am I missing events" : { "type" : "nested" } location: {"type" : "nested"} nested type of objects id: {"type" : "text"} POST…
Maged Makled
  • 1,918
  • 22
  • 25
0
votes
1 answer

Insert data when no match by update_by_query in elastic search

I have this command that don't match any data in elastic search and I want to insert it after that. //localhost:9200/my_index/my_topic/_update_by_query { "script": { "source": "ctx._source.NAME = params.NAME", "lang":…
hoang
  • 1
  • 1
1
2