Is there a function, or a way to include a boolean in my script like this
(doc['field1'].value == doc['field2'].value) and that in the parentheses
returns a numeric value 0 or 1 ?
I want to add this to functions and multiply by score in my function here.
This seems easier than making a filter based on that conditional.
"functions": [
{
"script_score": {
"script": "log(_score * (doc['field1'].value ==
doc['field2'].value)"
}
}
]
--
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/22c88d38-b1cd-4228-96bb-58838463c2bb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.