Just send the full new version of your document and you're done. Elasticsearch will index the new content.
If I did not answer to you question, may be you should provide an example as a Gist so we can comment with more details??? -- David Pilato | Technical Advocate | Elasticsearch.com @dadoonet | @elasticsearchfr Le 24 juin 2014 à 12:51:54, Madhumita Sadhukhan ([email protected]) a écrit: I am not removing any element from an array I need to update particular existing elements within an array. Currently I ma using the Update API in Elastic Search to append new elements within the array but it fails when I try to update values of existing elements. For eg: I am able to add a new record as follows to jobs list using Update API scripts { "status": "InProgress", "runId": 2, "start_date": 2101112, "orderId": "undefined" }, What I need is how to update orderId value from 'undefined' to say 'abcd' using update api. Is this supported? Is Elastic Search supporting indexing in arrays or lists? On Tuesday, June 24, 2014 12:57:15 PM UTC+5:30, David Pilato wrote: If you send the full document without the element you need to remove in the array, this should work fine. How do you actually update your document? -- David Pilato | Technical Advocate | Elasticsearch.com @dadoonet | @elasticsearchfr Le 24 juin 2014 à 09:18:20, Madhumita Sadhukhan ([email protected]) a écrit: I have a requirement where I need to update(not append) existing values within a list or array in Elastic Search. Is this feature supported in elastic search? For eg: I have a field called jobs as part of my document "jobs": [ { "status": "InProgress", "runId": 1, "start_date": 2101112, "orderId": "undefined" }, { "status": "InProgress", "runId": 2, "start_date": 2101112, "orderId": "undefined" }, ], and I am required to update the orderId for each job run to different values. Currently I am only able to append a job but I cannot update the attributes of each job later. Is this usecase supported and possible in Elastic Search? -- You received this message because you are subscribed to the Google Groups "elasticsearch" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/ba7f8f47-3578-4b47-9410-9dd2622911a2%40googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "elasticsearch" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/2e69ec6b-4c53-4802-ab0a-49aa4f395c97%40googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "elasticsearch" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/etPan.53a95aab.3352255a.950f%40MacBook-Air-de-David.local. For more options, visit https://groups.google.com/d/optout.
