How to update the display in Elasticsearch to change the data type of the field and change the type of analyzers in the line

When I try to update the display, I get the following error:

{"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"mapper [timestamp] of different type, current_type [string], merged_type [date]"}],"type":"illegal_argument_exception","reason":"
mapper [timestamp] of different type, current_type [string], merged_type [date]"},"status":400}

I am trying to run the following command on windows

   curl -XPUT localhost:9200/logstash-*/_mapping/log?update_all_types -d "{
    "properties":
    {
        "timestamp": 
        {
            "type": "date", 
            "format": "MM-dd-yyyy HH:mm:ss",
            "fielddata":{"loading" : "lazy"} }
        }
    }";

How can I change the data type of a date field from a string type to a date in a specific format.

I tried to change the display of the row data type to change it to eagerload not_analyzedfrom the parsed file, but it gives the following error:

{"root_cause":[{"type":"illegal_argument_exception","reason":"Mapper for [AppName] conflicts with existing mapping in other types:\n[mapper [AppName] has different [index] values, mapper [App
 different [doc_values] values, cannot change from disabled to enabled, mapper [AppName] has different [analyzer]]"}],"type":"illegal_argument_exception","reason":"Mapper for [AppName] conflict with
existing mapping in other types:\n[mapper [AppName] has different [index] values, mapper [AppName] has different [doc_values] values, cannot change from disabled to enabled, mapper [AppName]
rent [analyzer]]"},"status":400}

Here is my request for the same:

 curl -XPUT localhost:9200/logstash-*/_mapping/log?update_all_types -d "{
"properties":
    {"AppName":
        {
        "type": "string", 
        "index" : "not_analyzed",
        "fielddata":{"loading" : "eager"}
        }
    }
}"

However, if I change it from not_analyzedto analyzed, it gives a message acknowledged=true. How can I change the analyzer.

+4
source share
2 answers

. Elastic docs:

, . , , , . , .

, , not_analyzed.

- .

+3

, .

, , .


? ,

, , .

, . , , , . , .

Elasticsearch, , . , .


?

. , .

Elasticsearch: , string , long . . , .

[...], long, ES , .


, ?

. ES5 ignore_malformed mapping. Elasticsearch ,

. ignore_malformed, true, . The , .

0

All Articles