-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Open
Labels
status: waiting-for-triageAn issue we've not yet triagedAn issue we've not yet triaged
Description
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?
Metadata
Metadata
Assignees
Labels
status: waiting-for-triageAn issue we've not yet triagedAn issue we've not yet triaged