Skip to content

Instantly share code, notes, and snippets.

@lukas-vlcek
Created June 7, 2011 11:18
Show Gist options
  • Star 10 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save lukas-vlcek/1012051 to your computer and use it in GitHub Desktop.
Save lukas-vlcek/1012051 to your computer and use it in GitHub Desktop.
Full search query #BBUZZ 2011
{
"from" : 0,
"query" : {
"filtered" : { "query" : { "query_string" : { "query" : "jboss server" } },
"filter": {
"and" : [
{"range" : { "date" : {"from":"2007-07-25","to":"2010-12-16"}}},
{"terms" : { "_index" : ["weld"]}},
{"terms" : {"mail_list" : ["dev"]}},
{"terms" : {"from.not_analyzed" : [ "Galder Zamarreno <galder.zamarreno@redhat.com>","Pete Muir <pmuir@redhat.com>"]}}
]}
}
},
"fields": [
"date", "document_url", "from", "mail_list", "message_id", "message_snippet", "subject", "subject_original", "to", "in_reply_to", "references"
],
"highlight" : {
"pre_tags" : ["<span class='hlt'>"],
"post_tags" : ["</span>"],
"fields" : {
"first_text_message" : {"number_of_fragments":3},
"first_html_message":{"number_of_fragments":3},
"message_attachments":{"number_of_fragments":3},
"subject":{"number_of_fragments":0}
}
},
"facets" : {
"histogram":{"date_histogram":{"field":"date","interval":"month"}},
"projects":{
"terms":{"field":"_index","size":300},
"facet_filter":{
"and":[
{"query":{"query_string":{"query":"jboss server"}}},
{"range":{"date":{"from":"2007-07-25","to":"2010-12-16"}}},
{"terms":{"mail_list":["dev"]}},
{"terms":{"from.not_analyzed":[ "Galder Zamarreno <galder.zamarreno@redhat.com>", "Pete Muir <pmuir@redhat.com>" ]}}
]
},
"global":true},
"listType":{
"terms":{"field":"mail_list","size":10},
"facet_filter":{
"and":[
{"query":{"query_string":{"query":"jboss server"}}},
{"range":{"date":{"from":"2007-07-25","to":"2010-12-16"}}},
{"terms":{"_index":["weld"]}},
{"terms":{"from.not_analyzed":[ "Galder Zamarreno <galder.zamarreno@redhat.com>", "Pete Muir <pmuir@redhat.com>" ]}}
]
},
"global":true},
"author":{
"terms":{"field":"from.not_analyzed","size":15},
"facet_filter":{
"and":[
{"query":{"query_string":{"query":"jboss server"}}},
{"range":{"date":{"from":"2007-07-25","to":"2010-12-16"}}},
{"terms":{"_index":["weld"]}},
{"terms":{"mail_list":["dev"]}}
]
},
"global":true},
"author_filter":{
"terms":{"field":"from.not_analyzed","size":10},
"facet_filter":{
"and":[
{"query":{"query_string":{"query":"jboss server"}}},
{"terms":{"from.not_analyzed":[ "Galder Zamarreno <galder.zamarreno@redhat.com>", "Pete Muir <pmuir@redhat.com>" ]}},
{"range":{"date":{"from":"2007-07-25","to":"2010-12-16"}}},
{"terms":{"_index":["weld"]}},
{"terms":{"mail_list":["dev"]}}
]},
"global":true
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment