searchkick
searchkick copied to clipboard
Add support for script filtering with painless
This PR enables support for the _script
filter in Searchkick queries. I would like to add this functionality to support more complex querying cases where the base query language is insufficient.
In terms of security, Elastic has built in security layers to ensure scripts are executed safely. These Elastic docs give a good overview of the layers of security they've implemented.
Performance of scripts is going to be mostly case-dependent, as the size of the data queried and amount of computation required can vary widely. Adding support for this feature will not inherently impact the performance of searchkick queries, but writing an inefficient script certainly would.
Hi @AlecR, thanks for the PR. Added support for this in the commit above.