Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

elasticsearch-simple-api

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

elasticsearch-simple-api

Elasticsearch Simple Api

  • 0.0.1
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
3
Maintainers
1
Weekly downloads
 
Created
Source

Elasticsearch-Simple-Api for Node

This is a Node.js module that I developed while I was working on a small WEB project with Elasticsearch and facilitated me the use of this technology.

#Functions

  • addDocument (index, type, document, callback)
  • addDocumentWithId (index, type, document, callback)
  • addMultipleDocuments (index, type, documentsArray, callback)
  • addMultipleDocumentsWithId (index, type, documentsArray, callback)
  • updateDocument (index, type, id, document, callback)
  • deleteDocument (index, type, id, callback)
  • getDocumentById (index, type, id, callback)
  • getDocumentByField (index, type, fieldName, fieldValue, callback)
  • getDocumentsByName (index, name, callback)
  • getDocumentsByType (index, type, callback)
  • deleteIndex (index, callback)
  • deleteMultipleIndexes (indexesArray, callback)

#Example

First of all, import the module:

var esa = requiere('elasticsearch-simple-api');

Call the function:

sea.addMultipleDocuments(index, type, document, function (err,result){
	if (error!= undefined)
		console.log('Error: ' + error);
	else
		console.log('OK');
});

Keywords

FAQs

Package last updated on 22 Oct 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc