File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
server/src/main/java/org/elasticsearch/index/fielddata/fieldcomparator Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -152,11 +152,11 @@ protected long docValue() {
152152
153153 @ Override
154154 public Object missingObject (Object missingValue , boolean reversed ) {
155- if (targetNumericType == NumericType .DATE_NANOSECONDS ) {
155+ if (targetNumericType == NumericType .DATE_NANOSECONDS || targetNumericType == NumericType . DATE ) {
156156 // special case to prevent negative values that would cause invalid nanosecond ranges
157157 if (sortMissingFirst (missingValue ) || sortMissingLast (missingValue )) {
158158 final boolean min = sortMissingFirst (missingValue ) ^ reversed ;
159- return min ? 0L : DateUtils .MAX_NANOSECOND ;
159+ return min ? 0L : targetNumericType == IndexNumericFieldData . NumericType . DATE_NANOSECONDS ? DateUtils .MAX_NANOSECOND : Long . MAX_VALUE ;
160160 }
161161 }
162162 return super .missingObject (missingValue , reversed );
You can’t perform that action at this time.
0 commit comments