Skip to content

Commit

Permalink
fix scripted-and-runtime-fields.adoc
Browse files Browse the repository at this point in the history
Original Pull Request spring-projects#2902
Closes spring-projects#2903
  • Loading branch information
1autodidact committed Apr 27, 2024
1 parent 106b513 commit 1d89054
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
""");
Expand Down

0 comments on commit 1d89054

Please sign in to comment.