Skip to main content
Question

Testing 2 different index mapping in Elastic

  • Mar 11, 2025 3:16 AM UTC
  • 23 replies
  • 177 views

I'm trying to test 2 different index mapping in Elastic. How do I send output to these 2 indexes? Doesn't seem like I can do with the "Output" when defining routes (no quick connect).

23 replies

David Maislin

Index or data stream: Enter a JavaScript expression that evaluates to the name of the Elastic data stream or Elastic index where you want events to go. The expression is evaluated for each event; can evaluate to a constant value; and must be enclosed in quotes or backticks. An event's `__index` field can overwrite the index or data stream name.


David Maislin

David Maislin

Is that what you are doing?


I want to send to a data stream and a time series data stream.


David Maislin

Ah


duplicate the data on the output


David Maislin

Clone function first and modify the clone event to a different index, then use an Output Router based on __index to go to two different destinations.


David Maislin

Let me try this. Sounds promising!


Excellent. This works!


David Maislin

Noice!


David Maislin

Output router is amazing!


I configured 2 output index but I'm getting 3 documents for each interval


0


Does it need to be final on both?


The duplicated documents is on the bottom one.


David Maislin

No, you have it correct


David Maislin

You can also use the filters


I believe it worked fine at first, then it started writing 3 times instead of 2.


David Maislin

true is everything to both places


David Maislin

index1 == xyz goes to dest 1 FINALindex2 == abc goes to dest 2 FINAL


Do I need to change something?


David Maislin

I DM'd you