Skip to content

Instantly share code, notes, and snippets.

@fvbock

fvbock/es_query.json

Created May 27, 2014
Embed
What would you like to do?
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
You can’t perform that action at this time.