Skip to content

Instantly share code, notes, and snippets.

@TheBHump
Created November 22, 2011 19:04
Show Gist options
  • Save TheBHump/1386569 to your computer and use it in GitHub Desktop.
Save TheBHump/1386569 to your computer and use it in GitHub Desktop.
Elasticsearch query structure for individualized type queries
{
'bool':{
'should':[
{
'filtered':{
'query':object_query,
'filter':{
'term':{
'_type':'object'
}
}
}
},
{
'filtered':{
'query':user_query,
'filter':{
'term':{
'_type':'user'
}
}
}
},
]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment