Rollover API and upserts

Hello, Do you confirm that doc_as_upsert is supported by the rollover API?

I mean if I follow https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-rollover-index.html:

  • I have a document A in logs-0001
  • the current is logs-0099
  • I use the upsert a doc against logs_writer

is the result:

  • if the doc does not exists, it is created in logs-0099
  • if the doc exists (doc A), it is updated in its own index: logs-0001

No, it will be created in logs-0099 if it can not be found there.

OK, therefore rollover API cannot be used with upserts? confirmed?

It can be used, but it doesn't make as much sense.

Not easily, as you would need to look up which underlying index to update first. If the upset has access to the original timestamp of the event, a time-based index where each index corresponds to a fixed period might be better.

OK thank's for this prompt answer. I would suggest to add a note in the documentation, in the rollover API and the upsert one

1 Like

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