src/platform/packages/shared/kbn-es-archiver/README.mdx
The ES Archiver is a service primarily used by the Functional Tests to load up ES indexes using the bulk API which makes the archives more resilient to ES upgrades and easier to inspect/edit locally because they are just plain text files containing newline-delimited JSON (though they are sometimes compressed).
This tool also has a CLI which can be used to save indexes to new archives or load additional archives into a specific ES instance.
To teach the ES Archiver how to talk to ES and Kibana it is ideal to start ES and Kibana using node scripts/functional_test_servers --config some/config/file.ts and then use the same --config flag when running node scripts/es_archiver so that it can access the location and authorization information about the ES instace from the FTR config file.
Additional information about what functionality the CLI provides can be found by running node scripts/es_archiver --help
We now have a performance parameter for the es-archiver#load(), entry-point function. This parameter is optional, with defaults:
According to our benchmarks, these default settings are giving the best results in terms of loading time for the majority of the archives. However, there might be cases where different settings are needed, so they can be overridden when loading an archive.
To control the batch size and concurrency
await esArchiver.load('x-pack/platform/test/fixtures/es_archives/getting_started/shakespeare', {
performance: {
batchSize: 300,
concurrency: 1,
},
});