FullScaleの公式ドキュメントに見られるように、私は持っています:
// The official one
var elasticsearch = require('elasticsearch');
var client = new elasticsearch.Client({
host: conf.elastic.server
});
// FullScale one (for some reasons, needing the official one, whereas in AngularJS, same version, used alone. But hey ! I'm not judging.
var ejs = require('elastic.js');
client.search({
index: conf.elastic.indice,
type: conf.elastic.index,
body: ejs.Request().query(ejs.BoolQuery().must(ejs.MatchQuery('field': 'exemple'))
}).then(function(resp) {
_this.sendResponse(null, resp.hits.hits, res);
}, function(args) {
console.trace("Erreur #" + args.status + " : " + args.error);
});
そして、次のように、「例」とはまったく関係のない結果をよく見る場合を除いて、すべてが機能しているようです。
{
"field": "something that have absolutely nothing to do with anything"
},
{
"field": "lolwut i don't even know how to elasticsearch"
},
{
"field": "kthxbye"
}
Elastic.js (フルスケール) は npm で壊れていますか (AngularJS で動作していることを知っているため) ? または、FullScale のドキュメントにないものを推測するのを忘れましたか?
ありがとう。