-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Scipted query #2968
Labels
status: waiting-for-triage
An issue we've not yet triaged
Comments
spring-projects-issues
added
the
status: waiting-for-triage
An issue we've not yet triaged
label
Aug 20, 2024
Currently this is not possible. This will need some investigation of how it might be integrated int the critera API |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
Is there any possible way to make something like this using criteria query without runtime or scripted field?
GET index/_search { "query": { "bool": { "must": [ { "nested": { "path": "date", "query": { "bool": { "filter": { "script": { "script": """ ZonedDateTime date = doc['date.date'].value; ZonedDateTime now = params['now']; return date.isBefore(now) """ } } } } } }, { "bool": { "must": [ { "match": { "fieldName": "value" } } ] } } ] } } }
I'm thinking about method something like that
criteria.addScriptedQuery(String script, HashMap<String, Object> params);
Do you think it is possible to make something like this or maybe it is possible already?
edit:
Or run stored script on es in query?
The text was updated successfully, but these errors were encountered: