Skip to content

Instantly share code, notes, and snippets.

@johtani
Created November 25, 2015 03:12
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 johtani/0554f54ae7d9aea375cb to your computer and use it in GitHub Desktop.
Save johtani/0554f54ae7d9aea375cb to your computer and use it in GitHub Desktop.
Example url search
PUT hoge_index
{
"settings": {
"number_of_shards": 1,
"number_of_replicas": 0
},
"mappings": {
"hoge": {
"properties": {
"text": {
"type": "string",
"index": "not_analyzed"
}
}
}
}
}
PUT hoge_index/hoge/1
{
"text": "yomiuri.co.jp"
}
GET hoge_index/hoge/_search
{
"query": {
"bool": {
"must": [
{"term": {
"text": {
"value": "yomiuri.co.jp"
}
}}
],
"must_not": [],
"should": []
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment