0

Okay, here is the task:

I've already read the whole documentation and I noticed that I can "upgrade" a data type like string to a multi field - in a test scenario it already worked.

My documents structure is currently:

{
    "name": "test",
    "words": [
        {
            "words": "hello world",
            "verts": [
                1,
                2,
                3
            ]
        }
    ]
}

These documents were created using the default mappings - so no mapping has been set explicitly.

I am issuing a XDELETE command with data like:

{
    "article": {
        "properties": {
            "words": {
                "type": "multi_field",
                "fields": {
                    "words": {
                        "type": "string",
                        "index": "analyzed"
                    },
                    "untouched": {
                        "type": "string",
                        "index": "not_analyzed"
                    }
                }
            }
        }
    }
}

But I receive this error here:

{"error":"MergeMappingException[Merge failed with failures {[Can't merge a non multi_field / non simple mapping [words] with a multi_field mapping [words]]}]","status":400}

Can someone explain to me, why this happens? When I issue this mapping to a clean index, it works and the not_analyzed filter is being applied.

Thanks :)

Jan

4

1 に答える 1