Created
September 1, 2018 00:09
-
-
Save umeshdangat/da1948e693754dc3575750218195d0b6 to your computer and use it in GitHub Desktop.
scriptfeature_diff_param_names_ltr_vs_es_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
"model": { | |
"name": "my_simple_linear_model_1", | |
"feature_set": { | |
"name": "simple_painless_features", | |
"features": [ | |
{ | |
"name": "feature1", | |
"params": [ | |
"feature1_param" | |
], | |
"template_language": "mustache", | |
"template": { | |
"function_score": { | |
"script_score": { | |
"script": { | |
"lang": "painless", | |
"params": { | |
"feature1_param": "{{feature1_param}}" | |
}, | |
"source": "{{feature1_param}}" | |
} | |
} | |
} | |
} | |
}, | |
{ | |
"name": "feature2", | |
"params": [ | |
"multiplier_ltr" | |
], | |
"template_language": "script_feature", | |
"template": { | |
"lang": "painless", | |
"source": "params.feature_vector.get('feature1') * (long)params.multiplier", | |
"params": { | |
"multiplier": "multiplier_ltr" | |
} | |
} | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment