You can use a function score query with a native script in this manner.
{
"function_score" : {
"query" : {
"match_all" : { }
},
"functions" : [ {
"filter" : {
"terms" : {
"myfield" : [ "103", "104", "134", "180" ],
"_cache" : true
}
},
"script_score" : {
"script" : "myscriptname",
"lang" : "native",
"params" : {
"myparam1" : "something",
"myparam2" : "somethingElse"
}
}
} ],
"score_mode" : "sum"
}
}
--
You received this message because you are subscribed to the Google Groups
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/cb47555a-dd96-4dde-bf20-e80f42f975cd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.