diff --git a/docs/features/search/concepts.md b/docs/features/search/concepts.md index 57ab061974..69a7223085 100644 --- a/docs/features/search/concepts.md +++ b/docs/features/search/concepts.md @@ -23,7 +23,7 @@ To get started, you should get familiar with these core concepts: Backstage Search isn't a search engine itself, rather, it provides an interface between your Backstage instance and a Search Engine of your choice. More concretely, a `SearchEngine` is an interface whose concrete implementations -facilitate communication with different search engines (like ElasticSearch, +facilitate communication with different search engines (like Elasticsearch, Lunr, Solr, etc). This abstraction exists in order to support your organization's needs. diff --git a/docs/features/search/getting-started.md b/docs/features/search/getting-started.md index e13401a8e3..1787189e91 100644 --- a/docs/features/search/getting-started.md +++ b/docs/features/search/getting-started.md @@ -286,7 +286,7 @@ an example: Backstage Search isn't a search engine itself, rather, it provides an interface between your Backstage instance and a [Search Engine](./concepts.md#search-engines) of your choice. Currently, we only -support two engines, an in-memory search Engine called Lunr and ElasticSearch. +support two engines, an in-memory search Engine called Lunr and Elasticsearch. See [Search Engines](./search-engines.md) documentation for more information how to configure these in your Backstage instance. diff --git a/docs/features/search/search-engines.md b/docs/features/search/search-engines.md index 68df3f0944..2e7341a0d7 100644 --- a/docs/features/search/search-engines.md +++ b/docs/features/search/search-engines.md @@ -5,7 +5,7 @@ description: Choosing and configuring your search engine for Backstage --- Backstage supports 3 search engines by default, an in-memory engine called Lunr, -ElasticSearch and Postgres. You can configure your own search engines by +Elasticsearch and Postgres. You can configure your own search engines by implementing the provided interface as mentioned in the [search backend documentation.](./getting-started.md#Backend) @@ -43,7 +43,7 @@ const indexBuilder = new IndexBuilder({ logger: env.logger, searchEngine }); The Postgres based search engine only requires that postgres being configured as the database engine for Backstage. Therefore it targets setups that want to -avoid maintaining another external service like elastic search. The search +avoid maintaining another external service like Elasticsearch. The search provides decent results and performs well with ten thousands of indexed documents. The connection to postgres is established via the database manager also used by other plugins. @@ -96,13 +96,13 @@ search: The Postgres documentation on [Highlighting Results](https://www.postgresql.org/docs/current/textsearch-controls.html#TEXTSEARCH-HEADLINE) has more details. -## ElasticSearch +## Elasticsearch -Backstage supports ElasticSearch search engine connections, indexing and -querying out of the box. Available configuration options enable usage of either -AWS or Elastic.co hosted solutions, or a custom self-hosted solution. +Backstage supports Elasticsearch (and OpenSearch) search engine connections, +indexing and querying out of the box. Available configuration options enable +usage of either AWS or Elastic.co hosted solutions, or a custom self-hosted solution. -Similarly to Lunr above, ElasticSearch can be set up like this: +Similarly to Lunr above, Elasticsearch can be set up like this: ```typescript // app/backend/src/plugins/search.ts @@ -116,20 +116,20 @@ const indexBuilder = new IndexBuilder({ logger: env.logger, searchEngine }); For the engine to be available, your backend package needs a dependency on package `@backstage/plugin-search-backend-module-elasticsearch`. -ElasticSearch needs some additional configuration before it is ready to use +Elasticsearch needs some additional configuration before it is ready to use within your instance. The configuration options are documented in the [configuration schema definition file.](https://github.com/backstage/backstage/blob/master/plugins/search-backend-module-elasticsearch/config.d.ts) -The underlying functionality uses either the official ElasticSearch client -version 7.x (meaning that ElasticSearch version 7 is the only one confirmed to +The underlying functionality uses either the official Elasticsearch client +version 7.x (meaning that Elasticsearch version 7 is the only one confirmed to be supported), or the OpenSearch client, when the `aws` or `opensearch `provider is configured. Should you need to create your own bespoke search experiences that require more than just a query translator (such as faceted search or Relay pagination), you -can access the configuration of the search engine in order to create new elastic -search clients. The version of the client need not be the same as one used -internally by the elastic search engine plugin. For example: +can access the configuration of the search engine in order to create new +Elasticsearch clients. The version of the client need not be the same as one +used internally by the Elasticsearch engine plugin. For example: ```typescript import { isOpenSearchCompatible } from '@backstage/plugin-search-backend-module-elasticsearch'; @@ -149,7 +149,7 @@ const client = searchEngine.newClient(options => { #### Set custom index template -The elasticsearch engine gives you the ability to set a custom index template if needed. +The Elasticsearch engine gives you the ability to set a custom index template if needed. > Index templates define settings, mappings, and aliases that can be applied automatically to new indices. @@ -176,8 +176,8 @@ searchEngine.setIndexTemplate({ ### AWS -Using AWS hosted ElasticSearch the only configuration option needed is the URL -to the ElasticSearch service. The implementation assumes that environment +Using AWS hosted Elasticsearch the only configuration option needed is the URL +to the Elasticsearch service. The implementation assumes that environment variables for AWS access key id and secret access key are defined in accordance to the [default AWS credential chain.](https://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/setting-credentials-node.html). @@ -191,8 +191,8 @@ search: ### Elastic.co -Elastic Cloud hosted ElasticSearch uses a Cloud ID to determine the instance of -hosted ElasticSearch to connect to. Additionally, username and password needs to +Elastic Cloud hosted Elasticsearch uses a Cloud ID to determine the instance of +hosted Elasticsearch to connect to. Additionally, username and password needs to be provided either directly or using environment variables like defined in [Backstage documentation.](https://backstage.io/docs/conf/writing#includes-and-dynamic-data) @@ -222,8 +222,8 @@ search: ### Others -Other ElasticSearch instances can be connected to by using standard -ElasticSearch authentication methods and exposed URL, provided that the cluster +Other Elasticsearch instances can be connected to by using standard +Elasticsearch authentication methods and exposed URL, provided that the cluster supports that. The configuration options needed are the URL to the node and authentication information. Authentication can be handled by either providing username/password or an API key. For more information how to create an API key, @@ -253,13 +253,13 @@ search: apiKey: base64EncodedKey ``` -### Elastic search batch size +### Elasticsearch 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), +Default batch size of the Elasticsearch 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. +or increase the batch size in your `app-config.yaml` using the `batchSize` option provided for Elasticsearch configuration. #### Configuration example