public long getValue() { if (count == 0) { if (ScriptDocValues.EXCEPTION_FOR_MISSING_VALUE) { throw new IllegalStateException("A document doesn't have a value for a field! " + "Use doc[<field>].size()==0 to check if a document is missing a field!"); } deprecated("scripting_missing_value_deprecation", "returning default values for missing document values is deprecated. " + "Set system property '-Des.scripting.exception_for_missing_value=true' " + "to make behaviour compatible with future major versions!"); return 0L; } return values[0]; }
@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 long getValue() { if (count == 0) { if (ScriptDocValues.EXCEPTION_FOR_MISSING_VALUE) { throw new IllegalStateException("A document doesn't have a value for a field! " + "Use doc[<field>].size()==0 to check if a document is missing a field!"); } deprecated("scripting_missing_value_deprecation", "returning default values for missing document values is deprecated. " + "Set system property '-Des.scripting.exception_for_missing_value=true' " + "to make behaviour compatible with future major versions!"); return 0L; } return values[0]; }
@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(); }
@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; }