ElasticSearch returns full index to csv file

Is it possible to easily export whole index(all saved fields) an elasticsearch cluster in a file .csv(possibly out of the box)?

An alternative I can imagine is to query the entire index and then convert the result ... but I really don't like the idea of ​​parsing the monstrous json, as it contains several million documents!

Are there any other ways or ideas to export?

+4
source share
2 answers

Disclaimer: I am the author of the creation.


estab elasticsearch , . , . API .

:

, , :

{
    "name": "Kiwi",
    "genus": "Apteryx",
    "populations": [
        {"location": "North Island", "size": 2500},
        {"location": "Little Barrier Island", "size": 2000}
    ]
}

:

$ estab -f 'name genus populations.location populations.size'
Kiwi    Apteryx North Island|Little Barrier Island  2500|2000

, . estab |, .

+1

API . JSON - .

0

All Articles