Created
December 16, 2015 07:57
-
-
Save KunihikoKido/ee91fae8e586c1a9fe10 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"query": { | |
"bool": { | |
"must": [{ | |
"simple_query_string": { | |
"query": "\"サッカー\"", // 1) 人が与える任意の分類・キーワード | |
"fields": ["text"] // 2) 検索対象フィールド | |
} | |
}], | |
"filter": [{ | |
"range": { // 3) 集計対象期間の絞り込み条件 | |
"created_at": { | |
"gte": "now-1d", | |
"lte": "now" | |
} | |
} | |
}] | |
} | |
}, | |
"aggs": { | |
"keywords": { | |
"significant_terms": { | |
"field": "text.noun", // 4) 検索結果から特徴を抽出する対象フィールド | |
"size": 300, | |
"exclude": { | |
"pattern": ".{1,2}|[a-zA-Z0-9]+|[ぁ-ん]+|[0-9]+.*" | |
} | |
} | |
} | |
}, | |
"size": 0 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment