Error reindexing "Field [_source] is defined both as an object and a field."

I am trying to copy existing index to new index using reindex API

/_reindex?wait_for_completion=false
{
    "source": {
    "index": "articles"
    },
    "dest": {
    "index": "articles20200321"
    },
    "conflicts": "proceed"
}

But it fails after some time with following error

"failures": [
    {
        "index": "articles20200321",
        "type": "_doc",
        "id": "_analyze",
        "cause": {
            "type": "illegal_argument_exception",
            "reason": "Field [_source] is defined both as an object and a field."
        },
        "status": 400
    }
]

There are around 783907 documents and only 126999 get created to new index. Can someone please point to the root cause, or how to identify it?

Apparently you have a document which _id is _analyze. It looks weird.

1 Like

Thanks, that was helpful. After deleting the document with id _analyze I was able to successfully reindex.

Seems this document was created by mistake while executing incorrect analyze request.

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