Created
April 3, 2015 06:41
-
-
Save alexmorozov/b4aa8aabc8df69731aab to your computer and use it in GitHub Desktop.
example ES score script
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
"script_score":{ | |
"params":{ | |
"normalizer":15 | |
}, | |
"script":"_score+((doc.containsKey(\"hotel.eating_place.rating\") && !doc[\"hotel.eating_place.rating\"].empty ? doc[\"hotel.eating_place.rating\"].value : 0.0)+(doc.containsKey(\"hotel.basin.rating\") && !doc[\"hotel.basin.rating\"].empty ? doc[\"hotel.basin.rating\"].value : 0.0)+(doc.containsKey(\"hotel.room.rating\") && !doc[\"hotel.room.rating\"].empty ? doc[\"hotel.room.rating\"].value : 0.0))/normalizer" | |
}, | |
"boost_mode":"replace" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment