-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(elasticsearch): support
@elastic/elasticsearch
client
BREAKING: Support new elasticsearch configuration format. As part of updating to elasticsearch 8, I'm updating pelias from the deprecated `elastic` package to it's successor `@elastic/elasticsearch` which supports both es7 and 8 (and some older versions too, but I think we only care about 7+). Note that this is a backwards incompatible change - old pelias code using the `elasticsearch` package will not be able to use these new configs. apiVersion is determined by the client version, so it's no longer necessary. `keepAlive` is true by default, you need to set `agent: false` to disable it: const client = new Client({ node: 'http://localhost:9200', // Disable agent and keep-alive agent: false }) `hosts` is now `nodes` (or `node`) and has a different format. Deleted parameters that aren't used in the new client: - `env`: I'm not sure what it's for. I suspect it's a pelias thing, not an elasticsearch thing, which seems like a conflation of the responsibilities of 'esclient config' vs 'pelias env mgmt'. Maybe I'm confused though. - `log`: The new elasticsearch client emits events instead of logging.
- Loading branch information
1 parent
72e4a4c
commit a5d196e
Showing
4 changed files
with
11 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters