Last active
May 15, 2018 04:43
-
-
Save umeshdangat/2524b9418065b2dbeeaf41cebd72d0ff to your computer and use it in GitHub Desktop.
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
{ | |
"name": "feature_one_lunch", | |
"params": [ | |
"feature_one_lunch_query", | |
"feature_one_lunch_language", | |
"feature_one_lunch_clicks", | |
"feature_one_lunch_impressions" | |
], | |
"template_language": "mustache", | |
"template": { | |
"function_score": { | |
"script_score": { | |
"script": { | |
"lang": "native", | |
"source": "feature_extractor", | |
"params": { | |
"raw_feature": "feature_one_lunch", | |
"query": "{{feature_one_lunch_query}}", | |
"language": "{{feature_one_lunch_language}}", | |
"smoothing_clicks": "{{feature_one_lunch_clicks}}", | |
"smoothing_impressions": "{{feature_one_lunch_impressions}}" | |
} | |
} | |
} | |
} |
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
{ | |
"name": "feature_two_brunch", | |
"params": [ | |
"feature_two_brunch_query", | |
"feature_two_brunch_language", | |
"feature_two_brunch_clicks", | |
"feature_two_brunch_impressions" | |
], | |
"template_language": "mustache", | |
"template": { | |
"function_score": { | |
"script_score": { | |
"script": { | |
"lang": "native", | |
"source": "feature_extractor", | |
"params": { | |
"raw_feature": "feature_two_brunch", | |
"query": "{{feature_two_brunch_query}}", | |
"language": "{{feature_two_brunch_language}}", | |
"smoothing_clicks": "{{feature_two_brunch_clicks}}", | |
"smoothing_impressions": "{{feature_two_brunch_impressions}}" | |
} | |
} | |
} | |
} |
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
{ | |
"query": { | |
"bool": { | |
"filter": { | |
"terms": { | |
"_id": ["123", "456"] | |
}}} | |
}, | |
"rescore": { | |
"query": { | |
"rescore_query": { | |
"sltr": { | |
"model": "my_example_model", | |
"params": { | |
}, | |
"active_features": {"feature_two_brunch": true} | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment