/// <summary> Sets the date resolution used by RangeQueries for a specific field. /// /// </summary> /// <param name="fieldName">field for which the date resolution is to be set /// </param> /// <param name="dateResolution">date resolution to set /// </param> public virtual void SetDateResolution(String fieldName, DateTools.Resolution dateResolution) { if (fieldName == null) { throw new ArgumentException("Field cannot be null."); } if (fieldToDateResolution == null) { // lazily initialize HashMap fieldToDateResolution = new HashMap<String, DateTools.Resolution>(); } fieldToDateResolution.Add(fieldName, dateResolution); }
/// <summary> Sets the default date resolution used by RangeQueries for fields for which no /// specific date resolutions has been set. Field specific resolutions can be set /// with {@link #SetDateResolution(String, DateTools.Resolution)}. /// /// </summary> /// <param name="dateResolution">the default date resolution to set /// </param> public virtual void SetDateResolution(DateTools.Resolution dateResolution) { this.dateResolution = dateResolution; }