Skip to content

Instantly share code, notes, and snippets.

@shardnit
Created June 4, 2012 08:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shardnit/2867307 to your computer and use it in GitHub Desktop.
Save shardnit/2867307 to your computer and use it in GitHub Desktop.
ES must query
{"from":0,
"size":21,
"query":{
"filtered":{
"query":{
"bool":{
"must":[
{"bool":{
"should":[
{"text":{"text":"the"}},
{"text":{"user_name":"the"}}
]
}
},
{"bool":{
"should":[
{"text":{"text":"queen"}},
{"text":{"user_name":"queen"}}
]
}
}
]
}
},
"filter":{
"numeric_range":{
"created_at":{"lte":"2012-06-04T08:33:36+0000","gt":"1970-01-01T00:00:00z"}
}
}
}
},
"highlight":{"fields":{}},
"sort":{"created_at":{"order":"desc"}}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment