Browse Source

Aggregations: Removed unused factor parameter in DateHistogramBuilder

DateHistogramParser does not recognise this parameter and therefore setting it would throw an exception as noted in https://github.com/elastic/elasticsearch/issues/6490. It is also not documented.
Colin Goodheart-Smithe 10 years ago
parent
commit
a9a4903a0a

+ 0 - 14
core/src/main/java/org/elasticsearch/search/aggregations/bucket/histogram/DateHistogramBuilder.java

@@ -40,7 +40,6 @@ public class DateHistogramBuilder extends ValuesSourceAggregationBuilder<DateHis
     private String timeZone;
     private String format;
     private String offset;
-    private float factor = 1.0f;
 
     /**
      * Sole constructor.
@@ -99,15 +98,6 @@ public class DateHistogramBuilder extends ValuesSourceAggregationBuilder<DateHis
        return this;
     }
 
-    /**
-     * Set a factor to apply to values of the field, typically used if times
-     * are stored in seconds instead of milliseconds.
-     */
-    public DateHistogramBuilder factor(float factor) {
-        this.factor = factor;
-        return this;
-    }
-
     /**
      * Set the format to use for dates.
      */
@@ -176,10 +166,6 @@ public class DateHistogramBuilder extends ValuesSourceAggregationBuilder<DateHis
             builder.field("offset", offset);
         }
 
-        if (factor != 1.0f) {
-            builder.field("factor", factor);
-        }
-
         if (format != null) {
             builder.field("format", format);
         }