Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for script filtering with painless #1600

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

AlecR
Copy link

@AlecR AlecR commented Dec 6, 2022

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.

Copy link

@sjl2 sjl2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this risky in terms of security or performance?

@AlecR
Copy link
Author

AlecR commented Dec 7, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants