Hi,
I am using version -> elasticsearch-7.5.2
I want to change multiple fields for a specific index.
each field should get a different value.
I am using c#
Is it possible?
currently, it changes all the fields for the same variable.
This is my code:
UpdateByQueryResponse task = ElasticClient.UpdateByQuery(u => u.Index("test")
.Query(q => q
.MatchAll()
).Script(d => d
.Source("ctx._source.wcf += 1;").Lang("painless"));
Please be patient in waiting for responses to your question and refrain from pinging multiple times asking for a response or opening multiple topics for the same question. This is a community forum, it may take time for someone to reply to your question. For more information please refer to the Community Code of Conduct specifically the section "Be patient". Also, please refrain from pinging folks directly, this is a forum and anyone that participates might be able to assist you.
If you are in need of a service with an SLA that covers response times for questions then you may want to consider talking to us about a subscription.
It's fine to answer on your own thread after 2 or 3 days (not including weekends) if you don't have an answer.
Code formatting
Please format your code, logs or configuration files using </> icon as explained in this guide and not the citation button. It will make your post more readable.
Or use markdown style like:
```
CODE
```
This is the icon to use if you are not using markdown format:
There's a live preview panel for exactly this reasons.
Lots of people read these forums, and many of them will simply skip over a post that is difficult to read, because it's just too large an investment of their time to try and follow a wall of badly formatted text.
If your goal is to get an answer to your questions, it's in your interest to make it as easy to read and understand as possible.
Please update your post.
Your question
Is that something you want to do constantly? What is the use case for this?
Do you have a JSON example of a document you'd like to modify? And a typical JSON document of what it should look like at the end?
Is that something you want to do constantly?
-This is something I'd like to do under specific circumstances when I need to number my documents in a specific manner.
What is the use case for this?
-Numbering documents according to this field.
Do you have a JSON example of a document you'd like to modify? And a typical JSON document of what it should look like at the end?
I think you did not read the "Code formatting" part of my answer. Please update your post.
Also in your examples please remove all non needed fields. That will help to focus on the actual problem.
Is that something you want to do constantly?
-This is something I'd like to do under specific circumstances when I need to number my documents in a specific manner.
What is the use case for this?
-Numbering documents according to this field.
Do you have a JSON example of a document you'd like to modify? And a typical JSON document of what it should look like at the end?
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.