@Quentin_L_eilde
Since you haven't mentioned format for the date_start and date_end, I am assuming default format which is "strict_date_optional_time||epoch_millis"
However your "now" is in seconds. It should be in milliseconds.
if param "now" is refers to current timestamp then you can pass word now instead of value.
You can use simple range queries instead of script.
Optionally you can rewrite query as ((date_start <= now) AND (date_end >= now OR permanent == true))
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.