From baf39f45b52a7ece304d70c68233640aafe40077 Mon Sep 17 00:00:00 2001 From: Charles Lowell Date: Tue, 14 Dec 2021 20:49:27 +0200 Subject: [PATCH] Add explainer for `newClient` to the search howto Signed-off-by: Charles Lowell --- docs/features/search/search-engines.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/docs/features/search/search-engines.md b/docs/features/search/search-engines.md index 1331c73b72..8342c74096 100644 --- a/docs/features/search/search-engines.md +++ b/docs/features/search/search-engines.md @@ -90,6 +90,18 @@ within your instance. The configuration options are documented in the The underlying functionality is using official ElasticSearch client version 7.x, meaning that ElasticSearch version 7 is the only one confirmed to be supported. +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: + +```typescript +import { Client } from '@elastic/elastic-search'; + +const client = searchEngine.newClient(options => new Client(options)); +``` + ## Example configurations ### AWS