mongoosastic

Index Mongoose models into elasticsearch automatically. Looking for maintainers!

Github stars Tracking Chart

LOOKING FOR MAINTAINERS

This project is looking for contributors/maintainers. Please check issue #457. If you, or anyone you know, work with Mongoose and/or ElasticSearch please let them know that we'd appreciate any help. Thanks!

Mongoosastic

Build Status
NPM version
Coverage Status
Downloads
Gitter

Mongoosastic is a mongoose plugin that can automatically index your models into elasticsearch.

Getting started

  1. Install the package
npm install -S mongoosastic
  1. Setup your mongoose model to use the plugin
var mongoose     = require('mongoose')
  , mongoosastic = require('mongoosastic')
  , Schema       = mongoose.Schema

var User = new Schema({
    name: String
  , email: String
  , city: String
})

User.plugin(mongoosastic)
  1. Query your Elasticsearch with the search() method (added by the plugin)
User.search({
  query_string: {
    query: "john"
  }
}, function(err, results) {
  // results here
});

NOTE: You can also query Elasticsearch with any other method. Example:

curl http://localhost:9200/users/user/_search

Documentation

View docs

Main metrics

Overview
Name With Ownermongoosastic/mongoosastic
Primary LanguageTypeScript
Program languageJavaScript (Language Count: 5)
Platform
License:MIT License
所有者活动
Created At2014-10-24 16:44:30
Pushed At2023-03-07 16:23:05
Last Commit At2022-09-19 20:24:37
Release Count56
Last Release Namev5.0.0 (Posted on )
First Release Name0.0.1 (Posted on 2012-06-20 02:28:11)
用户参与
Stargazers Count1.1k
Watchers Count25
Fork Count329
Commits Count659
Has Issues Enabled
Issues Count286
Issue Open Count11
Pull Requests Count193
Pull Requests Open Count11
Pull Requests Close Count135
项目设置
Has Wiki Enabled
Is Archived
Is Fork
Is Locked
Is Mirror
Is Private