Skip to content

[Ingest] default_pipeline is not working when the index is referred by its alias #35817

@squirrel532

Description

@squirrel532

Elasticsearch version : 6.5.0

OS version (uname -a if on a Unix-like system): Ubuntu 18.04

Description of the problem including expected versus actual behavior:

Steps to reproduce:

  1. Create a pipeline that will modify _index field of the document.
PUT _ingest/pipeline/index_routing
{
    "description" : "route document to proper index and shard",
    "processors" : [
      {
        "date_index_name" : {
          "field" : "posted_date",
          "date_formats" : [
            "ISO8601"
          ],
          "date_rounding" : "y",
          "index_name_format" : "yyyy",
          "index_name_prefix" : "search-"
        }
      }
    ]
}
  1. Create a index with default_pipeline
PUT test_index
{
  "settings": {
    "default_pipeline": "index_routing"
  },
  "aliases": {
    "my_index_alias": {}
  }
}
  1. Create destination index
PUT search-2018
{}
  1. Index something
PUT my_index_alias/_doc/first_doc
{
  "posted_date": "2018-01-01T00:00:00"
}

Then we can find that the document has been indexed into test_index instead of search-2018.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions