Elasticsearch Node.js client common operations Index (insert) client.index({ index: 'example_index', type: 'posts', id: '1', body: { user: 'me', post_date: new Date(), message: 'Hello World!' }, refresh: true }) Search (DSL) client.search({ index: 'example_index', type: 'posts', body: { query: { match: { body: 'Hello World' } } } }) Delete client.delete({ index: 'example_index', type: 'posts', id: '1' }) Update client.update({ index: 'game-of-thrones', id: 2, body: { doc: { character: 'Maria da silva' } } }) delete index client.indices.delete({ index: 'game-*' }) create index client.indices.create({ index: 'game-of-thrones' })