@shelf/elasticsearch-local
    TypeScript icon, indicating that this package has built-in type declarations

    2.3.0 • Public • Published

    elasticsearch-local CircleCI npm (scoped)

    Run any version of ElasticSearch locally

    Usage

    0. Install

    $ yarn add @shelf/elasticsearch-local --dev
    

    1. Start Elasticsearch

    import {start} from '@shelf/elasticsearch-local';
    
    await start({
      esVersion: '7.3.0',
      port: 9000, // optional
      clusterName: 'test', // optional
      nodeName: 'test', // optional
      indexes: [
        {
          name: 'your-index',
          // create index with options - https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-create-index.html#indices-create-api-request-body
          body: {
            settings: {
              number_of_shards: '1',
              number_of_replicas: '1'
            },
            aliases: {
              'some-acc-id': {}
            },
            mappings: {
              "properties": {
                "field1" : {"type" : "text"}
            }
          }
        }
      ] // optional
    });

    2. Stop Elasticsearch

    import {stop} from '@shelf/elasticsearch-local';
    
    await stop();

    Publish

    $ git checkout master
    $ yarn version
    $ yarn publish
    $ git push origin master --tags

    License

    MIT © Shelf

    Install

    npm i @shelf/elasticsearch-local

    DownloadsWeekly Downloads

    212

    Version

    2.3.0

    License

    MIT

    Unpacked Size

    11.2 kB

    Total Files

    7

    Last publish

    Collaborators

    • bogdan.kyba
    • dima-bond
    • maksym.hayovets
    • oles.zadorozhnyy
    • ss1l
    • maks.kolesnyk
    • gemshelf
    • d-mii-
    • hartzler
    • tarasdyksan
    • andrii_butsa
    • nazarko_suv
    • bogdan.kolesnyk
    • vitaliishcherban
    • vladgolubev
    • marianna-milovanova
    • hmelenok
    • knupman
    • maaraanas
    • terret
    • chapelskyi.slavik
    • ahavrysh
    • pihorb
    • irynah
    • diana.kryskuv
    • andy.raven
    • rafler
    • mykola.chepkyi
    • sskalp88
    • demiansua
    • yuriil
    • ktv18
    • drews_abuse
    • rostyslav-horytskyi
    • whodeen