当前位置: 动力学知识库 > 问答 > 编程问答 >

elasticsearch - elasticjs match value by id

问题描述:

i use elasticjs for list a names and find them. at moment my simple query is this

this.esc.search({

index: dat.index,

type: dat.type,

from : dat.query.from,

size : dat.query.size,

q: dat.query

}, function (error, response) {

if (error) {

this._reply(key, { error: error, total: 0 });

} else {

this._reply(key, response);

}

}.bind(this));

the table of values is a simple key,value schema

key,value

key,value

key,value

in the q variable i put the string that i want find in the body of my values. the problem is that in certain cases i want to do the same thing but with the key of my values. how do I do this?

分享给朋友:
您可能感兴趣的文章:
随机阅读: