Created
April 14, 2014 19:32
-
-
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"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