searchkick icon indicating copy to clipboard operation
searchkick copied to clipboard

Add support for script filtering with painless

Open AlecR opened this issue 2 years ago • 1 comments

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.

AlecR avatar Dec 06 '22 14:12 AlecR

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.

AlecR avatar Dec 07 '22 14:12 AlecR

Hi @AlecR, thanks for the PR. Added support for this in the commit above.

ankane avatar Jun 17 '24 03:06 ankane