0.3.2 • Published 2 years ago

fortune-elastic-adapter v0.3.2

Weekly downloads
2
License
MIT
Repository
github
Last release
2 years ago

Fortune ElasticSearch adapter

This is an ElasticSearch adapter for Fortune.js.

Features

  • uses official elasticsearch client
  • Buffer fields are saved as non indexed arrays in ElasticSearch
$ npm install fortune-elastic-adapter

Usage

This adapter works in Node.js only:

const fortune = require('fortune')
const elasticAdapter = require('fortune-elastic-adapter')

const store = fortune(recordTypes, {
  adapter: [ elasticAdapter, {
    /**
     * ElasticSearch adapter. Available options:
     *
     * - `hosts`:       ElasticSearch hosts array. Default: `["http://localhost:9200"]`.
     * - `index`:       Name of the ElasticSearch index. Default: `fortune`.
     * - `log`:         Log level. One of: `debug`, `trace`, `error`, `warning`. Default: `error`.
     * - `apiVersion`:  ElasticSearch API version. Default: `2.4`.
     */
    hosts: ["http://localhost:9200"]
  } ]
})

For full list of options read the official elasticsearch client configuration options

License

This software is licensed under the MIT license.

0.3.2

2 years ago

0.3.0

5 years ago

0.3.1

5 years ago

0.2.9

5 years ago

0.2.8

5 years ago

0.2.7

5 years ago

0.2.6

5 years ago

0.2.5

5 years ago

0.2.4

5 years ago

0.2.3

5 years ago

0.2.2

5 years ago

0.2.1

5 years ago

0.2.0

6 years ago

0.1.9

6 years ago

0.1.8

6 years ago

0.1.7

6 years ago

0.1.6

6 years ago

0.1.5

6 years ago

0.1.0

6 years ago