ElasticSearch: unable to resolve class org.joda.time.Period <p>I'm using this script in order to get the time difference between two fields:</p> <pre><code>new org.joda.time.Period(doc[firstDateField].date, doc[secondDateField].date).getHours(); </code></pre> <p>The problem is ES is telling me that:</p> <pre><code>bbd8b73ce0b0dd070d07e63f11dcdad4fa12121d: 1: unable to resolve class org.joda.time.Period Nov 04 10:27:21 core-01 docker[3876]: @ line 1, column 1. Nov 04 10:27:21 core-01 docker[3876]: new Period(doc[firstDateField].date, doc[secondDateField].date).getHours(); Nov 04 10:27:21 core-01 docker[3876]: ^ </code></pre>