node.js - remove objects from array elastic search -


I need to remove an object that satisfies the condition, I am able to update the base's object ( "Tweet_id": "1", "a": "b"}, {"tweet_id"), which is as follows:

  PUT twitter / twit / 1 {"list" "123", "a": "f"}}} Post / Twitter / twit / 1 / _update {"script": "foreach (item: ctx._source.list) {if item ['tweet_id'] =    

it is working > I am doing this

  posted / twitter / tw ("Item": "foreach" (item: ctx._source.list) {if item ['tweet_id'] == tweet_id) {ctx._source.list.remove (item);}} "," Params ": {tweet_id": "123"}}   

but it is not working and giving this error,

ElasticsearchIllegalArgumentException [script Failed to execute]; Nested: concurrent reformation exceptions; Error: ElasticsearchIllegalArgumentException [iled for executing FA script]; Nested: ConcurrentModificationException

I

  delete the entire array or entire field using "script": "ctx._source.remove ('list') I am able to remove objects by object using 



  

Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -