2017-11-06 6 views
0

私はkibanaelasticsearchに取り組んでいます。私はelasticsearchに文書を索引付けしました。今、私はUIを作成し、ここのような、それが検索できるようにしたい:弾性検索クエリを呼び出しパラメータに変換する

GET /complete_index/_search 
 
{ 
 
    
 
    
 
    "query": 
 
    { 
 
    "multi_match": { 
 
     "query": "broker connection", 
 
     "operator":"and", 
 
     
 
     "fields": ["post_subject","topic_title"] 
 
     
 
    } 
 
    
 
    
 
}, 
 
"from": 0, 
 
"size": 50, 
 
"_source": ["post_id","topic_id","post_subject","topic_title"] 
 
}

私は残りの呼び出しにデータとしてelasticsearchクエリを渡すことはできません。どうすれば修正できますか?

+0

:https://stackoverflow.com/questions/34715720/how-to-convert-curl-into-uri-in-elasticsearch/34715809#34715809 – Val

答えて

0

次のように、curlリクエストを使用してElasticsearchを呼び出します。この答えは助けるべき

curl -XGET "https://f03cadb8fd043aa17dcce6850f4646e7.ap-southeast-1.aws.found.io:9243/complete_index/_search" -H 'Content-Type: application/json' -d' 
{"query":{"multi_match":{"query":"broker connection","operator":"and","fields":["post_subject","topic_title"]}},"from":0,"size":50,"_source":["post_id","topic_id","post_subject","topic_title"]}' 
関連する問題