From b0b8213056e8421436334f67c6a82ab82e52c028 Mon Sep 17 00:00:00 2001 From: Hasan Oezdemir <21654050+nodify-at@users.noreply.github.com> Date: Sat, 9 Jul 2022 14:53:17 +0200 Subject: [PATCH] feature: update the search engine documentation to describe the batch size and rename change set file. Signed-off-by: Hasan Oezdemir <21654050+nodify-at@users.noreply.github.com> --- ...s-kick.md => search-gentle-cobras-kick.md} | 2 +- docs/features/search/search-engines.md | 20 +++++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) rename .changeset/{gentle-cobras-kick.md => search-gentle-cobras-kick.md} (78%) 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.