The CurrentTime field expression returns the current time as a date. This date indicates the time that query execution began processing and will be stable for for all documents returned for a single query.
NOW() AS ALIAS
- ALIAS - Field name for the resulting value.
NOW() as now
QueryRequest request = new QueryRequest("*:*)"); request.addField(new CurrentTime().as("now")); // ... (Perform Search)