Can split processor address a multi-field?

Using the split processor as documented in my earlier topic:

Now I would like to be able to specify a multi-field as the field to write to:

PUT 51
{
  "mappings": {
    "properties": {
      "q3.read": {
        "type": "boolean"
      },
      "q3.write": {
        "type": "boolean"
      },
      "q3.rw": {
        "type": "text"
      }
    }
  }
}

PUT 510
    {
      "mappings": {
        "properties": {
          "q3.read": {
            "type": "boolean"
          },
          "q3.write": {
            "type": "boolean"
          },
          "q3.rw": {
            "type": "keyword"
          }
        }
      }
    }

    PUT _ingest/pipeline/split5
    {
      "description": "Convert string with multipe choices a. b. c. etc into array. Split on a. b. etc", 
      "processors": [
        {
          "split": {
            "field": "q3.rw",
            "separator": "[a-z][.] ",
            "ignore_missing": true
          }
        }
      ]
    }

    POST _reindex
    {
      "source": {
        "index": "51"
      },
      "dest": {
        "index": "510",
        "pipeline": "split5"
      }
    }

    GET 510/_search

    "hits" : {
        "total" : {
          "value" : 10,
          "relation" : "eq"
        },
        "max_score" : 1.0,
        "hits" : [
          {
            "_index" : "510",
            "_type" : "_doc",
            "_id" : "g8DOlnABCGRif5cq89_l",
            "_score" : 1.0,
            "_source" : {
              "q3.write" : "true",
              "q3.rw" : "a. Read b. Write",
              "q3.read" : "true"
            }
          },

But as you can see, the q3.rw field seems unprocessed by the pipeline.
No error messages in log.
Are multi-fields not supported by the split processor?

Sorry if I have not been clear enough...

Yes the earlier proposed solution works for the issue described in that post, i.e for fields of type:
"split": {
"field": "q3"

In this one there are fields of the following type:
"split": {
"field": "q3.rw"

, and that's what is not working.

I see that I made a mistake. Troubleshooted by using the _simulate endpoint, which worked out fine....!

My bulk indexing was not correctly formatted for multi-fields.
index with
{"q3.rw"....
instead of
{"q3": { "rw".....

correct:

POST 51/_bulk
{"index": {"_id": 12}}
{"q3": { "rw": "a. I live alone f. I live with my friends g. Hejsan"}}

, so my indata was the problem.

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