I'm trying to figure out how to have optional params with default value.
My script is simple:
{
"script": "doc[field].empty ? 0 : (201 - doc[field]) * boost"
}
I want the boost to default to 1 if its omitted in the call.
I'm trying to figure out how to have optional params with default value.
My script is simple:
{
"script": "doc[field].empty ? 0 : (201 - doc[field]) * boost"
}
I want the boost to default to 1 if its omitted in the call.
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
© 2020. All Rights Reserved - Elasticsearch
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant logo are trademarks of the Apache Software Foundation in the United States and/or other countries.