Lowercase processor - [field] property isn't a string, but of type [java.util.ArrayList]

Hi,

Elasticsearch version: 7.13.3
Python module in use: elasticsearch-7.13.3

Pipeline:

B_AutoReply_pipeline = """
{
    "processors":[
        {
            "date": {
                "field": "Parsed_Datetime",
                "formats": ["strict_date_optional_time","yyyy-MM-dd HH:mm:ss"],
                "ignore_failure": true
            }
        },
        {
            "lowercase": {
                "field": ["Flag_1","Flag_2","Flag_2"],
                "ignore_failure": true
            }
        }
    ]
}
"""

I am having issues with the field property under lowercase processor. As a consequence it is not creating the pipeline.

I get an error saying that the field is not a string.

Processor_Property

According to Elasticsearch documentation it is written about this processor: "Converts a string to its lowercase equivalent. If the field is an array of strings, all members of the array will be converted."

Does anyone know what am I doing wrong.

Thanks for your attention on this.

Regards,
f4d0

You need to specify three lowercase processor, one for each field (field1, field2, field3). The docs mention

If the field is an array of strings, all members of the array will be converted.

this however refers to the value of the field, so if your JSON looks like field1: ["A", "B", "C"]

hope that helps.

1 Like

Yes, if does help a lot! I guess I miss interpreted it. I've changed the pipeline and now it works good.
The challenge for me is that I have some pipelines that have +50 to fields to convert. Either way, it is solved.

Thanks so much @spinscale

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