Skip to content

Latest commit

 

History

History
44 lines (33 loc) · 622 Bytes

README.md

File metadata and controls

44 lines (33 loc) · 622 Bytes
const Factory = require("es-test-helper")

const config = {
  connection: {
    host: "http://localhost:9200"
  },
  indices: [
    {
      prefix: "offers-", 
      dayClusterFormat: "YYYY-MM-DD",
      mapping: {

      },
    },
    // wihtout cluster
    {
      name: "not_clustered",
      mapping: {
        
      },
    },
    // custom method
    {
      name: () => "abc" + "123",
      mapping: {
        
      },
    }

  ]
}


const EsTestHelper = Factory(config)


EsTestHelper.createIndices()
// create all elasticsearch indices

EsTestHelper.dropAll()
// drop all elasticsearch indices