New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

mongoose-elastic

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mongoose-elastic

Do stuff with elastic and mongoose

  • 0.0.8
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2
decreased by-77.78%
Maintainers
1
Weekly downloads
 
Created
Source

Mongoose-elastic

Do stuff with elastic and mongoose

Version

0.3

Tech

  • Mongoose

Directory Structure

|---mongoose-elastic
   |-lib
   |-test

Install

npm install mongoose-elastic --save

Setup

Add a mapping and prefix.

activitySchema.plugin(elastic, { prefix: 'dev',
  mapping: {

    message: String,
    event: {
      title: String
    }
  }
})

syncAll

Sync things.

Activity.syncAll(function(err) {
   if (err) {
     console.log(err);
  }

  console.log('done!');
})

sync

activity.sync(function() {})

Global

elastic.search.config({ prefix: 'stage' });
elastic.search({ collections: ['activities'] }, function(err, results) {
  if (err) {
    console.log(err);
  }

  console.log(results);
})

Just a collection

Activity.search({ prefix: 'dev' }, function(err, results) {
  if (err) {
    console.log(err);
  }

  console.log(results);
})

Tests


make test

FAQs

Package last updated on 06 May 2014

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