[Python] How to get the records in an ordered way as it is stored in memory from elastic search

Discussão em 'Python' iniciado por Stack, Julho 3, 2025.

  1. Stack

    Stack Membro Participativo

    I have a problem where I have one server which has records in particular order and I have to replicate the same order in other servers as well. I made the mistake of not using the sort in querying. (I can't undo this as well).

    I have nearly 3 million records in the ES deployed in kubernetes cluster. I was able to get all the records in order for one index with number of shards as 1 but facing an issue for the number of shards 5.

    I have tried the following:

    1. Snapshot,
    2. Using the scroll API,
    3. Increasing the max_result size and directly saving using _search.

    Any ideas on how to solve this?

    Continue reading...

Compartilhe esta Página