This package has been deprecated

Author message:

Package no longer supported. Contact support@npmjs.com for more info.

elasticsearch-simple-api

0.0.1 • Public • Published

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');
});

Readme

Keywords

Package Sidebar

Install

npm i elasticsearch-simple-api

Weekly Downloads

2

Version

0.0.1

License

none

Last publish

Collaborators

  • npm