const addData = {
'from' : 0, // 分页
'size' : 10,
'query': {
'bool': {
'must': {
'match': {
'key': { //已知字段名
'query' : keyword ,
'operator': 'or',
'minimum_should_match': '75%', //设置匹配度
}
}
},
}
},
};
this.httpService.post('/' + this.selectedValue + '/_search?pretty', addData)
.subscribe(res => {
//操作
}
response => {
console.log('http error');
console.log(response);
}
);
}
},
elasticsearch的http请求
最新推荐文章于 2024-09-12 06:38:45 发布