Insert Document to Index alias

Hi Team,

Is there a method to ingest data into an Index alias, allowing the Elasticsearch engine to determine the specific index for insertion. Likewise in RDBMS, while inserting into partition table , RDBMS engine automatically directs the data to the appropriate partition based on the partition key.

Thanks,
Debasis

No, there is not. Any alias pointing to more than one index is automatically read-only.

But an ingest pipeline might help to solve that use case .

1 Like

@dadoonet Could you please provide some guidance , how to achieve the goal.

Thanks,
Debasis

Have a look at Ingest pipelines | Elasticsearch Guide [8.14] | Elastic (and the rest of the page if you don't know what ingest pipeline is).

PUT _ingest/pipeline/my-pipeline
{
  "processors": [
    {
      "set": {
        "field": "_index",
        "value": "{{{foo.bar}}}"
      }
    }
  ]
}