Skip to content

Instantly share code, notes, and snippets.

@KunihikoKido
Created January 5, 2016 08:42
Show Gist options
  • Save KunihikoKido/dc958c9ecc391f5f1e57 to your computer and use it in GitHub Desktop.
Save KunihikoKido/dc958c9ecc391f5f1e57 to your computer and use it in GitHub Desktop.
{
"size": 0,
"query": {
"bool": {
"filter": [{
"range": {
"created_at": {
"gte": "now-3M",
"lte": "now"
}
}
}],
"must_not": [{
"terms": {
"text.particle_final": ["かしら", "かしらん", "こと", "して", "て", "ちょうだい", "ね", "のよ", "もの", "よ", "わ", "わね", "わよ", "わよね"]
}
}],
"should": [{
"terms": {
"text.noun_pronoun_misc": ["俺", "おれ", "オレ", "僕", "ぼく", "わし", "おいら", "自分", "お前", "君", "てめぇ", "あいつ", "奴", "連中", "やつ", "奴ら", "奴等"]
}
}, {
"terms": {
"text.particle_final": ["ぜ", "ぞ", "な", "だろ"]
}
}],
"minimum_should_match": 1
}
},
"aggs": {
"noun_pronoun_misc": {
"significant_terms": {
"field": "text.noun_pronoun_misc",
"exclude": "これ|それ|あれ|どれ|ここ|そこ|あそこ|どこ|こっち|そっち|あっち|どっち|こちら|そちら|あちら|どちら|こいつ|あいつ|どいつ|こなた|そなた|あなた|どなた|この|その|あの|どの|こう|そう|ああ|どう|こんな|そんな|あんな|どんな|何|なん|なに|いつ|何時|いくつ|そっ|何処|みんな|皆|みなさん|誰|だれ"
}
},
"particle_final": {
"significant_terms": {
"field": "text.particle_final"
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment