elastic.js

A JavaScript implementation of the elasticsearch Query DSL

  • 所有者: fullscale/elastic.js
  • 平台:
  • 許可證: MIT License
  • 分類:
  • 主題:
  • 喜歡:
    0
      比較:

Github星跟蹤圖

elastic.js

A JavaScript implementation of the ElasticSearch DSL for use with the official elasticsearch javascript client.

Documentation

You can find the official documentation at the following locations:

You will also be able to find unofficial documentation and examples on on our
blog and GitHub Gist pages here
and here.

Examples

See http://www.elasticsearch.org/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-search.

client.search({
  index: 'myindex',
  body: ejs.Request()
          .query(ejs.MatchQuery('title', 'test'))
          .facet(ejs.TermsFacet('tags').field('tags'))
}, function (error, response) {
  // handle response
});

Suggest

See http://www.elasticsearch.org/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-suggest

client.suggest({
  index: 'myindex',
  body: ejs.TermSuggester('mysuggester')
          .text('tset')
          .field('title')
}, function (error, response) {
  // handle suggestion response
});

See http://www.elasticsearch.org/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-msearch

client.msearch({
  body: [
    {}
    ejs.Request().query(ejs.MatchAllQuery()),
    { index: 'myindex', type: 'mytype' },
    ejs.Request().query(ejs.QueryStringQuery('"Test 1"'))
  ]
});

Contributing

In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using grunt.

Also, please don't edit elastic.js and elastic.min.js files as they are generated via grunt. You'll find source code in the "src" subdirectory!

License

Copyright (c) 2012-2014 FullScale Labs, LLC
Licensed under the MIT license.

主要指標

概覽
名稱與所有者fullscale/elastic.js
主編程語言JavaScript
編程語言JavaScript (語言數: 3)
平台
許可證MIT License
所有者活动
創建於2012-11-15 16:33:54
推送於2018-05-08 16:20:24
最后一次提交2014-10-13 13:55:01
發布數2
最新版本名稱1.2.0 (發布於 )
第一版名稱1.1.1 (發布於 2013-05-24 15:02:38)
用户参与
星數652
關注者數34
派生數163
提交數355
已啟用問題?
問題數74
打開的問題數19
拉請求數7
打開的拉請求數13
關閉的拉請求數16
项目设置
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?