Skip to content

Instantly share code, notes, and snippets.

@fvbock
Created May 27, 2014 13:46
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save fvbock/a1fe98dbd526db8602c6 to your computer and use it in GitHub Desktop.
GET /entries/_search
{
"query": {
"function_score": {
"query": {
"filtered": {
"query": {
"bool": {
"must": [
{
"multi_match": {
"fields": [
"headline",
"content",
"comments.content"
],
"query": "明日が楽しみ",
"use_dis_max": true
}
}
],
"minimum_should_match": 0,
"should": [
]
}
},
"filter": {
}
}
}
},
"analyzer": "ja_analyzer"
},
"sort": {
"_score": {
"order": "desc"
}
},
"highlight" : {
"fields" : {
"headline" : { "pre_tags" : [ "<b>" ], "post_tags" : [ "</b>" ] },
"content" : { "pre_tags" : [ "<b>" ], "post_tags" : [ "</b>" ] },
"comments.content" : { "pre_tags" : [ "<b>" ], "post_tags" : [ "</b>" ] }
}
},
"size": "20",
"from": 0
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment