API UpdateRequest after ES 1.5.0 doesn't work function script()


(Camilo Sierra) #1

i use kafka(input) and logstash (1.5.2) with (output) elasticsearch (ES 1.5.2 or 1.6.0)

Even a simple action in the script like update a integer field fail :

{"document_id":"2754","script":"ctx._source.country = 76","action":"update","retry_on_conflict":3}

error log :

    failedactionwithresponseof400,
droppingaction: [
    "update",
    {
        : _id=>"21-2-1",
        : _index=>"drilling_m02_2014_test",
        : _type=>"detailed",
        : _routing=>nil,
        : _script=>" if (ctx._source.edt == null) { ctx._source.edt = eventData; ctx._source.vdu = []; ctx._source.pdt = []; } else { ctx._source.edt += eventData; } ",
        : _scriptParams=>{
            "label"=>"eventData",
            "params"=><Java: : JavaUtil: : ArrayList: -610349907[
                {
                    "filter"=>"city",
                    "value"=>"New York",
                    "vid"=>156442965,
                    "eid"=>16928
                },
                {
                    "filter"=>"image_id",
                    "value"=>"34eerts7",
                    "vid"=>156442965,
                    "eid"=>16928
                }
            ]>
        },
        : _retry_on_conflict=>5
    },
    #<LogStash: : Event: 0x3a60323f@metadata={
        "retry_count"=>0
    },
    @accessors=#<LogStash: : Util: : Accessors: 0x38494d4c@store={
        "action"=>"update",
        "document_id"=>"21-2-1",
        "index_date"=>"drilling_m02_2014_test",
        "@timestamp"=>"2015-07-13T09:58:13.297Z"
    },
    @lut={
        "@version"=>[
            {
                "action"=>"update",
                "document_id"=>"21-2-1",
                "index_date"=>"drilling_m02_2014_test",
                "@timestamp"=>"2015-07-13T09:58:13.297Z"
            },
            "@version"
        ],
        "index_date"=>[
            {
                "action"=>"update",
                "document_id"=>"21-2-1",
                "index_date"=>"drilling_m02_2014_test",
                "@timestamp"=>"2015-07-13T09:58:13.297Z"
            },
            "index_date"
        ],
        "document_id"=>[
            {
                "action"=>"update",
                "document_id"=>"21-2-1",
                "index_date"=>"drilling_m02_2014_test",
                "@timestamp"=>"2015-07-13T09:58:13.297Z"
            },
            "document_id"
        ],
        "action"=>[
            {
                "action"=>"update",
                "document_id"=>"21-2-1",
                "index_date"=>"drilling_m02_2014_test",
                "@timestamp"=>"2015-07-13T09:58:13.297Z"
            },
            "action"
        ],
        "script"=>[
            {
                "action"=>"update",
                "document_id"=>"21-2-1",
                "index_date"=>"drilling_m02_2014_test",
                "@timestamp"=>"2015-07-13T09:58:13.297Z"
            },
            "script"
        ],
        "scriptParams"=>[
            {
                "action"=>"update",
                "document_id"=>"21-2-1",
                "index_date"=>"drilling_m02_2014_test",
                "@timestamp"=>"2015-07-13T09:58:13.297Z"
            },
            "scriptParams"
        ],
        "retry_on_conflict"=>[
            {
                "action"=>"update",
                "document_id"=>"21-2-1",
                "index_date"=>"drilling_m02_2014_test",
                "@timestamp"=>"2015-07-13T09:58:13.297Z"
            },
            "retry_on_conflict"
        ]
    }>,
    @data={
        "action"=>"update",
        "document_id"=>"21-2-1",
        "index_date"=>"drilling_m02_2014_test",
        "@timestamp"=>"2015-07-13T09:58:13.297Z"
    },
    @metadata_accessors=#<LogStash: : Util: : Accessors: 0x3dc05ec4@store={
        "retry_count"=>0
    },
    @lut={
        
    }>,
    @cancelled=false>
]{
    : level=>: warn
}

someone know how i can fixe it please ?

issue open in github https://github.com/elastic/elasticsearch/issues/12205


(Camilo Sierra) #2

i start my elasticsearch with the command bin/elasticsearch and the only logs that i have when execute the unit test is : (i already tested in my local install and pre-prod install)

[2015-07-13 17:07:32,254][INFO ][cluster.service ] [William Baker] added {[logstash-debian-6334-11622][Ho8P9-6qRtmUPDNhr-lpyw][debian][inet[/10.0.0.71:9302]]{client=true, data=false},}, reason: zen-disco-receive(from master [[Equinox][yeH-4ZFaRuSTEnSv89a5tg][debian][inet[/10.0.0.71:9300]]])
[2015-07-13 17:07:32,435][DEBUG][discovery.zen.publish ] [William Baker] received cluster state version 57


(system) #3