putScript API to create a search template (which is nothing else than a script). API Reference | Elasticsearch Node.js client [7.x] | Elastic
Then the searchTemplate should be the way to go.
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.