We have implemented a custom_score_query that needs a more robust
scoring algorithm that calculates score differently based on
doc["_type"]. For these calculations, we need the current date/time.
We would like to implement a preloaded script in python but have been
unable to find any samples. Could you point us to some examples?
Additionally, we want to better understand the capabilities of the
lang-python plugin? Can we import python modules? Can we get the
current date/time within the script?
We have implemented a custom_score_query that needs a more robust
scoring algorithm that calculates score differently based on
doc["_type"]. For these calculations, we need the current date/time.
We would like to implement a preloaded script in python but have been
unable to find any samples. Could you point us to some examples?
You can pass the timestamp as a parameter to the script, or get the current
timestamp using python (I am not familiar enough with python to tell you
how to do it).
Additionally, we want to better understand the capabilities of the
lang-python plugin? Can we import python modules? Can we get the
current date/time within the script?
The support for python uses jython, so whatever you can do there...
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.