I am trying to write script which updates a document ( deleting some fields
).
The script is ctx._source.remove("title") this allows us to delete on
field named title.
How do I change the script to delete multiple fields.
Where Can I read more about the script. I have one of the resource as http://www.elasticsearch.org/guide/reference/api/update/
ctx._source.remove("title");ctx._source.remove("summary");
Works well. But I was looking for something like
ctx._source.removeAll({"title","summary"});
The number of fields can be any number, I know can concat the script that
many times and it will work.
Thanks ,
Arjit
On Sun, May 5, 2013 at 4:32 PM, David Pilato david@pilato.fr wrote:
U can keep updating the params as per the requirement.
-- Sujoy.
On Sunday, May 5, 2013 7:21:55 PM UTC+5:30, Arjit Gupta wrote:
ctx._source.remove("title");ctx._source.remove("summary");
Works well. But I was looking for something like
ctx._source.removeAll({"title","summary"});
The number of fields can be any number, I know can concat the script that
many times and it will work.
Thanks ,
Arjit
On Sun, May 5, 2013 at 4:32 PM, David Pilato <da...@pilato.fr<javascript:>
U can keep updating the params as per the requirement.
-- Sujoy.
On Sunday, May 5, 2013 7:21:55 PM UTC+5:30, Arjit Gupta wrote:
ctx._source.remove("title");ctx._source.remove("summary");
Works well. But I was looking for something like
ctx._source.removeAll({"title","summary"});
The number of fields can be any number, I know can concat the script that
many times and it will work.
Thanks ,
Arjit
On Sun, May 5, 2013 at 4:32 PM, David Pilato da...@pilato.fr wrote:
U can keep updating the params as per the requirement.
-- Sujoy.
On Sunday, May 5, 2013 7:21:55 PM UTC+5:30, Arjit Gupta wrote:
ctx._source.remove("title");ctx._source.remove("summary");
Works well. But I was looking for something like
ctx._source.removeAll({"title","summary"});
The number of fields can be any number, I know can concat the script
that many times and it will work.
Thanks ,
Arjit
On Sun, May 5, 2013 at 4:32 PM, David Pilato da...@pilato.fr wrote:
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.