@Deprecated public List<JodaCompatibleZonedDateTime> getDates() throws IOException { deprecated("scripting_get_date_deprecation", "getDates on numeric fields is deprecated. Use a date field to get dates."); if (dates == null) { dates = new Dates(in, deprecationCallback); dates.setNextDocId(docId); } return dates; }
@Deprecated public JodaCompatibleZonedDateTime getDate() throws IOException { deprecated("scripting_get_date_deprecation","getDate on numeric fields is deprecated. Use a date field to get dates."); if (dates == null) { dates = new Dates(in, deprecationCallback); dates.setNextDocId(docId); } return dates.getValue(); }
@Deprecated public List<ReadableDateTime> getDates() throws IOException { deprecated("getDates on numeric fields is deprecated. Use a date field to get dates."); if (dates == null) { dates = new Dates(in); dates.setNextDocId(docId); } return dates; }
@Override public final ScriptDocValues<?> getLegacyFieldValues() { switch (numericType) { case DATE: final ScriptDocValues.Dates realDV = new ScriptDocValues.Dates(getLongValues()); return new ScriptDocValues<DateTime>() { @Override public int size() { return realDV.size(); } @Override public DateTime get(int index) { JodaCompatibleZonedDateTime dt = realDV.get(index); return new DateTime(dt.toInstant().toEpochMilli(), DateTimeZone.UTC); } @Override public void setNextDocId(int docId) throws IOException { realDV.setNextDocId(docId); } }; default: return getScriptValues(); } }
@Override public final ScriptDocValues<?> getScriptValues() { switch (numericType) { case DATE: return new ScriptDocValues.Dates(getLongValues()); case BOOLEAN: return new ScriptDocValues.Booleans(getLongValues()); default: return new ScriptDocValues.Longs(getLongValues()); } }
@Deprecated public List<JodaCompatibleZonedDateTime> getDates() throws IOException { deprecated("scripting_get_date_deprecation", "getDates on numeric fields is deprecated. Use a date field to get dates."); if (dates == null) { dates = new Dates(in, deprecationCallback); dates.setNextDocId(docId); } return dates; }
@Deprecated public JodaCompatibleZonedDateTime getDate() throws IOException { deprecated("scripting_get_date_deprecation","getDate on numeric fields is deprecated. Use a date field to get dates."); if (dates == null) { dates = new Dates(in, deprecationCallback); dates.setNextDocId(docId); } return dates.getValue(); }
public List<ReadableDateTime> getDates() { if (dates == null) { dates = new Dates(values); dates.refreshArray(); } return dates; }
@Deprecated public ReadableDateTime getDate() throws IOException { deprecated("getDate on numeric fields is deprecated. Use a date field to get dates."); if (dates == null) { dates = new Dates(in); dates.setNextDocId(docId); } return dates.getValue(); }
public ReadableDateTime getDate() { if (dates == null) { dates = new Dates(values); dates.refreshArray(); } return dates.getValue(); }
@Override public final ScriptDocValues<?> getScriptValues() { switch (numericType) { case DATE: return new ScriptDocValues.Dates(getLongValues()); case BOOLEAN: return new ScriptDocValues.Booleans(getLongValues()); default: return new ScriptDocValues.Longs(getLongValues()); } }
@Override public final ScriptDocValues<?> getLegacyFieldValues() { switch (numericType) { case DATE: final ScriptDocValues.Dates realDV = new ScriptDocValues.Dates(getLongValues()); return new ScriptDocValues<DateTime>() { @Override public int size() { return realDV.size(); } @Override public DateTime get(int index) { JodaCompatibleZonedDateTime dt = realDV.get(index); return new DateTime(dt.toInstant().toEpochMilli(), DateTimeZone.UTC); } @Override public void setNextDocId(int docId) throws IOException { realDV.setNextDocId(docId); } }; default: return getScriptValues(); } }
@Override public final ScriptDocValues<?> getScriptValues() { switch (numericType) { case DATE: return new ScriptDocValues.Dates(getLongValues()); case BOOLEAN: return new ScriptDocValues.Booleans(getLongValues()); default: return new ScriptDocValues.Longs(getLongValues()); } }