Skip to content

Instantly share code, notes, and snippets.

@felipelavinz
Created April 14, 2014 19:32
Show Gist options
  • Save felipelavinz/10676589 to your computer and use it in GitHub Desktop.
Save felipelavinz/10676589 to your computer and use it in GitHub Desktop.
Parámetros de búsqueda para ElasticSearch con indicaciones custom de ordenamiento de resultados
{
"query": {
"custom_filters_score": {
"query": {
"bool": {
"must": {
"query_string": {
"query": "ciencias políticas",
"fields": [
"entry_title^10",
"entry_content^2",
"_all"
]
}
},
"should": {
"query_string": {
"query": "status:publish"
}
}
}
},
"filters": [
{
"filter" : {
"type" : {
"value" : "career"
}
},
"boost": 50
},
{
"filter": {
"type": {
"value" : "postgrad"
}
},
"boost": 40
},
{
"filter": {
"type": {
"value": "diploma"
}
},
"boost": 10
}
]
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment