Skip to content

Instantly share code, notes, and snippets.

@rohit-raj
Created October 25, 2016 15:24
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 rohit-raj/5781049cdc342c3fcd3e98f4b00fd06b to your computer and use it in GitHub Desktop.
Save rohit-raj/5781049cdc342c3fcd3e98f4b00fd06b to your computer and use it in GitHub Desktop.
{
"query": {
"bool": {
"must": [
{
"filtered": {
"filter": {
"term": {
"status": 1
}
}
}
},
{
"bool": {
"should": [
{
"simple_query_string": {
"query": "i",
"fields": [
"type"
]
}
},
{
"multi_match": {
"query": "i",
"type": "phrase_prefix",
"fields": [
"type^2",
"title^10"
]
}
}
]
}
}
]
}
},
"aggs": {
"location.city.raw28": {
"filter": {},
"aggs": {
"location.city.raw": {
"terms": {
"field": "location.city.raw",
"size": 3
}
},
"location.city.raw_count": {
"cardinality": {
"field": "location.city.raw"
}
}
}
},
"fees": {
"filter": {},
"aggs": {
"fees": {
"stats": {
"field": "academics.fees.value"
}
}
}
},
"recruiter": {
"filter": {},
"aggs": {
"recruiter": {
"stats": {
"field": "recruiter.title"
}
}
}
},
"academics.course.raw30": {
"filter": {},
"aggs": {
"academics.course.raw": {
"terms": {
"field": "academics.course.raw",
"size": 3
}
},
"academics.course.raw_count": {
"cardinality": {
"field": "academics.course.raw"
}
}
}
},
"institute_type.raw31": {
"filter": {},
"aggs": {
"institute_type.raw": {
"terms": {
"field": "institute_type.raw",
"size": 3
}
},
"institute_type.raw_count": {
"cardinality": {
"field": "institute_type.raw"
}
}
}
},
"academics.entrance_test.raw32": {
"filter": {},
"aggs": {
"academics.entrance_test.raw": {
"terms": {
"field": "academics.entrance_test.raw",
"size": 3
}
},
"academics.entrance_test.raw_count": {
"cardinality": {
"field": "academics.entrance_test.raw"
}
}
}
}
},
"size": 6,
"_source": [
"title",
"display_picture",
"cover_picture",
"href",
"type",
"location",
"id",
"featured",
"follower_count",
"profiles_added_to_count",
"academics",
"institute_type",
"recruiter"
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment