As seen on the official documentation of FullScale, I've got :
// 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);
});
And everything seems to work, except when I look closely to the results that have absolutely nothing to do with 'exemple', like :
{
"field": "something that have absolutely nothing to do with anything"
},
{
"field": "lolwut i don't even know how to elasticsearch"
},
{
"field": "kthxbye"
}
Is the elastic.js (fullscale) broken on npm (because I know it's working on AngularJS) ? or have I forgot to guess something that wasn't in the FullScale documentation ?
Thanks.