setShouldStoreResult doesn't store the tasks results


(AN) #1

I am trying to run a reindex job in async mode using reindexRequestBuilder.execute() method.
I have also set reindexRequestBuilder.setShouldStoreResult(true) so that I can retrieve the results later on. Also I have set the number of slices to 8.
When I query the tasks using below command I get the lists of tasks:
curl 'localhost:9200/_tasks?detailed=true&actions=*reindex&pretty'

After the reindex is complete, when I try to get the details for a particular task using the below api, I get an error :

curl 'localhost:9200/_tasks/c9abi7KWRq-MyzWk7xpAYU:123?pretty'

"error" : {
"root_cause" : [
{
"type" : "index_not_found_exception",
"reason" : "no such index",
"index_uuid" : "na",
"resource.type" : "index_expression",
"resource.id" : ".tasks",
"index" : ".tasks"
}
],
"type" : "resource_not_found_exception",
"reason" : "task [c9abi7KWRq-MyzWk7xpAYU:123] isn't running and hasn't stored its results",
"caused_by" : {
"type" : "index_not_found_exception",
"reason" : "no such index",
"index_uuid" : "na",
"resource.type" : "index_expression",
"resource.id" : ".tasks",
"index" : ".tasks"
}
},
"status" : 404
}

Am I missing something here?

@nik9000 any pointers would be very helpful.


(AN) #2

Elasticsearch used is version 5.1.1


(system) #3

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.