Multiple index issue when querying same document

Is there a way I can ensure the results from multiple indexes are mapped/displayed correctly?

What seems to happen at the moment with the below results, in separate indexes, is the later does not overwrite the document - therefor will display 2 document results as opposed to 1.

What should happen is the document should get overwritten with the later, since we are using the same document id - just different indexes.

IF we changed the test scenario, and write to the same index eg jobs-2019-june, the document would get overwritten and displayed correctly with the later "success" results.

Example:

Index: jobs-2019-may
document_id: 1234987
Fields:
name: Job1234
status: started
status_achieved@timestamp: YYYY-MM-DD-HH:MM:SS

*** New Month ***

Index: jobs-2019-june
document_id: 1234987
Fields:
name: Job1234
status: success
status_achieved@timestamp: YYYY-MM-DD-HH:MM:SS

Kibana Index Pattern: jobs-*

I don't think you can do that automatically.
If you want to overwrite an existing document, you need to send the PUT request to the index where this document actually lives.

Thanks for your reply.

It may very mean storing individual indexes does not work for me then, and to go single index.

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