Elastic_app_search set engine based on document value

Within my document, there is a client_id field

I would like to set the engine for my elastic_app_search based on this value. So each document goes into the correct engine based on the document's client_id

I tried to do this but it doesn't work (setting the engine value to an actual value does work)

output { 
  elastic_app_search {
    api_key => "private-XXX"
   engine => "%{client_id}"
    url => "https://XXX.ent-search.eu-west-2.aws.cloud.es.io"
  }
 
}

Gives me the below error:

[2020-10-14T18:12:18,775][ERROR][logstash.agent           ] Failed to execute action {:id=>:main, :action_type=>LogStash::ConvergeResult::FailedAction, :message=>"Could not execute action: PipelineAction::Create<main>, action_result: false", :backtrace=>nil}

Set log.level to debug and see if you get a more informative error message.

That said, I see no suggestion in the code that sprintf references are supported.

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