Reindexing doesnt work

Hi,

I changed mapping to index so I wanted reindex. I have about 200 daily indicies that I want reindex. I used bellow command. When I ran it gave me 504 timeout error. When I checked GET /_cat/indices?v there is created about 100 copies with -reindexed at the end. But these indicies are empty and they have docs.count: 5 and nothing is happening. Their health is green and status is open. When I ran GET /_tasks?detailed=true&actions=*reindex&group_by=parents it gives me no tasks. When I check the ES log I see lot of:

org.elasticsearch.transport.RemoteTransportException: [****][*****:9300][indices:data/read/search[phase/query]]
Caused by: org.elasticsearch.search.query.QueryPhaseExecutionException: Query Failed [Failed to execute main query]

Can somebody help?

COMMAND:

POST _reindex
{
  "source": {
    "index": "nginxprx-*"
  },
  "dest": {
    "index": "nginxprx"
  },
  "script": {
    "lang": "painless",
    "source": "ctx._index = 'nginxprx-' + (ctx._index.substring('nginxprx-'.length(), ctx._index.length())) + '-reindexed'"
  }
}
1 Like

Can you post more of the Elasticsearch logs?
Have you tried with just one index?

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