-
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.
WIP: adapt to config for new elasticsearch package (more notes in com…
…mit msg) 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. TODO: unaddressed 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. I need to figure out how to adapt"
- Loading branch information
1 parent
cf512fe
commit 0dec536
Showing
4 changed files
with
11 additions
and
43 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