有没有办法使用 GET 而不是 POST 方法来搜索弹性,因为我可以在 curl 中做到这一点
curl -XGET 'localhost:9200/tvseries/internindex/_search?size=5&from=5&pretty' -H 'Content-Type: application/json' -d'
{
"query": {
"bool": {
"should": [
{ "match": { "showname": "Family guy" }},
{ "match": { "content": "gigitty" }}
]
}
}
}
'
它有效,我如何使用 elasticsearch.js 的搜索 api 做同样的事情!