Skip to content

Instantly share code, notes, and snippets.

@ken57
Created August 11, 2017 07:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ken57/07440e33a9a527aa729cad80e575fda2 to your computer and use it in GitHub Desktop.
Save ken57/07440e33a9a527aa729cad80e575fda2 to your computer and use it in GitHub Desktop.
クエリfuga
curl -XGET "http://localhost:9200/blog/_search?pretty" -d '{
"query" : {
"term" : {
"title":"fuga"
}
}
}'
{
"took": 2,
"timed_out": false,
"_shards": {
"total": 1,
"successful": 1,
"failed": 0
},
"hits": {
"total": 2,
"max_score": 1.5584441,
"hits": [{
"_index": "blog",
"_type": "item",
"_id": "a",
"_score": 1.5584441,
"_source": {
"title": "hoge fuga hoge fuga",
"favoriteCount": 1,
"viewCount": 10
}
}, {
"_index": "blog",
"_type": "item",
"_id": "c",
"_score": 1.1019864,
"_source": {
"title": "hoge fuga piyo hoge",
"favoriteCount": 0,
"viewCount": 200
}
}]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment