Skip to content

Instantly share code, notes, and snippets.

View dkullmann's full-sized avatar

David Kullmann dkullmann

View GitHub Profile
{"user": {"properties": {
"User": {
"dynamic": "true",
"properties": {
"id": {"type": "string"},
"email": {"type": "string"},
"role": {"type": "string"},
"slug": {"type": "string"}
}
},
{"filtered": {
"query": {"text": {"_all": "poker"}},
"filter": {"and": [
{"term": {"user.role": "expert"}},
{"term": {"expertprofile.approved": 1}},
{"term": {"expertprofile.is_public": 1}}
]}
}}
{"User": {
"email": "bc561@hotmail.com",
"slug": "philip-newall",
"role": "expert",
"id": "4d792f20-4c60-447b-8e37-065dadcb5c22"
}}
{"filtered": {
"query": {"text": {"_all": "poker"}},
"filter": [
{"term": {"user.role": "expert"}},
{"term": {"expertprofile.approved": 1}},
{"term": {"expertprofile.is_public": 1}}
]
}}
{"query": {"filtered": {
"query": {"text": {"_all": "poker"}},
"filter": {"or": [
{"term": {"user.role": "expert"}},
{"term": {"expertprofile.approved": 1}},
{"term": {"expertprofile.is_public": 1}}
]}
}}}
{"query":{"filtered":{"query":{"text":{"_all":"poker"}},"filter":[{"term":{"user.role":"expert"}},{"term":{"expertprofile.approved":1}},{"term":{"expertprofile.is_public":1}}]}}}