mongoosastic

Index Mongoose models into elasticsearch automatically. Looking for maintainers!

Github星跟踪图

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

主要指标

概览
名称与所有者mongoosastic/mongoosastic
主编程语言TypeScript
编程语言JavaScript (语言数: 5)
平台
许可证MIT License
所有者活动
创建于2014-10-24 16:44:30
推送于2023-03-07 16:23:05
最后一次提交2022-09-19 20:24:37
发布数56
最新版本名称v5.0.0 (发布于 )
第一版名称0.0.1 (发布于 2012-06-20 02:28:11)
用户参与
星数1.1k
关注者数25
派生数329
提交数659
已启用问题?
问题数286
打开的问题数11
拉请求数193
打开的拉请求数11
关闭的拉请求数135
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?