Note that there are some explanatory texts on larger screens.

plurals
  1. POMVEL VerifyError with Bulk Update - Not updated few records in JAVA API
    primarykey
    data
    text
    <p>I am using elastic search bulk update JAVA API. Below is the script, I am using for bulk update. In mapping nested object 'name' is specified as string field.</p> <pre><code>String updateScript = "if(ctx._source.containsKey(\"nestedObjects\") &amp;&amp; ctx._source.nestedObjects.size()&gt;0) { int nestedSize = ctx._source.nestedObjects.size(); boolean isUpdated = false; for (int i = 0; i &lt; nestedSize; i++) { if(ctx._source.nestedObjects[i].containsKey(\"name\")) { if(ctx._source.nestedObjects[i].name == \"ram\") { ctx._source.nestedObjects[i].name = \"ricky\"; isUpdated = true; } } } if(!isUpdated) { ctx._source.nestedObjects.add(\"name\":\"ricky\"); } }"; </code></pre> <p>Below is the code I am using for bulk update.</p> <pre><code> BulkRequestBuilder bulkRequestBuilder = client.prepareBulk(); for (int i=0; i&lt;5; i++) { String documentId = String.value(i); bulkRequestBuilder.add(indexName, type, documentId).setScript(updateScript).setRouting(routingName).request()); } BulkResponse bulkResponse = bulkRequestBuilder.execute().actionGet(); </code></pre> <p>Bulk Failure Message:</p> <pre><code>message [VerifyError[(class: ASMAccessorImpl_2153668671377692494610, method: getValue signature: (Ljava/lang/Object;Ljava/lang/Object;Lorg/elasticsearch/common/mvel2/integration/VariableResolverFactory;)Ljava/lang/Object;) Expecting to find integer on stack]] </code></pre> <p>Note : Only few records not getting updated. If I update again, some other few records getting same error and not updated. The record, which got error for the first time got updated in second time.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload