Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/beace/eggjs-elasticsearch
eggjs elasticsearch plugin
https://github.com/beace/eggjs-elasticsearch
Last synced: 15 days ago
JSON representation
eggjs elasticsearch plugin
- Host: GitHub
- URL: https://github.com/beace/eggjs-elasticsearch
- Owner: Beace
- License: mit
- Created: 2023-06-17T08:22:59.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-11-07T11:43:49.000Z (almost 1 year ago)
- Last Synced: 2024-10-10T15:12:57.207Z (27 days ago)
- Language: TypeScript
- Size: 27.3 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# eggjs-elasticsearch
eggjs elasticsearch plugin use elasticsearch@8
## install
```
npm install eggjs-elasticsearch
```## eggjs plugin config
`plugin.js`
```js
{
elasticsearch: {
enable: true,
package: "eggjs-elasticsearch"
}
}
```## plugin config
`config.default.ts` single client
```js
{
elasticsearch: {
client: {
node: "http://localhost:9200"
}
}
}```
`config.default.ts` multi clients
```js
{
elasticsearch: {
clients: {
foo: {
node: "http://localhost:9200"
},
bar: {
node: "http://localhost:9201"
}
}
}
}```
more options see [@elastic/elasticsearch](https://npmjs.org/@elastic/elasticsearch)
## learn how to use elasticsearch client
https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/index.html