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

elasticsearch-module

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-module

A wrapper around functions of elasticsearch.

  • 1.0.0
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
2
Maintainers
1
Weekly downloads
 
Created
Source

elasticsearch-module

A wrapper around functions of elasticsearch.

NPM

Install

$ npm install --save elasticsearch-module

Initializing



var esModule = require('elasticsearch-module')
    
esModule.init({
  baseUrl: 'http://youip:9200/'
});

Add index

var className = 'product';
var data = { 
    "objectId": "0001", 
    "user": "dilbert", 
    "postDate": "2011-12-15", 
    "body": "Search is hard. Search should be easy." ,
    "title": "On search"
};

esModule.add(className, data).then(function(result){
    //dosomething() ....
},function(err){
    //dosomethingElse() ....
});

var className = 'product';
var _search = 'pretty' -d' { "query": { "fuzzy" : { "description" : "The solar system", "fuzziness": 2 } } }';
//var _search = 'q=body:Search';

esModule.add(className, _search).then(function(result){
    //dosomething() ....
},function(err){
    //dosomethingElse() ....
});

License

MIT

FAQs

Package last updated on 15 Nov 2016

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