Created
April 11, 2011 08:52
-
-
Save emedina/913246 to your computer and use it in GitHub Desktop.
MVEL for script in custom_score_query
This file contains 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
{ | |
"from": 0, | |
"size": 28, | |
"query": { | |
"custom_score": { | |
"query": { | |
"query_string": { | |
"query": "iphone" | |
} | |
}, | |
"script": { | |
"script": "if (doc['categorias2'].stringValue == 'Libros') { _score / 2 } else { _score }" | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment