diff --git a/.changeset/gentle-cobras-kick.md b/.changeset/search-gentle-cobras-kick.md similarity index 78% rename from .changeset/gentle-cobras-kick.md rename to .changeset/search-gentle-cobras-kick.md index 7f971a6ed7..3ddd4df67c 100644 --- a/.changeset/gentle-cobras-kick.md +++ b/.changeset/search-gentle-cobras-kick.md @@ -2,7 +2,7 @@ '@backstage/plugin-search-backend-module-elasticsearch': patch --- -Feature: add a new option to set the batch size for elastic search engine, if not given the default batch size is 1.000 +Feature: add a new option to set the batch size for elastic search engine, if not given the default batch size is 1000 Example usage: diff --git a/docs/features/search/search-engines.md b/docs/features/search/search-engines.md index ecd8a85109..5b7b6f4384 100644 --- a/docs/features/search/search-engines.md +++ b/docs/features/search/search-engines.md @@ -232,3 +232,23 @@ search: auth: apiKey: base64EncodedKey ``` + +### Elastic search batch size + +Default batch size of the elastic search engine is set to 1000. If you are using a lower spec computing resources (like AWS small instance), +you may get an error caused by limited thread_pool configuration. ( `429 Too Many Requests /_bulk` ) + +In this case you need to decrease the batch size to index the resources to prevent this kind of error. You can easily decrease +or increase the batch size in your `app-config.yaml` using the `batchSize` option provided for elasticsearch configuration. + +#### Configuration example + +**Set batch size to 100** + +```yaml +search: + elasticsearch: + batchSize: 100 +``` + +> You can also increase the batch size if you are using a large ES instance.