Regarding Upsert query in ElasticSearch doc.deleted

Previous Topic Next Topic
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
Report Content as Inappropriate

Regarding Upsert query in ElasticSearch doc.deleted

Charan Adabala
This post has NOT been accepted by the mailing list yet.
Hi ,

I'm trying to upsert the data in the Index, while indexing the data is indexing using the spark RDD, the same id data will come to next RDD of spark.
The upsert the counts is working fine, but some of the documents are in docs.deleted which is re indexed.
But the final results has no problem.

Script eventsCountScript = new Script(
                                                "ctx._source.events_count += events_count;"
                                                + "ctx._source.events_size_in_bytes += events_size_in_bytes;"
                                                + "ctx._source.ts = ts",
                                                ScriptType.INLINE, "groovy", updateObject);

updateRequestForCount = new UpdateRequest(indexName, indexType,
                                                updateObject) ;


yellow open   data_vol_stats_eiq_datastats_2016-09-29      5   1          7            18       21kb           21kb
yellow open   data_vol_stats_globalcustomer_2016-09-29     5   1          2           3       8kb            8kb
yellow open   data_vol_stats_neweiq_datastats_2016-09-29   5   1          4            14      9.3kb          9.3kb

Please help me on this issue.

Thanks in advance.
Charan Adabala