mirror of
https://github.com/spring-projects/spring-data-elasticsearch.git
synced 2025-06-26 13:52:12 +00:00
fix scripted-and-runtime-fields.adoc
Original Pull Request #2902 Closes #2903
This commit is contained in:
parent
106b513d11
commit
1d89054d12
@ -194,7 +194,7 @@ In the following code this is used to run a query for a given gender and maximum
|
||||
|
||||
var runtimeField = new RuntimeField("age", "long", """ <.>
|
||||
Instant currentDate = Instant.ofEpochMilli(new Date().getTime());
|
||||
Instant startDate = doc['birth-date'].value.toInstant();
|
||||
Instant startDate = doc['birthDate'].value.toInstant();
|
||||
emit (ChronoUnit.DAYS.between(startDate, currentDate) / 365);
|
||||
""");
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user