lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dpg...@apache.org
Subject [17/20] lucene-solr:master: SOLR-11145, SOLR-11146: Added comprehensive unit tests for Analytics Component 2.0 as well as analytics bug fixes.
Date Tue, 17 Oct 2017 17:54:08 GMT
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/86d84bff/solr/contrib/analytics/src/java/org/apache/solr/analytics/value/AnalyticsValue.java
----------------------------------------------------------------------
diff --git a/solr/contrib/analytics/src/java/org/apache/solr/analytics/value/AnalyticsValue.java b/solr/contrib/analytics/src/java/org/apache/solr/analytics/value/AnalyticsValue.java
index 54a3003..5b738de 100644
--- a/solr/contrib/analytics/src/java/org/apache/solr/analytics/value/AnalyticsValue.java
+++ b/solr/contrib/analytics/src/java/org/apache/solr/analytics/value/AnalyticsValue.java
@@ -17,7 +17,6 @@
 package org.apache.solr.analytics.value;
 
 import java.util.function.Consumer;
-
 /**
  * A single-valued analytics value.
  * <p>
@@ -33,6 +32,7 @@ public interface AnalyticsValue extends AnalyticsValueStream {
    * @return whether the current value exists
    */
   boolean exists();
+  
   /**
    * Get the object representation of the current value.
    * 
@@ -51,5 +51,9 @@ public interface AnalyticsValue extends AnalyticsValueStream {
         cons.accept(value);
       }
     }
+    @Override
+    public AnalyticsValueStream convertToConstant() {
+      return this;
+    }
   }
 }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/86d84bff/solr/contrib/analytics/src/java/org/apache/solr/analytics/value/AnalyticsValueStream.java
----------------------------------------------------------------------
diff --git a/solr/contrib/analytics/src/java/org/apache/solr/analytics/value/AnalyticsValueStream.java b/solr/contrib/analytics/src/java/org/apache/solr/analytics/value/AnalyticsValueStream.java
index 0c02115..cba8835 100644
--- a/solr/contrib/analytics/src/java/org/apache/solr/analytics/value/AnalyticsValueStream.java
+++ b/solr/contrib/analytics/src/java/org/apache/solr/analytics/value/AnalyticsValueStream.java
@@ -21,6 +21,7 @@ import java.util.Locale;
 import java.util.function.Consumer;
 
 import org.apache.solr.analytics.ExpressionFactory;
+import org.apache.solr.analytics.value.constant.ConstantValue;
 import org.apache.solr.common.SolrException;
 import org.apache.solr.common.SolrException.ErrorCode;
 
@@ -52,6 +53,22 @@ public interface AnalyticsValueStream {
   void streamObjects(Consumer<Object> cons);
   
   /**
+   * Converts this value to a {@link ConstantValue} if it's expression type is {@link ExpressionType#CONST}.
+   * 
+   * If the value is reduced then no conversion will occur and the value itself will be returned.
+   * 
+   * @return a constant representation of this value
+   */
+  AnalyticsValueStream convertToConstant();
+  
+  public static abstract class AbstractAnalyticsValueStream implements AnalyticsValueStream {
+    @Override
+    public AnalyticsValueStream convertToConstant() {
+      return this;
+    }
+  }
+  
+  /**
    * The types of expressions.
    */
   static enum ExpressionType {

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/86d84bff/solr/contrib/analytics/src/java/org/apache/solr/analytics/value/BooleanValue.java
----------------------------------------------------------------------
diff --git a/solr/contrib/analytics/src/java/org/apache/solr/analytics/value/BooleanValue.java b/solr/contrib/analytics/src/java/org/apache/solr/analytics/value/BooleanValue.java
index 5d58a8b..4c742f2 100644
--- a/solr/contrib/analytics/src/java/org/apache/solr/analytics/value/BooleanValue.java
+++ b/solr/contrib/analytics/src/java/org/apache/solr/analytics/value/BooleanValue.java
@@ -20,6 +20,7 @@ import java.util.function.Consumer;
 
 import org.apache.solr.analytics.facet.compare.ExpressionComparator;
 import org.apache.solr.analytics.util.function.BooleanConsumer;
+import org.apache.solr.analytics.value.constant.ConstantBooleanValue;
 
 /**
  * A single-valued analytics value that can be represented as a boolean.
@@ -78,6 +79,13 @@ public interface BooleanValue extends BooleanValueStream, AnalyticsValue {
       }
     }
     @Override
+    public AnalyticsValue convertToConstant() {
+      if (getExpressionType().equals(ExpressionType.CONST)) {
+        return new ConstantBooleanValue(getBoolean());
+      }
+      return this;
+    }
+    @Override
     public ExpressionComparator<Boolean> getObjectComparator(String expression) {
       return new ExpressionComparator<>(expression);
     }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/86d84bff/solr/contrib/analytics/src/java/org/apache/solr/analytics/value/BooleanValueStream.java
----------------------------------------------------------------------
diff --git a/solr/contrib/analytics/src/java/org/apache/solr/analytics/value/BooleanValueStream.java b/solr/contrib/analytics/src/java/org/apache/solr/analytics/value/BooleanValueStream.java
index 0827aea..b2eb19b 100644
--- a/solr/contrib/analytics/src/java/org/apache/solr/analytics/value/BooleanValueStream.java
+++ b/solr/contrib/analytics/src/java/org/apache/solr/analytics/value/BooleanValueStream.java
@@ -51,5 +51,9 @@ public interface BooleanValueStream extends AnalyticsValueStream {
     public void streamObjects(Consumer<Object> cons) {
       streamBooleans((boolean val) -> cons.accept(val));
     }
+    @Override
+    public AnalyticsValueStream convertToConstant() {
+      return this;
+    }
   }
 }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/86d84bff/solr/contrib/analytics/src/java/org/apache/solr/analytics/value/DateValue.java
----------------------------------------------------------------------
diff --git a/solr/contrib/analytics/src/java/org/apache/solr/analytics/value/DateValue.java b/solr/contrib/analytics/src/java/org/apache/solr/analytics/value/DateValue.java
index b105d58..8a0f0a9 100644
--- a/solr/contrib/analytics/src/java/org/apache/solr/analytics/value/DateValue.java
+++ b/solr/contrib/analytics/src/java/org/apache/solr/analytics/value/DateValue.java
@@ -22,6 +22,7 @@ import java.util.function.Consumer;
 import java.util.function.LongConsumer;
 
 import org.apache.solr.analytics.facet.compare.ExpressionComparator;
+import org.apache.solr.analytics.value.constant.ConstantDateValue;
 
 /**
  * A single-valued analytics value that can be represented as a date.
@@ -63,8 +64,7 @@ public interface DateValue extends DateValueStream, LongValue {
     }
     @Override
     public Object getObject() {
-      long val = getLong();
-      return exists() ? new Date(val) : null;
+      return getDate();
     }
     @Override
     public void streamDates(Consumer<Date> cons) {
@@ -95,6 +95,13 @@ public interface DateValue extends DateValueStream, LongValue {
       }
     }
     @Override
+    public AnalyticsValue convertToConstant() {
+      if (getExpressionType().equals(ExpressionType.CONST)) {
+        return new ConstantDateValue(getLong());
+      }
+      return this;
+    }
+    @Override
     public ExpressionComparator<Date> getObjectComparator(String expression) {
       return new ExpressionComparator<>(expression);
     }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/86d84bff/solr/contrib/analytics/src/java/org/apache/solr/analytics/value/DateValueStream.java
----------------------------------------------------------------------
diff --git a/solr/contrib/analytics/src/java/org/apache/solr/analytics/value/DateValueStream.java b/solr/contrib/analytics/src/java/org/apache/solr/analytics/value/DateValueStream.java
index f709264..b7ab159 100644
--- a/solr/contrib/analytics/src/java/org/apache/solr/analytics/value/DateValueStream.java
+++ b/solr/contrib/analytics/src/java/org/apache/solr/analytics/value/DateValueStream.java
@@ -56,7 +56,11 @@ public interface DateValueStream extends LongValueStream {
     }
     @Override
     public void streamObjects(Consumer<Object> cons) {
-      streamLongs((long val) -> cons.accept(new Date(val)));
+      streamDates((Date val) -> cons.accept(val));
+    }
+    @Override
+    public AnalyticsValueStream convertToConstant() {
+      return this;
     }
   }
 }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/86d84bff/solr/contrib/analytics/src/java/org/apache/solr/analytics/value/DoubleValue.java
----------------------------------------------------------------------
diff --git a/solr/contrib/analytics/src/java/org/apache/solr/analytics/value/DoubleValue.java b/solr/contrib/analytics/src/java/org/apache/solr/analytics/value/DoubleValue.java
index ba527f0..87a1499 100644
--- a/solr/contrib/analytics/src/java/org/apache/solr/analytics/value/DoubleValue.java
+++ b/solr/contrib/analytics/src/java/org/apache/solr/analytics/value/DoubleValue.java
@@ -20,6 +20,7 @@ import java.util.function.Consumer;
 import java.util.function.DoubleConsumer;
 
 import org.apache.solr.analytics.facet.compare.ExpressionComparator;
+import org.apache.solr.analytics.value.constant.ConstantDoubleValue;
 
 /**
  * A single-valued analytics value that can be represented as a date.
@@ -79,6 +80,13 @@ public interface DoubleValue extends DoubleValueStream, AnalyticsValue {
       }
     }
     @Override
+    public AnalyticsValue convertToConstant() {
+      if (getExpressionType().equals(ExpressionType.CONST)) {
+        return new ConstantDoubleValue(getDouble());
+      }
+      return this;
+    }
+    @Override
     public ExpressionComparator<Double> getObjectComparator(String expression) {
       return new ExpressionComparator<>(expression);
     }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/86d84bff/solr/contrib/analytics/src/java/org/apache/solr/analytics/value/DoubleValueStream.java
----------------------------------------------------------------------
diff --git a/solr/contrib/analytics/src/java/org/apache/solr/analytics/value/DoubleValueStream.java b/solr/contrib/analytics/src/java/org/apache/solr/analytics/value/DoubleValueStream.java
index a50c834..e0b4b30 100644
--- a/solr/contrib/analytics/src/java/org/apache/solr/analytics/value/DoubleValueStream.java
+++ b/solr/contrib/analytics/src/java/org/apache/solr/analytics/value/DoubleValueStream.java
@@ -50,5 +50,9 @@ public interface DoubleValueStream extends AnalyticsValueStream {
     public void streamObjects(Consumer<Object> cons) {
       streamDoubles((double val) -> cons.accept(val));
     }
+    @Override
+    public AnalyticsValueStream convertToConstant() {
+      return this;
+    }
   }
 }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/86d84bff/solr/contrib/analytics/src/java/org/apache/solr/analytics/value/FloatValue.java
----------------------------------------------------------------------
diff --git a/solr/contrib/analytics/src/java/org/apache/solr/analytics/value/FloatValue.java b/solr/contrib/analytics/src/java/org/apache/solr/analytics/value/FloatValue.java
index 16883d5..38893d1 100644
--- a/solr/contrib/analytics/src/java/org/apache/solr/analytics/value/FloatValue.java
+++ b/solr/contrib/analytics/src/java/org/apache/solr/analytics/value/FloatValue.java
@@ -21,6 +21,7 @@ import java.util.function.DoubleConsumer;
 
 import org.apache.solr.analytics.facet.compare.ExpressionComparator;
 import org.apache.solr.analytics.util.function.FloatConsumer;
+import org.apache.solr.analytics.value.constant.ConstantFloatValue;
 
 /**
  * A single-valued analytics value that can be represented as a float.
@@ -90,6 +91,13 @@ public interface FloatValue extends FloatValueStream, AnalyticsValue {
       }
     }
     @Override
+    public AnalyticsValue convertToConstant() {
+      if (getExpressionType().equals(ExpressionType.CONST)) {
+        return new ConstantFloatValue(getFloat());
+      }
+      return this;
+    }
+    @Override
     public ExpressionComparator<Float> getObjectComparator(String expression) {
       return new ExpressionComparator<>(expression);
     }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/86d84bff/solr/contrib/analytics/src/java/org/apache/solr/analytics/value/FloatValueStream.java
----------------------------------------------------------------------
diff --git a/solr/contrib/analytics/src/java/org/apache/solr/analytics/value/FloatValueStream.java b/solr/contrib/analytics/src/java/org/apache/solr/analytics/value/FloatValueStream.java
index cf15a21..5364540 100644
--- a/solr/contrib/analytics/src/java/org/apache/solr/analytics/value/FloatValueStream.java
+++ b/solr/contrib/analytics/src/java/org/apache/solr/analytics/value/FloatValueStream.java
@@ -56,5 +56,9 @@ public interface FloatValueStream extends AnalyticsValueStream {
     public void streamObjects(Consumer<Object> cons) {
       streamFloats((float val) -> cons.accept(val));
     }
+    @Override
+    public AnalyticsValueStream convertToConstant() {
+      return this;
+    }
   }
 }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/86d84bff/solr/contrib/analytics/src/java/org/apache/solr/analytics/value/IntValue.java
----------------------------------------------------------------------
diff --git a/solr/contrib/analytics/src/java/org/apache/solr/analytics/value/IntValue.java b/solr/contrib/analytics/src/java/org/apache/solr/analytics/value/IntValue.java
index 5688357..c7353d8 100644
--- a/solr/contrib/analytics/src/java/org/apache/solr/analytics/value/IntValue.java
+++ b/solr/contrib/analytics/src/java/org/apache/solr/analytics/value/IntValue.java
@@ -23,6 +23,7 @@ import java.util.function.LongConsumer;
 
 import org.apache.solr.analytics.facet.compare.ExpressionComparator;
 import org.apache.solr.analytics.util.function.FloatConsumer;
+import org.apache.solr.analytics.value.constant.ConstantIntValue;
 
 /**
  * A single-valued analytics value that can be represented as an int.
@@ -114,6 +115,13 @@ public interface IntValue extends IntValueStream, AnalyticsValue {
       }
     }
     @Override
+    public AnalyticsValue convertToConstant() {
+      if (getExpressionType().equals(ExpressionType.CONST)) {
+        return new ConstantIntValue(getInt());
+      }
+      return this;
+    }
+    @Override
     public ExpressionComparator<Integer> getObjectComparator(String expression) {
       return new ExpressionComparator<>(expression);
     }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/86d84bff/solr/contrib/analytics/src/java/org/apache/solr/analytics/value/IntValueStream.java
----------------------------------------------------------------------
diff --git a/solr/contrib/analytics/src/java/org/apache/solr/analytics/value/IntValueStream.java b/solr/contrib/analytics/src/java/org/apache/solr/analytics/value/IntValueStream.java
index 9cbe28c..e4f1014 100644
--- a/solr/contrib/analytics/src/java/org/apache/solr/analytics/value/IntValueStream.java
+++ b/solr/contrib/analytics/src/java/org/apache/solr/analytics/value/IntValueStream.java
@@ -67,5 +67,9 @@ public interface IntValueStream extends AnalyticsValueStream {
     public void streamObjects(Consumer<Object> cons) {
       streamInts((int val) -> cons.accept(val));
     }
+    @Override
+    public AnalyticsValueStream convertToConstant() {
+      return this;
+    }
   }
 }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/86d84bff/solr/contrib/analytics/src/java/org/apache/solr/analytics/value/LongValue.java
----------------------------------------------------------------------
diff --git a/solr/contrib/analytics/src/java/org/apache/solr/analytics/value/LongValue.java b/solr/contrib/analytics/src/java/org/apache/solr/analytics/value/LongValue.java
index 623cd13..2cdf16c 100644
--- a/solr/contrib/analytics/src/java/org/apache/solr/analytics/value/LongValue.java
+++ b/solr/contrib/analytics/src/java/org/apache/solr/analytics/value/LongValue.java
@@ -21,6 +21,7 @@ import java.util.function.DoubleConsumer;
 import java.util.function.LongConsumer;
 
 import org.apache.solr.analytics.facet.compare.ExpressionComparator;
+import org.apache.solr.analytics.value.constant.ConstantLongValue;
 
 /**
  * A single-valued analytics value that can be represented as a long.
@@ -90,6 +91,13 @@ public interface LongValue extends LongValueStream, AnalyticsValue {
       }
     }
     @Override
+    public AnalyticsValue convertToConstant() {
+      if (getExpressionType().equals(ExpressionType.CONST)) {
+        return new ConstantLongValue(getLong());
+      }
+      return this;
+    }
+    @Override
     public ExpressionComparator<Long> getObjectComparator(String expression) {
       return new ExpressionComparator<>(expression);
     }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/86d84bff/solr/contrib/analytics/src/java/org/apache/solr/analytics/value/LongValueStream.java
----------------------------------------------------------------------
diff --git a/solr/contrib/analytics/src/java/org/apache/solr/analytics/value/LongValueStream.java b/solr/contrib/analytics/src/java/org/apache/solr/analytics/value/LongValueStream.java
index d18cb03..5446b70 100644
--- a/solr/contrib/analytics/src/java/org/apache/solr/analytics/value/LongValueStream.java
+++ b/solr/contrib/analytics/src/java/org/apache/solr/analytics/value/LongValueStream.java
@@ -56,5 +56,9 @@ public interface LongValueStream extends AnalyticsValueStream {
     public void streamObjects(Consumer<Object> cons) {
       streamLongs((long val) -> cons.accept(val));
     }
+    @Override
+    public AnalyticsValueStream convertToConstant() {
+      return this;
+    }
   }
 }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/86d84bff/solr/contrib/analytics/src/java/org/apache/solr/analytics/value/StringValue.java
----------------------------------------------------------------------
diff --git a/solr/contrib/analytics/src/java/org/apache/solr/analytics/value/StringValue.java b/solr/contrib/analytics/src/java/org/apache/solr/analytics/value/StringValue.java
index 7baf18e..47c0a33 100644
--- a/solr/contrib/analytics/src/java/org/apache/solr/analytics/value/StringValue.java
+++ b/solr/contrib/analytics/src/java/org/apache/solr/analytics/value/StringValue.java
@@ -19,6 +19,7 @@ package org.apache.solr.analytics.value;
 import java.util.function.Consumer;
 
 import org.apache.solr.analytics.facet.compare.ExpressionComparator;
+import org.apache.solr.analytics.value.constant.ConstantStringValue;
 
 /**
  * A single-valued analytics value that can be represented as a string.
@@ -64,6 +65,13 @@ public interface StringValue extends StringValueStream, AnalyticsValue {
       }
     }
     @Override
+    public AnalyticsValue convertToConstant() {
+      if (getExpressionType().equals(ExpressionType.CONST)) {
+        return new ConstantStringValue(getString());
+      }
+      return this;
+    }
+    @Override
     public ExpressionComparator<String> getObjectComparator(String expression) {
       return new ExpressionComparator<>(expression);
     }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/86d84bff/solr/contrib/analytics/src/java/org/apache/solr/analytics/value/StringValueStream.java
----------------------------------------------------------------------
diff --git a/solr/contrib/analytics/src/java/org/apache/solr/analytics/value/StringValueStream.java b/solr/contrib/analytics/src/java/org/apache/solr/analytics/value/StringValueStream.java
index 2269ac4..536e475 100644
--- a/solr/contrib/analytics/src/java/org/apache/solr/analytics/value/StringValueStream.java
+++ b/solr/contrib/analytics/src/java/org/apache/solr/analytics/value/StringValueStream.java
@@ -45,5 +45,9 @@ public interface StringValueStream extends AnalyticsValueStream {
     public void streamObjects(Consumer<Object> cons) {
       streamStrings((String val) -> cons.accept(val));
     }
+    @Override
+    public AnalyticsValueStream convertToConstant() {
+      return this;
+    }
   }
 }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/86d84bff/solr/contrib/analytics/src/java/org/apache/solr/analytics/value/constant/ConstantValue.java
----------------------------------------------------------------------
diff --git a/solr/contrib/analytics/src/java/org/apache/solr/analytics/value/constant/ConstantValue.java b/solr/contrib/analytics/src/java/org/apache/solr/analytics/value/constant/ConstantValue.java
index 2e364b1..5691f64 100644
--- a/solr/contrib/analytics/src/java/org/apache/solr/analytics/value/constant/ConstantValue.java
+++ b/solr/contrib/analytics/src/java/org/apache/solr/analytics/value/constant/ConstantValue.java
@@ -16,7 +16,8 @@
  */
 package org.apache.solr.analytics.value.constant;
 
-import java.text.SimpleDateFormat;
+import java.time.Instant;
+import java.time.format.DateTimeParseException;
 import java.util.Locale;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
@@ -34,29 +35,13 @@ import org.apache.solr.common.SolrException.ErrorCode;
  * <ul>
  * <li> Constant booleans must match one of the following in any case: true, t, false, f
  * <li> Constant strings must be surrounded with "s or 's
- * <li> Constant numbers do not have to be surrounded with anything
- * <li> Constant dates must match one of the following patterns
- * <ul> 
- * <li> yyyy-MM-dd
- * <li> yyyy-MM-ddXXX
- * <li> yyyy-MM-dd'T'HH:mm:ssZ
- * <li> yyyy-MM-dd'T'HH:mm:ssXXX
- * <li> yyyy-MM-dd'T'HH:mm:ss.SSSZ
- * <li> yyyy-MM-dd'T'HH:mm:ss.SSSXXX
- * </ul>
- * </li> 
+ * <li> Constant numbers do not have to be surrounded with anything (floats are currently not supported)
+ * <li> Constant dates must be formated in the ISO-8601 instant format
  * </ul>
  */
-public abstract class ConstantValue {
+public abstract class ConstantValue implements AnalyticsValue {
   private static final Pattern truePattern = Pattern.compile("^true|t$", Pattern.CASE_INSENSITIVE);
   private static final Pattern falsePattern = Pattern.compile("^false|f$", Pattern.CASE_INSENSITIVE);
-  private static final SimpleDateFormat dateParserBase = new SimpleDateFormat("yyyy-MM-dd", Locale.ROOT);
-  private static final SimpleDateFormat dateParser1 = new SimpleDateFormat("yyyy-MM-ddZ", Locale.ROOT);
-  private static final SimpleDateFormat dateParser2 = new SimpleDateFormat("yyyy-MM-ddXXX", Locale.ROOT);
-  private static final SimpleDateFormat dateParser3 = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssZ", Locale.ROOT);
-  private static final SimpleDateFormat dateParser4 = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssXXX", Locale.ROOT);
-  private static final SimpleDateFormat dateParser5 = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZ", Locale.ROOT);
-  private static final SimpleDateFormat dateParser6 = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSXXX", Locale.ROOT);
   
   public static final ConstantFunction creatorFunction = (param -> {
     param = param.trim();
@@ -79,50 +64,36 @@ public abstract class ConstantValue {
     
     // Try to create a number
     try {
-      AnalyticsValue value = new ConstantDoubleValue(Double.parseDouble(param));
-      try {
-        value = new ConstantLongValue(Long.parseLong(param));
-        value = new ConstantIntValue(Integer.parseInt(param));
-      } catch (NumberFormatException e) {
-        value = new ConstantFloatValue(Float.parseFloat(param));
+      long longTemp = Long.parseLong(param);
+      if (longTemp == (int) longTemp) {
+        return new ConstantIntValue((int) longTemp);
+      } else {
+        return new ConstantLongValue(longTemp);
       }
-      return value;
-    } catch (NumberFormatException e) {
-      // The constant is not a number
+    } catch (NumberFormatException e1) {
+      try {
+        return new ConstantDoubleValue(Double.parseDouble(param));
+      } catch (NumberFormatException e2) {}
     }
     
     // Try to create a date
     try {
-      AnalyticsValue value = new ConstantDateValue(dateParserBase.parse(param).getTime());
-      try {
-        return new ConstantDateValue(dateParser1.parse(param).getTime());
-      } catch (Exception e) {}
-      try {
-        return new ConstantDateValue(dateParser2.parse(param).getTime());
-      } catch (Exception e) {}
-      try {
-        return new ConstantDateValue(dateParser3.parse(param).getTime());
-      } catch (Exception e) {}
-      try {
-        return new ConstantDateValue(dateParser4.parse(param).getTime());
-      } catch (Exception e) {}
-      try {
-        return new ConstantDateValue(dateParser5.parse(param).getTime());
-      } catch (Exception e) {}
-      try {
-        return new ConstantDateValue(dateParser6.parse(param).getTime());
-      } catch (Exception e) {}
-      return value;
-    } catch (Exception e) {
+      return new ConstantDateValue(Instant.parse(param).toEpochMilli());
+    } catch (DateTimeParseException e) {
       throw new SolrException(ErrorCode.BAD_REQUEST,"The parameter "+param+" could not be cast to any constant.");
     }
     
   });
   
+  @Override
+  public AnalyticsValue convertToConstant() {
+    return this;
+  }
+  
   static String createExpressionString(AnalyticsValueStream func, 
                                        Object param) {
     return String.format(Locale.ROOT,"%s(%s)",
                          func.getName(),
                          param.toString());
   }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/86d84bff/solr/contrib/analytics/src/test-files/solr/analytics/expressions.txt
----------------------------------------------------------------------
diff --git a/solr/contrib/analytics/src/test-files/solr/analytics/expressions.txt b/solr/contrib/analytics/src/test-files/solr/analytics/expressions.txt
deleted file mode 100644
index 6f5c916..0000000
--- a/solr/contrib/analytics/src/test-files/solr/analytics/expressions.txt
+++ /dev/null
@@ -1,65 +0,0 @@
-o.ar.s.sum=sum(int_id)
-o.ar.s.unique=unique(long_ld)
-o.ar.s.su=add(sum(int_id),unique(long_ld))
-o.ar.s.mean=mean(int_id)
-o.ar.s.count=count(long_ld)
-o.ar.s.median=median(int_id)
-o.ar.s.mcm=add(mean(int_id),count(long_ld),median(int_id))
-
-o.mr.s.sum=sum(int_id)
-o.mr.s.unique=unique(long_ld)
-o.mr.s.su=mult(sum(int_id),unique(long_ld))
-o.mr.s.mean=mean(int_id)
-o.mr.s.count=count(long_ld)
-o.mr.s.median=median(int_id)
-o.mr.s.mcm=mult(mean(int_id),count(long_ld),median(int_id))
-
-o.dr.s.sum=sum(int_id)
-o.dr.s.unique=unique(long_ld)
-o.dr.s.su=div(sum(int_id),unique(long_ld))
-o.dr.s.mean=mean(int_id)
-o.dr.s.count=count(long_ld)
-o.dr.s.mc=div(mean(int_id),count(long_ld))
-
-o.pr.s.sum=sum(int_id)
-o.pr.s.unique=unique(long_ld)
-o.pr.s.su=pow(sum(int_id),unique(long_ld))
-o.pr.s.mean=mean(int_id)
-o.pr.s.count=count(long_ld)
-o.pr.s.mc=pow(mean(int_id),count(long_ld))
-
-o.nr.s.sum=sum(int_id)
-o.nr.s.s=neg(sum(int_id))
-o.nr.s.count=count(long_ld)
-o.nr.s.c=neg(count(long_ld))
-
-o.avr.s.sum=sum(int_id)
-o.avr.s.s=abs(neg(sum(int_id)))
-o.avr.s.count=count(long_ld)
-o.avr.s.c=abs(neg(count(long_ld)))
-
-o.cnr.s.c8=8
-o.cnr.s.c10=10.0
-
-o.dmr.s.median=median(date_dtd)
-o.dmr.s.cme="+2YEARS"
-o.dmr.s.dmme=date_math(median(date_dtd),"+2YEARS")
-o.dmr.s.max=max(date_dtd)
-o.dmr.s.cma="+2MONTHS"
-o.dmr.s.dmma=date_math(max(date_dtd),"+2MONTHS")
-
-o.cdr.s.cd1=1800-12-31T23:59:59Z
-o.cdr.s.cs1="1800-12-31T23:59:59Z"
-o.cdr.s.cd2=1804-06-30T23:59:59Z
-o.cdr.s.cs2="1804-06-30T23:59:59Z"
-
-o.csr.s.cs1="this is the first"
-o.csr.s.cs2="this is the second"
-o.csr.s.cs3="this is the third"
-
-o.cr.s.csmin="this is the first"
-o.cr.s.min=min(string_sd)
-o.cr.s.ccmin=concat("this is the first",min(string_sd))
-o.cr.s.csmax="this is the second"
-o.cr.s.max=max(string_sd)
-o.cr.s.ccmax=concat("this is the second",max(string_sd))

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/86d84bff/solr/contrib/analytics/src/test-files/solr/analytics/facetSorting.txt
----------------------------------------------------------------------
diff --git a/solr/contrib/analytics/src/test-files/solr/analytics/facetSorting.txt b/solr/contrib/analytics/src/test-files/solr/analytics/facetSorting.txt
deleted file mode 100644
index 4663217..0000000
--- a/solr/contrib/analytics/src/test-files/solr/analytics/facetSorting.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-o.ar.s.min=min(double_dd)
-o.ar.s.max=max(long_ld)
-o.ar.ff=string_sd
-o.ar.ff.string_sd.sortstatistic=min

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/86d84bff/solr/contrib/analytics/src/test-files/solr/analytics/fieldFacetExtras.txt
----------------------------------------------------------------------
diff --git a/solr/contrib/analytics/src/test-files/solr/analytics/fieldFacetExtras.txt b/solr/contrib/analytics/src/test-files/solr/analytics/fieldFacetExtras.txt
deleted file mode 100644
index 3979f57..0000000
--- a/solr/contrib/analytics/src/test-files/solr/analytics/fieldFacetExtras.txt
+++ /dev/null
@@ -1,66 +0,0 @@
-o.sr.s.mean=mean(int_id)
-o.sr.s.median=median(int_id)
-o.sr.s.count=count(int_id)
-o.sr.s.percentile_20=percentile(20,int_id)
-o.sr.ff=long_ld
-o.sr.ff.long_ld.ss=mean
-o.sr.ff.long_ld.sd=asc
-o.sr.ff=float_fd
-o.sr.ff.float_fd.ss=median
-o.sr.ff.float_fd.sd=desc
-o.sr.ff=double_dd
-o.sr.ff.double_dd.ss=count
-o.sr.ff.double_dd.sd=asc
-o.sr.ff=string_sd
-o.sr.ff.string_sd.ss=percentile_20
-o.sr.ff.string_sd.sd=desc
-
-o.lr.s.mean=mean(int_id)
-o.lr.s.median=median(int_id)
-o.lr.s.count=count(int_id)
-o.lr.s.percentile_20=percentile(20,int_id)
-o.lr.ff=long_ld
-o.lr.ff.long_ld.ss=mean
-o.lr.ff.long_ld.sd=asc
-o.lr.ff.long_ld.limit=5
-o.lr.ff=float_fd
-o.lr.ff.float_fd.ss=median
-o.lr.ff.float_fd.sd=desc
-o.lr.ff.float_fd.limit=3
-o.lr.ff=double_dd
-o.lr.ff.double_dd.ss=count
-o.lr.ff.double_dd.sd=asc
-o.lr.ff.double_dd.limit=7
-o.lr.ff=string_sd
-o.lr.ff.string_sd.ss=percentile_20
-o.lr.ff.string_sd.sd=desc
-o.lr.ff.string_sd.limit=1
-
-
-
-o.offAll.s.mean=mean(int_id)
-o.offAll.ff=long_ld
-o.offAll.ff.long_ld.ss=mean
-o.offAll.ff.long_ld.sd=asc
-o.offAll.ff.long_ld.limit=7
-
-o.off0.s.mean=mean(int_id)
-o.off0.ff=long_ld
-o.off0.ff.long_ld.ss=mean
-o.off0.ff.long_ld.sd=asc
-o.off0.ff.long_ld.limit=2
-o.off0.ff.long_ld.offset=0
-
-o.off1.s.mean=mean(int_id)
-o.off1.ff=long_ld
-o.off1.ff.long_ld.ss=mean
-o.off1.ff.long_ld.sd=asc
-o.off1.ff.long_ld.limit=2
-o.off1.ff.long_ld.offset=2
-
-o.off2.s.mean=mean(int_id)
-o.off2.ff=long_ld
-o.off2.ff.long_ld.ss=mean
-o.off2.ff.long_ld.sd=asc
-o.off2.ff.long_ld.limit=3
-o.off2.ff.long_ld.offset=4

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/86d84bff/solr/contrib/analytics/src/test-files/solr/analytics/fieldFacets.txt
----------------------------------------------------------------------
diff --git a/solr/contrib/analytics/src/test-files/solr/analytics/fieldFacets.txt b/solr/contrib/analytics/src/test-files/solr/analytics/fieldFacets.txt
deleted file mode 100644
index 5ba5953..0000000
--- a/solr/contrib/analytics/src/test-files/solr/analytics/fieldFacets.txt
+++ /dev/null
@@ -1,132 +0,0 @@
-o.sum.s.int=sum(int_id)
-o.sum.s.long=sum(long_ld)
-o.sum.s.float=sum(float_fd)
-o.sum.s.double=sum(double_dd)
-o.sum.ff=string_sd
-o.sum.ff=date_dtd
-
-o.mean.s.int=mean(int_id)
-o.mean.s.long=mean(long_ld)
-o.mean.s.float=mean(float_fd)
-o.mean.s.double=mean(double_dd)
-o.mean.ff=string_sd
-o.mean.ff=date_dtd
-
-o.sumOfSquares.s.int=sumofsquares(int_id)
-o.sumOfSquares.s.long=sumofsquares(long_ld)
-o.sumOfSquares.s.float=sumofsquares(float_fd)
-o.sumOfSquares.s.double=sumofsquares(double_dd)
-o.sumOfSquares.ff=string_sd
-o.sumOfSquares.ff=date_dtd
-
-o.stddev.s.int=stddev(int_id)
-o.stddev.s.long=stddev(long_ld)
-o.stddev.s.float=stddev(float_fd)
-o.stddev.s.double=stddev(double_dd)
-o.stddev.ff=string_sd
-o.stddev.ff=date_dtd
-
-o.median.s.int=median(int_id)
-o.median.s.long=median(long_ld)
-o.median.s.float=median(float_fd)
-o.median.s.double=median(double_dd)
-o.median.ff=string_sd
-o.median.ff=date_dtd
-
-o.percentile_20n.s.int=percentile(20,int_id)
-o.percentile_20n.s.long=percentile(20,long_ld)
-o.percentile_20n.s.float=percentile(20,float_fd)
-o.percentile_20n.s.double=percentile(20,double_dd)
-o.percentile_20n.ff=string_sd
-o.percentile_20n.ff=date_dtd
-
-o.percentile_20.s.str=percentile(20,string_sd)
-o.percentile_20.s.date=percentile(20,date_dtd)
-o.percentile_20.ff=int_id
-o.percentile_20.ff=long_ld
-
-o.percentile_60n.s.int=percentile(60,int_id)
-o.percentile_60n.s.long=percentile(60,long_ld)
-o.percentile_60n.s.float=percentile(60,float_fd)
-o.percentile_60n.s.double=percentile(60,double_dd)
-o.percentile_60n.ff=string_sd
-o.percentile_60n.ff=date_dtd
-
-o.percentile_60.s.str=percentile(60,string_sd)
-o.percentile_60.s.date=percentile(60,date_dtd)
-o.percentile_60.ff=int_id
-o.percentile_60.ff=long_ld
-
-o.minn.s.int=min(int_id)
-o.minn.s.long=min(long_ld)
-o.minn.s.float=min(float_fd)
-o.minn.s.double=min(double_dd)
-o.minn.ff=string_sd
-o.minn.ff=date_dtd
-
-o.min.s.str=min(string_sd)
-o.min.s.date=min(date_dtd)
-o.min.ff=int_id
-o.min.ff=long_ld
-
-o.maxn.s.int=max(int_id)
-o.maxn.s.long=max(long_ld)
-o.maxn.s.float=max(float_fd)
-o.maxn.s.double=max(double_dd)
-o.maxn.ff=string_sd
-o.maxn.ff=date_dtd
-
-o.max.s.str=max(string_sd)
-o.max.s.date=max(date_dtd)
-o.max.ff=int_id
-o.max.ff=long_ld
-
-o.countn.s.int=count(int_id)
-o.countn.s.long=count(long_ld)
-o.countn.s.float=count(float_fd)
-o.countn.s.double=count(double_dd)
-o.countn.ff=string_sd
-o.countn.ff=date_dtd
-
-o.count.s.str=count(string_sd)
-o.count.s.date=count(date_dtd)
-o.count.ff=int_id
-o.count.ff=long_ld
-
-o.uniquen.s.int=unique(int_id)
-o.uniquen.s.long=unique(long_ld)
-o.uniquen.s.float=unique(float_fd)
-o.uniquen.s.double=unique(double_dd)
-o.uniquen.ff=string_sd
-o.uniquen.ff=date_dtd
-
-o.unique.s.str=unique(string_sd)
-o.unique.s.date=unique(date_dtd)
-o.unique.ff=int_id
-o.unique.ff=long_ld
-
-o.missingn.s.int=missing(int_id)
-o.missingn.s.long=missing(long_ld)
-o.missingn.s.float=missing(float_fd)
-o.missingn.s.double=missing(double_dd)
-o.missingn.ff=string_sd
-o.missingn.ff=date_dtd
-
-o.missing.s.str=missing(string_sd)
-o.missing.s.date=missing(date_dtd)
-o.missing.ff=int_id
-o.missing.ff=long_ld
-
-o.multivalued.s.mean=mean(int_id)
-o.multivalued.ff=long_ldm
-o.multivalued.ff=string_sdm
-o.multivalued.ff=date_dtdm
-
-o.missingf.s.mean=mean(int_id)
-o.missingf.ff=date_dtd
-o.missingf.ff.date_dtd.dim=true
-o.missingf.ff=string_sd
-o.missingf.ff.string_sd.dim=true
-o.missingf.ff.string_sd.sm=true
-o.missingf.ff=date_dtdm
-o.missingf.ff.date_dtdm.sm=true

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/86d84bff/solr/contrib/analytics/src/test-files/solr/analytics/functions.txt
----------------------------------------------------------------------
diff --git a/solr/contrib/analytics/src/test-files/solr/analytics/functions.txt b/solr/contrib/analytics/src/test-files/solr/analytics/functions.txt
deleted file mode 100644
index ce73583..0000000
--- a/solr/contrib/analytics/src/test-files/solr/analytics/functions.txt
+++ /dev/null
@@ -1,57 +0,0 @@
-o.ar.s.sum=sum(add(int_id,float_fd))
-o.ar.s.sumc=sum(add_if_dd)
-o.ar.s.mean=mean(add(long_ld,double_dd,float_fd))
-o.ar.s.meanc=mean(add_ldf_dd)
-
-o.mr.s.sum=sum(mult(int_id,float_fd))
-o.mr.s.sumc=sum(mult_if_dd)
-o.mr.s.mean=mean(mult(long_ld,double_dd,float_fd))
-o.mr.s.meanc=mean(mult_ldf_dd)
-
-o.dr.s.sum=sum(div(int_id,float_fd))
-o.dr.s.sumc=sum(div_if_dd)
-o.dr.s.mean=mean(div(long_ld,double_dd))
-o.dr.s.meanc=mean(div_ld_dd)
-
-o.pr.s.sum=sum(pow(int_id,float_fd))
-o.pr.s.sumc=sum(pow_if_dd)
-o.pr.s.mean=mean(pow(long_ld,double_dd))
-o.pr.s.meanc=mean(pow_ld_dd)
-
-o.nr.s.sum=sum(neg(int_id))
-o.nr.s.sumc=sum(neg_id)
-o.nr.s.mean=mean(neg(long_ld))
-o.nr.s.meanc=mean(neg_ld)
-
-o.avr.s.sum=sum(abs(neg(int_id)))
-o.avr.s.sumc=sum(int_id)
-o.avr.s.mean=mean(abs(neg(int_id)))
-o.avr.s.meanc=mean(int_id)
-
-o.cnr.s.sum=sum(8)
-o.cnr.s.sumc=sum(const_8_dd)
-o.cnr.s.mean=mean(10)
-o.cnr.s.meanc=mean(const_10_dd)
-
-o.dmr.s.median=median(date_math(date_dtd,"+2YEARS"))
-o.dmr.s.medianc=median(dm_2y_dtd)
-o.dmr.s.max=max(date_math(date_dtd,"+2MONTHS"))
-o.dmr.s.maxc=max(dm_2m_dtd)
-
-o.cdr.s.median=median(1800-06-30T23:59:59Z)
-o.cdr.s.medianc=median(const_00_dtd)
-o.cdr.s.max=max(1804-06-30T23:59:59Z)
-o.cdr.s.maxc=max(const_04_dtd)
-
-o.csr.s.min=min("this is the first")
-o.csr.s.minc=min(const_first_sd)
-o.csr.s.max=max("this is the second")
-o.csr.s.maxc=max(const_second_sd)
-
-o.cr.s.min=concat("this is the first",min(string_sd))
-o.cr.s.minc=min(concat_first_sd)
-o.cr.s.max=concat("this is the second",max(string_sd))
-o.cr.s.maxc=max(concat_second_sd)
-
-o.ms.s.min=min(miss_dd)
-o.ms.s.max=max(miss_dd)

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/86d84bff/solr/contrib/analytics/src/test-files/solr/analytics/legacy/expressions.txt
----------------------------------------------------------------------
diff --git a/solr/contrib/analytics/src/test-files/solr/analytics/legacy/expressions.txt b/solr/contrib/analytics/src/test-files/solr/analytics/legacy/expressions.txt
new file mode 100644
index 0000000..6f5c916
--- /dev/null
+++ b/solr/contrib/analytics/src/test-files/solr/analytics/legacy/expressions.txt
@@ -0,0 +1,65 @@
+o.ar.s.sum=sum(int_id)
+o.ar.s.unique=unique(long_ld)
+o.ar.s.su=add(sum(int_id),unique(long_ld))
+o.ar.s.mean=mean(int_id)
+o.ar.s.count=count(long_ld)
+o.ar.s.median=median(int_id)
+o.ar.s.mcm=add(mean(int_id),count(long_ld),median(int_id))
+
+o.mr.s.sum=sum(int_id)
+o.mr.s.unique=unique(long_ld)
+o.mr.s.su=mult(sum(int_id),unique(long_ld))
+o.mr.s.mean=mean(int_id)
+o.mr.s.count=count(long_ld)
+o.mr.s.median=median(int_id)
+o.mr.s.mcm=mult(mean(int_id),count(long_ld),median(int_id))
+
+o.dr.s.sum=sum(int_id)
+o.dr.s.unique=unique(long_ld)
+o.dr.s.su=div(sum(int_id),unique(long_ld))
+o.dr.s.mean=mean(int_id)
+o.dr.s.count=count(long_ld)
+o.dr.s.mc=div(mean(int_id),count(long_ld))
+
+o.pr.s.sum=sum(int_id)
+o.pr.s.unique=unique(long_ld)
+o.pr.s.su=pow(sum(int_id),unique(long_ld))
+o.pr.s.mean=mean(int_id)
+o.pr.s.count=count(long_ld)
+o.pr.s.mc=pow(mean(int_id),count(long_ld))
+
+o.nr.s.sum=sum(int_id)
+o.nr.s.s=neg(sum(int_id))
+o.nr.s.count=count(long_ld)
+o.nr.s.c=neg(count(long_ld))
+
+o.avr.s.sum=sum(int_id)
+o.avr.s.s=abs(neg(sum(int_id)))
+o.avr.s.count=count(long_ld)
+o.avr.s.c=abs(neg(count(long_ld)))
+
+o.cnr.s.c8=8
+o.cnr.s.c10=10.0
+
+o.dmr.s.median=median(date_dtd)
+o.dmr.s.cme="+2YEARS"
+o.dmr.s.dmme=date_math(median(date_dtd),"+2YEARS")
+o.dmr.s.max=max(date_dtd)
+o.dmr.s.cma="+2MONTHS"
+o.dmr.s.dmma=date_math(max(date_dtd),"+2MONTHS")
+
+o.cdr.s.cd1=1800-12-31T23:59:59Z
+o.cdr.s.cs1="1800-12-31T23:59:59Z"
+o.cdr.s.cd2=1804-06-30T23:59:59Z
+o.cdr.s.cs2="1804-06-30T23:59:59Z"
+
+o.csr.s.cs1="this is the first"
+o.csr.s.cs2="this is the second"
+o.csr.s.cs3="this is the third"
+
+o.cr.s.csmin="this is the first"
+o.cr.s.min=min(string_sd)
+o.cr.s.ccmin=concat("this is the first",min(string_sd))
+o.cr.s.csmax="this is the second"
+o.cr.s.max=max(string_sd)
+o.cr.s.ccmax=concat("this is the second",max(string_sd))

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/86d84bff/solr/contrib/analytics/src/test-files/solr/analytics/legacy/facetSorting.txt
----------------------------------------------------------------------
diff --git a/solr/contrib/analytics/src/test-files/solr/analytics/legacy/facetSorting.txt b/solr/contrib/analytics/src/test-files/solr/analytics/legacy/facetSorting.txt
new file mode 100644
index 0000000..4663217
--- /dev/null
+++ b/solr/contrib/analytics/src/test-files/solr/analytics/legacy/facetSorting.txt
@@ -0,0 +1,4 @@
+o.ar.s.min=min(double_dd)
+o.ar.s.max=max(long_ld)
+o.ar.ff=string_sd
+o.ar.ff.string_sd.sortstatistic=min

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/86d84bff/solr/contrib/analytics/src/test-files/solr/analytics/legacy/fieldFacetExtras.txt
----------------------------------------------------------------------
diff --git a/solr/contrib/analytics/src/test-files/solr/analytics/legacy/fieldFacetExtras.txt b/solr/contrib/analytics/src/test-files/solr/analytics/legacy/fieldFacetExtras.txt
new file mode 100644
index 0000000..3979f57
--- /dev/null
+++ b/solr/contrib/analytics/src/test-files/solr/analytics/legacy/fieldFacetExtras.txt
@@ -0,0 +1,66 @@
+o.sr.s.mean=mean(int_id)
+o.sr.s.median=median(int_id)
+o.sr.s.count=count(int_id)
+o.sr.s.percentile_20=percentile(20,int_id)
+o.sr.ff=long_ld
+o.sr.ff.long_ld.ss=mean
+o.sr.ff.long_ld.sd=asc
+o.sr.ff=float_fd
+o.sr.ff.float_fd.ss=median
+o.sr.ff.float_fd.sd=desc
+o.sr.ff=double_dd
+o.sr.ff.double_dd.ss=count
+o.sr.ff.double_dd.sd=asc
+o.sr.ff=string_sd
+o.sr.ff.string_sd.ss=percentile_20
+o.sr.ff.string_sd.sd=desc
+
+o.lr.s.mean=mean(int_id)
+o.lr.s.median=median(int_id)
+o.lr.s.count=count(int_id)
+o.lr.s.percentile_20=percentile(20,int_id)
+o.lr.ff=long_ld
+o.lr.ff.long_ld.ss=mean
+o.lr.ff.long_ld.sd=asc
+o.lr.ff.long_ld.limit=5
+o.lr.ff=float_fd
+o.lr.ff.float_fd.ss=median
+o.lr.ff.float_fd.sd=desc
+o.lr.ff.float_fd.limit=3
+o.lr.ff=double_dd
+o.lr.ff.double_dd.ss=count
+o.lr.ff.double_dd.sd=asc
+o.lr.ff.double_dd.limit=7
+o.lr.ff=string_sd
+o.lr.ff.string_sd.ss=percentile_20
+o.lr.ff.string_sd.sd=desc
+o.lr.ff.string_sd.limit=1
+
+
+
+o.offAll.s.mean=mean(int_id)
+o.offAll.ff=long_ld
+o.offAll.ff.long_ld.ss=mean
+o.offAll.ff.long_ld.sd=asc
+o.offAll.ff.long_ld.limit=7
+
+o.off0.s.mean=mean(int_id)
+o.off0.ff=long_ld
+o.off0.ff.long_ld.ss=mean
+o.off0.ff.long_ld.sd=asc
+o.off0.ff.long_ld.limit=2
+o.off0.ff.long_ld.offset=0
+
+o.off1.s.mean=mean(int_id)
+o.off1.ff=long_ld
+o.off1.ff.long_ld.ss=mean
+o.off1.ff.long_ld.sd=asc
+o.off1.ff.long_ld.limit=2
+o.off1.ff.long_ld.offset=2
+
+o.off2.s.mean=mean(int_id)
+o.off2.ff=long_ld
+o.off2.ff.long_ld.ss=mean
+o.off2.ff.long_ld.sd=asc
+o.off2.ff.long_ld.limit=3
+o.off2.ff.long_ld.offset=4

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/86d84bff/solr/contrib/analytics/src/test-files/solr/analytics/legacy/fieldFacets.txt
----------------------------------------------------------------------
diff --git a/solr/contrib/analytics/src/test-files/solr/analytics/legacy/fieldFacets.txt b/solr/contrib/analytics/src/test-files/solr/analytics/legacy/fieldFacets.txt
new file mode 100644
index 0000000..5ba5953
--- /dev/null
+++ b/solr/contrib/analytics/src/test-files/solr/analytics/legacy/fieldFacets.txt
@@ -0,0 +1,132 @@
+o.sum.s.int=sum(int_id)
+o.sum.s.long=sum(long_ld)
+o.sum.s.float=sum(float_fd)
+o.sum.s.double=sum(double_dd)
+o.sum.ff=string_sd
+o.sum.ff=date_dtd
+
+o.mean.s.int=mean(int_id)
+o.mean.s.long=mean(long_ld)
+o.mean.s.float=mean(float_fd)
+o.mean.s.double=mean(double_dd)
+o.mean.ff=string_sd
+o.mean.ff=date_dtd
+
+o.sumOfSquares.s.int=sumofsquares(int_id)
+o.sumOfSquares.s.long=sumofsquares(long_ld)
+o.sumOfSquares.s.float=sumofsquares(float_fd)
+o.sumOfSquares.s.double=sumofsquares(double_dd)
+o.sumOfSquares.ff=string_sd
+o.sumOfSquares.ff=date_dtd
+
+o.stddev.s.int=stddev(int_id)
+o.stddev.s.long=stddev(long_ld)
+o.stddev.s.float=stddev(float_fd)
+o.stddev.s.double=stddev(double_dd)
+o.stddev.ff=string_sd
+o.stddev.ff=date_dtd
+
+o.median.s.int=median(int_id)
+o.median.s.long=median(long_ld)
+o.median.s.float=median(float_fd)
+o.median.s.double=median(double_dd)
+o.median.ff=string_sd
+o.median.ff=date_dtd
+
+o.percentile_20n.s.int=percentile(20,int_id)
+o.percentile_20n.s.long=percentile(20,long_ld)
+o.percentile_20n.s.float=percentile(20,float_fd)
+o.percentile_20n.s.double=percentile(20,double_dd)
+o.percentile_20n.ff=string_sd
+o.percentile_20n.ff=date_dtd
+
+o.percentile_20.s.str=percentile(20,string_sd)
+o.percentile_20.s.date=percentile(20,date_dtd)
+o.percentile_20.ff=int_id
+o.percentile_20.ff=long_ld
+
+o.percentile_60n.s.int=percentile(60,int_id)
+o.percentile_60n.s.long=percentile(60,long_ld)
+o.percentile_60n.s.float=percentile(60,float_fd)
+o.percentile_60n.s.double=percentile(60,double_dd)
+o.percentile_60n.ff=string_sd
+o.percentile_60n.ff=date_dtd
+
+o.percentile_60.s.str=percentile(60,string_sd)
+o.percentile_60.s.date=percentile(60,date_dtd)
+o.percentile_60.ff=int_id
+o.percentile_60.ff=long_ld
+
+o.minn.s.int=min(int_id)
+o.minn.s.long=min(long_ld)
+o.minn.s.float=min(float_fd)
+o.minn.s.double=min(double_dd)
+o.minn.ff=string_sd
+o.minn.ff=date_dtd
+
+o.min.s.str=min(string_sd)
+o.min.s.date=min(date_dtd)
+o.min.ff=int_id
+o.min.ff=long_ld
+
+o.maxn.s.int=max(int_id)
+o.maxn.s.long=max(long_ld)
+o.maxn.s.float=max(float_fd)
+o.maxn.s.double=max(double_dd)
+o.maxn.ff=string_sd
+o.maxn.ff=date_dtd
+
+o.max.s.str=max(string_sd)
+o.max.s.date=max(date_dtd)
+o.max.ff=int_id
+o.max.ff=long_ld
+
+o.countn.s.int=count(int_id)
+o.countn.s.long=count(long_ld)
+o.countn.s.float=count(float_fd)
+o.countn.s.double=count(double_dd)
+o.countn.ff=string_sd
+o.countn.ff=date_dtd
+
+o.count.s.str=count(string_sd)
+o.count.s.date=count(date_dtd)
+o.count.ff=int_id
+o.count.ff=long_ld
+
+o.uniquen.s.int=unique(int_id)
+o.uniquen.s.long=unique(long_ld)
+o.uniquen.s.float=unique(float_fd)
+o.uniquen.s.double=unique(double_dd)
+o.uniquen.ff=string_sd
+o.uniquen.ff=date_dtd
+
+o.unique.s.str=unique(string_sd)
+o.unique.s.date=unique(date_dtd)
+o.unique.ff=int_id
+o.unique.ff=long_ld
+
+o.missingn.s.int=missing(int_id)
+o.missingn.s.long=missing(long_ld)
+o.missingn.s.float=missing(float_fd)
+o.missingn.s.double=missing(double_dd)
+o.missingn.ff=string_sd
+o.missingn.ff=date_dtd
+
+o.missing.s.str=missing(string_sd)
+o.missing.s.date=missing(date_dtd)
+o.missing.ff=int_id
+o.missing.ff=long_ld
+
+o.multivalued.s.mean=mean(int_id)
+o.multivalued.ff=long_ldm
+o.multivalued.ff=string_sdm
+o.multivalued.ff=date_dtdm
+
+o.missingf.s.mean=mean(int_id)
+o.missingf.ff=date_dtd
+o.missingf.ff.date_dtd.dim=true
+o.missingf.ff=string_sd
+o.missingf.ff.string_sd.dim=true
+o.missingf.ff.string_sd.sm=true
+o.missingf.ff=date_dtdm
+o.missingf.ff.date_dtdm.sm=true

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/86d84bff/solr/contrib/analytics/src/test-files/solr/analytics/legacy/functions.txt
----------------------------------------------------------------------
diff --git a/solr/contrib/analytics/src/test-files/solr/analytics/legacy/functions.txt b/solr/contrib/analytics/src/test-files/solr/analytics/legacy/functions.txt
new file mode 100644
index 0000000..ce73583
--- /dev/null
+++ b/solr/contrib/analytics/src/test-files/solr/analytics/legacy/functions.txt
@@ -0,0 +1,57 @@
+o.ar.s.sum=sum(add(int_id,float_fd))
+o.ar.s.sumc=sum(add_if_dd)
+o.ar.s.mean=mean(add(long_ld,double_dd,float_fd))
+o.ar.s.meanc=mean(add_ldf_dd)
+
+o.mr.s.sum=sum(mult(int_id,float_fd))
+o.mr.s.sumc=sum(mult_if_dd)
+o.mr.s.mean=mean(mult(long_ld,double_dd,float_fd))
+o.mr.s.meanc=mean(mult_ldf_dd)
+
+o.dr.s.sum=sum(div(int_id,float_fd))
+o.dr.s.sumc=sum(div_if_dd)
+o.dr.s.mean=mean(div(long_ld,double_dd))
+o.dr.s.meanc=mean(div_ld_dd)
+
+o.pr.s.sum=sum(pow(int_id,float_fd))
+o.pr.s.sumc=sum(pow_if_dd)
+o.pr.s.mean=mean(pow(long_ld,double_dd))
+o.pr.s.meanc=mean(pow_ld_dd)
+
+o.nr.s.sum=sum(neg(int_id))
+o.nr.s.sumc=sum(neg_id)
+o.nr.s.mean=mean(neg(long_ld))
+o.nr.s.meanc=mean(neg_ld)
+
+o.avr.s.sum=sum(abs(neg(int_id)))
+o.avr.s.sumc=sum(int_id)
+o.avr.s.mean=mean(abs(neg(int_id)))
+o.avr.s.meanc=mean(int_id)
+
+o.cnr.s.sum=sum(8)
+o.cnr.s.sumc=sum(const_8_dd)
+o.cnr.s.mean=mean(10)
+o.cnr.s.meanc=mean(const_10_dd)
+
+o.dmr.s.median=median(date_math(date_dtd,"+2YEARS"))
+o.dmr.s.medianc=median(dm_2y_dtd)
+o.dmr.s.max=max(date_math(date_dtd,"+2MONTHS"))
+o.dmr.s.maxc=max(dm_2m_dtd)
+
+o.cdr.s.median=median(1800-06-30T23:59:59Z)
+o.cdr.s.medianc=median(const_00_dtd)
+o.cdr.s.max=max(1804-06-30T23:59:59Z)
+o.cdr.s.maxc=max(const_04_dtd)
+
+o.csr.s.min=min("this is the first")
+o.csr.s.minc=min(const_first_sd)
+o.csr.s.max=max("this is the second")
+o.csr.s.maxc=max(const_second_sd)
+
+o.cr.s.min=concat("this is the first",min(string_sd))
+o.cr.s.minc=min(concat_first_sd)
+o.cr.s.max=concat("this is the second",max(string_sd))
+o.cr.s.maxc=max(concat_second_sd)
+
+o.ms.s.min=min(miss_dd)
+o.ms.s.max=max(miss_dd)

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/86d84bff/solr/contrib/analytics/src/test-files/solr/analytics/legacy/noFacets.txt
----------------------------------------------------------------------
diff --git a/solr/contrib/analytics/src/test-files/solr/analytics/legacy/noFacets.txt b/solr/contrib/analytics/src/test-files/solr/analytics/legacy/noFacets.txt
new file mode 100644
index 0000000..84e43eb
--- /dev/null
+++ b/solr/contrib/analytics/src/test-files/solr/analytics/legacy/noFacets.txt
@@ -0,0 +1,74 @@
+o.sr.s.int_id=sum(int_id)
+o.sr.s.long_ld=sum(long_ld)
+o.sr.s.float_fd=sum(float_fd)
+o.sr.s.double_dd=sum(double_dd)
+
+o.sosr.s.int_id=sumofsquares(int_id)
+o.sosr.s.long_ld=sumofsquares(long_ld)
+o.sosr.s.float_fd=sumofsquares(float_fd)
+o.sosr.s.double_dd=sumofsquares(double_dd)
+
+o.mr.s.int_id=mean(int_id)
+o.mr.s.long_ld=mean(long_ld)
+o.mr.s.float_fd=mean(float_fd)
+o.mr.s.double_dd=mean(double_dd)
+
+o.str.s.int_id=stddev(int_id)
+o.str.s.long_ld=stddev(long_ld)
+o.str.s.float_fd=stddev(float_fd)
+o.str.s.double_dd=stddev(double_dd)
+
+o.medr.s.int_id=median(int_id)
+o.medr.s.long_ld=median(long_ld)
+o.medr.s.float_fd=median(float_fd)
+o.medr.s.double_dd=median(double_dd)
+o.medr.s.date_dtd=median(date_dtd)
+
+o.p2r.s.int_id=percentile(20,int_id)
+o.p2r.s.long_ld=percentile(20,long_ld)
+o.p2r.s.float_fd=percentile(20,float_fd)
+o.p2r.s.double_dd=percentile(20,double_dd)
+o.p2r.s.date_dtd=percentile(20,date_dtd)
+o.p2r.s.string_sd=percentile(20,string_sd)
+
+o.p6r.s.int_id=percentile(60,int_id)
+o.p6r.s.long_ld=percentile(60,long_ld)
+o.p6r.s.float_fd=percentile(60,float_fd)
+o.p6r.s.double_dd=percentile(60,double_dd)
+o.p6r.s.date_dtd=percentile(60,date_dtd)
+o.p6r.s.string_sd=percentile(60,string_sd)
+
+o.mir.s.int_id=min(int_id)
+o.mir.s.long_ld=min(long_ld)
+o.mir.s.float_fd=min(float_fd)
+o.mir.s.double_dd=min(double_dd)
+o.mir.s.date_dtd=min(date_dtd)
+o.mir.s.string_sd=min(string_sd)
+
+o.mar.s.int_id=max(int_id)
+o.mar.s.long_ld=max(long_ld)
+o.mar.s.float_fd=max(float_fd)
+o.mar.s.double_dd=max(double_dd)
+o.mar.s.date_dtd=max(date_dtd)
+o.mar.s.string_sd=max(string_sd)
+
+o.cr.s.int_id=count(int_id)
+o.cr.s.long_ld=count(long_ld)
+o.cr.s.float_fd=count(float_fd)
+o.cr.s.double_dd=count(double_dd)
+o.cr.s.date_dtd=count(date_dtd)
+o.cr.s.string_sd=count(string_sd)
+
+o.ur.s.int_id=unique(int_id)
+o.ur.s.long_ld=unique(long_ld)
+o.ur.s.float_fd=unique(float_fd)
+o.ur.s.double_dd=unique(double_dd)
+o.ur.s.date_dtd=unique(date_dtd)
+o.ur.s.string_sd=unique(string_sd)
+
+o.misr.s.int_id=missing(int_id)
+o.misr.s.long_ld=missing(long_ld)
+o.misr.s.float_fd=missing(float_fd)
+o.misr.s.double_dd=missing(double_dd)
+o.misr.s.date_dtd=missing(date_dtd)
+o.misr.s.string_sd=missing(string_sd)

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/86d84bff/solr/contrib/analytics/src/test-files/solr/analytics/legacy/queryFacets.txt
----------------------------------------------------------------------
diff --git a/solr/contrib/analytics/src/test-files/solr/analytics/legacy/queryFacets.txt b/solr/contrib/analytics/src/test-files/solr/analytics/legacy/queryFacets.txt
new file mode 100644
index 0000000..84d8fc6
--- /dev/null
+++ b/solr/contrib/analytics/src/test-files/solr/analytics/legacy/queryFacets.txt
@@ -0,0 +1,27 @@
+o.ir.s.sum=sum(int_id)
+o.ir.s.mean=mean(int_id)
+o.ir.s.median=median(int_id)
+o.ir.s.percentile_8=percentile(8,int_id)
+o.ir.ff=string_sd
+o.ir.ff.string_sd.h=true
+o.ir.qf=float1
+o.ir.qf.float1.q=float_fd:[* TO 50]
+o.ir.qf=float2
+o.ir.qf.float2.q=float_fd:[* TO 30]
+
+o.lr.s.sum=sum(long_ld)
+o.lr.s.mean=mean(long_ld)
+o.lr.s.median=median(long_ld)
+o.lr.s.percentile_8=percentile(8,long_ld)
+o.lr.qf=string
+o.lr.qf.string.q=string_sd:abc1
+o.lr.qf.string.q=string_sd:abc2
+
+o.fr.s.sum=sum(float_fd)
+o.fr.s.mean=mean(float_fd)
+o.fr.s.median=median(float_fd)
+o.fr.s.percentile_8=percentile(8,float_fd)
+o.fr.qf=lad
+o.fr.qf.lad.q=long_ld:[20 TO *]
+o.fr.qf.lad.q=long_ld:[30 TO *]
+o.fr.qf.lad.q=double_dd:[* TO 50]

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/86d84bff/solr/contrib/analytics/src/test-files/solr/analytics/legacy/rangeFacets.txt
----------------------------------------------------------------------
diff --git a/solr/contrib/analytics/src/test-files/solr/analytics/legacy/rangeFacets.txt b/solr/contrib/analytics/src/test-files/solr/analytics/legacy/rangeFacets.txt
new file mode 100644
index 0000000..29aae5d
--- /dev/null
+++ b/solr/contrib/analytics/src/test-files/solr/analytics/legacy/rangeFacets.txt
@@ -0,0 +1,161 @@
+o.ri.s.sum=sum(int_id)
+o.ri.s.mean=mean(int_id)
+o.ri.s.median=median(int_id)
+o.ri.s.count=count(int_id)
+o.ri.s.sumOfSquares=sumofsquares(int_id)
+o.ri.rf=long_ld
+o.ri.rf.long_ld.st=5
+o.ri.rf.long_ld.e=30
+o.ri.rf.long_ld.g=5
+o.ri.rf.long_ld.ib=lower
+o.ri.rf.long_ld.or=all
+o.ri.rf=double_dd
+o.ri.rf.double_dd.st=3
+o.ri.rf.double_dd.e=39
+o.ri.rf.double_dd.g=7
+o.ri.rf.double_dd.ib=upper
+o.ri.rf.double_dd.ib=outer
+o.ri.rf.double_dd.or=all
+o.ri.rf=date_dtd
+o.ri.rf.date_dtd.st=1007-01-01T23:59:59Z
+o.ri.rf.date_dtd.e=1044-01-01T23:59:59Z
+o.ri.rf.date_dtd.g=+7YEARS
+o.ri.rf.date_dtd.ib=lower
+o.ri.rf.date_dtd.ib=edge
+o.ri.rf.date_dtd.ib=outer
+o.ri.rf.date_dtd.or=all
+
+o.rf.s.sum=sum(float_fd)
+o.rf.s.mean=mean(float_fd)
+o.rf.s.median=median(float_fd)
+o.rf.s.count=count(float_fd)
+o.rf.s.sumOfSquares=sumofsquares(float_fd)
+o.rf.rf=long_ld
+o.rf.rf.long_ld.st=0
+o.rf.rf.long_ld.e=29
+o.rf.rf.long_ld.g=4
+o.rf.rf.long_ld.ib=all
+o.rf.rf.long_ld.or=all
+o.rf.rf=double_dd
+o.rf.rf.double_dd.st=4
+o.rf.rf.double_dd.e=47
+o.rf.rf.double_dd.g=11
+o.rf.rf.double_dd.ib=edge
+o.rf.rf.double_dd.or=all
+o.rf.rf=date_dtd
+o.rf.rf.date_dtd.st=1004-01-01T23:59:59Z
+o.rf.rf.date_dtd.e=1046-01-01T23:59:59Z
+o.rf.rf.date_dtd.g=+5YEARS
+o.rf.rf.date_dtd.ib=upper
+o.rf.rf.date_dtd.ib=edge
+o.rf.rf.date_dtd.or=all
+
+o.hi.s.sum=sum(int_id)
+o.hi.s.mean=mean(int_id)
+o.hi.s.median=median(int_id)
+o.hi.s.count=count(int_id)
+o.hi.s.sumOfSquares=sumofsquares(int_id)
+o.hi.rf=long_ld
+o.hi.rf.long_ld.st=5
+o.hi.rf.long_ld.e=30
+o.hi.rf.long_ld.g=5
+o.hi.rf.long_ld.he=true
+o.hi.rf.long_ld.ib=lower
+o.hi.rf.long_ld.or=all
+o.hi.rf=double_dd
+o.hi.rf.double_dd.st=3
+o.hi.rf.double_dd.e=39
+o.hi.rf.double_dd.g=7
+o.hi.rf.double_dd.he=true
+o.hi.rf.double_dd.ib=upper
+o.hi.rf.double_dd.ib=outer
+o.hi.rf.double_dd.or=all
+o.hi.rf=date_dtd
+o.hi.rf.date_dtd.st=1007-01-01T23:59:59Z
+o.hi.rf.date_dtd.e=1044-01-01T23:59:59Z
+o.hi.rf.date_dtd.g=+7YEARS
+o.hi.rf.date_dtd.he=true
+o.hi.rf.date_dtd.ib=lower
+o.hi.rf.date_dtd.ib=edge
+o.hi.rf.date_dtd.ib=outer
+o.hi.rf.date_dtd.or=all
+
+o.hf.s.sum=sum(float_fd)
+o.hf.s.mean=mean(float_fd)
+o.hf.s.median=median(float_fd)
+o.hf.s.count=count(float_fd)
+o.hf.s.sumOfSquares=sumofsquares(float_fd)
+o.hf.rf=long_ld
+o.hf.rf.long_ld.st=0
+o.hf.rf.long_ld.e=29
+o.hf.rf.long_ld.g=4
+o.hf.rf.long_ld.he=true
+o.hf.rf.long_ld.ib=all
+o.hf.rf.long_ld.or=all
+o.hf.rf=double_dd
+o.hf.rf.double_dd.st=4
+o.hf.rf.double_dd.e=47
+o.hf.rf.double_dd.g=11
+o.hf.rf.double_dd.he=true
+o.hf.rf.double_dd.ib=edge
+o.hf.rf.double_dd.or=all
+o.hf.rf=date_dtd
+o.hf.rf.date_dtd.st=1004-01-01T23:59:59Z
+o.hf.rf.date_dtd.e=1046-01-01T23:59:59Z
+o.hf.rf.date_dtd.g=+5YEARS
+o.hf.rf.date_dtd.he=true
+o.hf.rf.date_dtd.ib=upper
+o.hf.rf.date_dtd.ib=edge
+o.hf.rf.date_dtd.or=all
+
+o.mi.s.sum=sum(int_id)
+o.mi.s.mean=mean(int_id)
+o.mi.s.median=median(int_id)
+o.mi.s.count=count(int_id)
+o.mi.s.sumOfSquares=sumofsquares(int_id)
+o.mi.rf=long_ld
+o.mi.rf.long_ld.st=5
+o.mi.rf.long_ld.e=30
+o.mi.rf.long_ld.g=4,2,6,3
+o.mi.rf.long_ld.ib=lower
+o.mi.rf.long_ld.or=all
+o.mi.rf=double_dd
+o.mi.rf.double_dd.st=3
+o.mi.rf.double_dd.e=39
+o.mi.rf.double_dd.g=3,1,7
+o.mi.rf.double_dd.ib=upper
+o.mi.rf.double_dd.ib=outer
+o.mi.rf.double_dd.or=all
+o.mi.rf=date_dtd
+o.mi.rf.date_dtd.st=1007-01-01T23:59:59Z
+o.mi.rf.date_dtd.e=1044-01-01T23:59:59Z
+o.mi.rf.date_dtd.g=+2YEARS,+7YEARS
+o.mi.rf.date_dtd.ib=lower
+o.mi.rf.date_dtd.ib=edge
+o.mi.rf.date_dtd.ib=outer
+o.mi.rf.date_dtd.or=all
+
+o.mf.s.sum=sum(float_fd)
+o.mf.s.mean=mean(float_fd)
+o.mf.s.median=median(float_fd)
+o.mf.s.count=count(float_fd)
+o.mf.s.sumOfSquares=sumofsquares(float_fd)
+o.mf.rf=long_ld
+o.mf.rf.long_ld.st=0
+o.mf.rf.long_ld.e=29
+o.mf.rf.long_ld.g=1,4
+o.mf.rf.long_ld.ib=all
+o.mf.rf.long_ld.or=all
+o.mf.rf=double_dd
+o.mf.rf.double_dd.st=4
+o.mf.rf.double_dd.e=47
+o.mf.rf.double_dd.g=2,3,11
+o.mf.rf.double_dd.ib=edge
+o.mf.rf.double_dd.or=all
+o.mf.rf=date_dtd
+o.mf.rf.date_dtd.st=1004-01-01T23:59:59Z
+o.mf.rf.date_dtd.e=1046-01-01T23:59:59Z
+o.mf.rf.date_dtd.g=+4YEARS,+5YEARS
+o.mf.rf.date_dtd.ib=upper
+o.mf.rf.date_dtd.ib=edge
+o.mf.rf.date_dtd.or=all

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/86d84bff/solr/contrib/analytics/src/test-files/solr/analytics/noFacets.txt
----------------------------------------------------------------------
diff --git a/solr/contrib/analytics/src/test-files/solr/analytics/noFacets.txt b/solr/contrib/analytics/src/test-files/solr/analytics/noFacets.txt
deleted file mode 100644
index 84e43eb..0000000
--- a/solr/contrib/analytics/src/test-files/solr/analytics/noFacets.txt
+++ /dev/null
@@ -1,74 +0,0 @@
-o.sr.s.int_id=sum(int_id)
-o.sr.s.long_ld=sum(long_ld)
-o.sr.s.float_fd=sum(float_fd)
-o.sr.s.double_dd=sum(double_dd)
-
-o.sosr.s.int_id=sumofsquares(int_id)
-o.sosr.s.long_ld=sumofsquares(long_ld)
-o.sosr.s.float_fd=sumofsquares(float_fd)
-o.sosr.s.double_dd=sumofsquares(double_dd)
-
-o.mr.s.int_id=mean(int_id)
-o.mr.s.long_ld=mean(long_ld)
-o.mr.s.float_fd=mean(float_fd)
-o.mr.s.double_dd=mean(double_dd)
-
-o.str.s.int_id=stddev(int_id)
-o.str.s.long_ld=stddev(long_ld)
-o.str.s.float_fd=stddev(float_fd)
-o.str.s.double_dd=stddev(double_dd)
-
-o.medr.s.int_id=median(int_id)
-o.medr.s.long_ld=median(long_ld)
-o.medr.s.float_fd=median(float_fd)
-o.medr.s.double_dd=median(double_dd)
-o.medr.s.date_dtd=median(date_dtd)
-
-o.p2r.s.int_id=percentile(20,int_id)
-o.p2r.s.long_ld=percentile(20,long_ld)
-o.p2r.s.float_fd=percentile(20,float_fd)
-o.p2r.s.double_dd=percentile(20,double_dd)
-o.p2r.s.date_dtd=percentile(20,date_dtd)
-o.p2r.s.string_sd=percentile(20,string_sd)
-
-o.p6r.s.int_id=percentile(60,int_id)
-o.p6r.s.long_ld=percentile(60,long_ld)
-o.p6r.s.float_fd=percentile(60,float_fd)
-o.p6r.s.double_dd=percentile(60,double_dd)
-o.p6r.s.date_dtd=percentile(60,date_dtd)
-o.p6r.s.string_sd=percentile(60,string_sd)
-
-o.mir.s.int_id=min(int_id)
-o.mir.s.long_ld=min(long_ld)
-o.mir.s.float_fd=min(float_fd)
-o.mir.s.double_dd=min(double_dd)
-o.mir.s.date_dtd=min(date_dtd)
-o.mir.s.string_sd=min(string_sd)
-
-o.mar.s.int_id=max(int_id)
-o.mar.s.long_ld=max(long_ld)
-o.mar.s.float_fd=max(float_fd)
-o.mar.s.double_dd=max(double_dd)
-o.mar.s.date_dtd=max(date_dtd)
-o.mar.s.string_sd=max(string_sd)
-
-o.cr.s.int_id=count(int_id)
-o.cr.s.long_ld=count(long_ld)
-o.cr.s.float_fd=count(float_fd)
-o.cr.s.double_dd=count(double_dd)
-o.cr.s.date_dtd=count(date_dtd)
-o.cr.s.string_sd=count(string_sd)
-
-o.ur.s.int_id=unique(int_id)
-o.ur.s.long_ld=unique(long_ld)
-o.ur.s.float_fd=unique(float_fd)
-o.ur.s.double_dd=unique(double_dd)
-o.ur.s.date_dtd=unique(date_dtd)
-o.ur.s.string_sd=unique(string_sd)
-
-o.misr.s.int_id=missing(int_id)
-o.misr.s.long_ld=missing(long_ld)
-o.misr.s.float_fd=missing(float_fd)
-o.misr.s.double_dd=missing(double_dd)
-o.misr.s.date_dtd=missing(date_dtd)
-o.misr.s.string_sd=missing(string_sd)

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/86d84bff/solr/contrib/analytics/src/test-files/solr/analytics/queryFacets.txt
----------------------------------------------------------------------
diff --git a/solr/contrib/analytics/src/test-files/solr/analytics/queryFacets.txt b/solr/contrib/analytics/src/test-files/solr/analytics/queryFacets.txt
deleted file mode 100644
index 84d8fc6..0000000
--- a/solr/contrib/analytics/src/test-files/solr/analytics/queryFacets.txt
+++ /dev/null
@@ -1,27 +0,0 @@
-o.ir.s.sum=sum(int_id)
-o.ir.s.mean=mean(int_id)
-o.ir.s.median=median(int_id)
-o.ir.s.percentile_8=percentile(8,int_id)
-o.ir.ff=string_sd
-o.ir.ff.string_sd.h=true
-o.ir.qf=float1
-o.ir.qf.float1.q=float_fd:[* TO 50]
-o.ir.qf=float2
-o.ir.qf.float2.q=float_fd:[* TO 30]
-
-o.lr.s.sum=sum(long_ld)
-o.lr.s.mean=mean(long_ld)
-o.lr.s.median=median(long_ld)
-o.lr.s.percentile_8=percentile(8,long_ld)
-o.lr.qf=string
-o.lr.qf.string.q=string_sd:abc1
-o.lr.qf.string.q=string_sd:abc2
-
-o.fr.s.sum=sum(float_fd)
-o.fr.s.mean=mean(float_fd)
-o.fr.s.median=median(float_fd)
-o.fr.s.percentile_8=percentile(8,float_fd)
-o.fr.qf=lad
-o.fr.qf.lad.q=long_ld:[20 TO *]
-o.fr.qf.lad.q=long_ld:[30 TO *]
-o.fr.qf.lad.q=double_dd:[* TO 50]

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/86d84bff/solr/contrib/analytics/src/test-files/solr/analytics/rangeFacets.txt
----------------------------------------------------------------------
diff --git a/solr/contrib/analytics/src/test-files/solr/analytics/rangeFacets.txt b/solr/contrib/analytics/src/test-files/solr/analytics/rangeFacets.txt
deleted file mode 100644
index 29aae5d..0000000
--- a/solr/contrib/analytics/src/test-files/solr/analytics/rangeFacets.txt
+++ /dev/null
@@ -1,161 +0,0 @@
-o.ri.s.sum=sum(int_id)
-o.ri.s.mean=mean(int_id)
-o.ri.s.median=median(int_id)
-o.ri.s.count=count(int_id)
-o.ri.s.sumOfSquares=sumofsquares(int_id)
-o.ri.rf=long_ld
-o.ri.rf.long_ld.st=5
-o.ri.rf.long_ld.e=30
-o.ri.rf.long_ld.g=5
-o.ri.rf.long_ld.ib=lower
-o.ri.rf.long_ld.or=all
-o.ri.rf=double_dd
-o.ri.rf.double_dd.st=3
-o.ri.rf.double_dd.e=39
-o.ri.rf.double_dd.g=7
-o.ri.rf.double_dd.ib=upper
-o.ri.rf.double_dd.ib=outer
-o.ri.rf.double_dd.or=all
-o.ri.rf=date_dtd
-o.ri.rf.date_dtd.st=1007-01-01T23:59:59Z
-o.ri.rf.date_dtd.e=1044-01-01T23:59:59Z
-o.ri.rf.date_dtd.g=+7YEARS
-o.ri.rf.date_dtd.ib=lower
-o.ri.rf.date_dtd.ib=edge
-o.ri.rf.date_dtd.ib=outer
-o.ri.rf.date_dtd.or=all
-
-o.rf.s.sum=sum(float_fd)
-o.rf.s.mean=mean(float_fd)
-o.rf.s.median=median(float_fd)
-o.rf.s.count=count(float_fd)
-o.rf.s.sumOfSquares=sumofsquares(float_fd)
-o.rf.rf=long_ld
-o.rf.rf.long_ld.st=0
-o.rf.rf.long_ld.e=29
-o.rf.rf.long_ld.g=4
-o.rf.rf.long_ld.ib=all
-o.rf.rf.long_ld.or=all
-o.rf.rf=double_dd
-o.rf.rf.double_dd.st=4
-o.rf.rf.double_dd.e=47
-o.rf.rf.double_dd.g=11
-o.rf.rf.double_dd.ib=edge
-o.rf.rf.double_dd.or=all
-o.rf.rf=date_dtd
-o.rf.rf.date_dtd.st=1004-01-01T23:59:59Z
-o.rf.rf.date_dtd.e=1046-01-01T23:59:59Z
-o.rf.rf.date_dtd.g=+5YEARS
-o.rf.rf.date_dtd.ib=upper
-o.rf.rf.date_dtd.ib=edge
-o.rf.rf.date_dtd.or=all
-
-o.hi.s.sum=sum(int_id)
-o.hi.s.mean=mean(int_id)
-o.hi.s.median=median(int_id)
-o.hi.s.count=count(int_id)
-o.hi.s.sumOfSquares=sumofsquares(int_id)
-o.hi.rf=long_ld
-o.hi.rf.long_ld.st=5
-o.hi.rf.long_ld.e=30
-o.hi.rf.long_ld.g=5
-o.hi.rf.long_ld.he=true
-o.hi.rf.long_ld.ib=lower
-o.hi.rf.long_ld.or=all
-o.hi.rf=double_dd
-o.hi.rf.double_dd.st=3
-o.hi.rf.double_dd.e=39
-o.hi.rf.double_dd.g=7
-o.hi.rf.double_dd.he=true
-o.hi.rf.double_dd.ib=upper
-o.hi.rf.double_dd.ib=outer
-o.hi.rf.double_dd.or=all
-o.hi.rf=date_dtd
-o.hi.rf.date_dtd.st=1007-01-01T23:59:59Z
-o.hi.rf.date_dtd.e=1044-01-01T23:59:59Z
-o.hi.rf.date_dtd.g=+7YEARS
-o.hi.rf.date_dtd.he=true
-o.hi.rf.date_dtd.ib=lower
-o.hi.rf.date_dtd.ib=edge
-o.hi.rf.date_dtd.ib=outer
-o.hi.rf.date_dtd.or=all
-
-o.hf.s.sum=sum(float_fd)
-o.hf.s.mean=mean(float_fd)
-o.hf.s.median=median(float_fd)
-o.hf.s.count=count(float_fd)
-o.hf.s.sumOfSquares=sumofsquares(float_fd)
-o.hf.rf=long_ld
-o.hf.rf.long_ld.st=0
-o.hf.rf.long_ld.e=29
-o.hf.rf.long_ld.g=4
-o.hf.rf.long_ld.he=true
-o.hf.rf.long_ld.ib=all
-o.hf.rf.long_ld.or=all
-o.hf.rf=double_dd
-o.hf.rf.double_dd.st=4
-o.hf.rf.double_dd.e=47
-o.hf.rf.double_dd.g=11
-o.hf.rf.double_dd.he=true
-o.hf.rf.double_dd.ib=edge
-o.hf.rf.double_dd.or=all
-o.hf.rf=date_dtd
-o.hf.rf.date_dtd.st=1004-01-01T23:59:59Z
-o.hf.rf.date_dtd.e=1046-01-01T23:59:59Z
-o.hf.rf.date_dtd.g=+5YEARS
-o.hf.rf.date_dtd.he=true
-o.hf.rf.date_dtd.ib=upper
-o.hf.rf.date_dtd.ib=edge
-o.hf.rf.date_dtd.or=all
-
-o.mi.s.sum=sum(int_id)
-o.mi.s.mean=mean(int_id)
-o.mi.s.median=median(int_id)
-o.mi.s.count=count(int_id)
-o.mi.s.sumOfSquares=sumofsquares(int_id)
-o.mi.rf=long_ld
-o.mi.rf.long_ld.st=5
-o.mi.rf.long_ld.e=30
-o.mi.rf.long_ld.g=4,2,6,3
-o.mi.rf.long_ld.ib=lower
-o.mi.rf.long_ld.or=all
-o.mi.rf=double_dd
-o.mi.rf.double_dd.st=3
-o.mi.rf.double_dd.e=39
-o.mi.rf.double_dd.g=3,1,7
-o.mi.rf.double_dd.ib=upper
-o.mi.rf.double_dd.ib=outer
-o.mi.rf.double_dd.or=all
-o.mi.rf=date_dtd
-o.mi.rf.date_dtd.st=1007-01-01T23:59:59Z
-o.mi.rf.date_dtd.e=1044-01-01T23:59:59Z
-o.mi.rf.date_dtd.g=+2YEARS,+7YEARS
-o.mi.rf.date_dtd.ib=lower
-o.mi.rf.date_dtd.ib=edge
-o.mi.rf.date_dtd.ib=outer
-o.mi.rf.date_dtd.or=all
-
-o.mf.s.sum=sum(float_fd)
-o.mf.s.mean=mean(float_fd)
-o.mf.s.median=median(float_fd)
-o.mf.s.count=count(float_fd)
-o.mf.s.sumOfSquares=sumofsquares(float_fd)
-o.mf.rf=long_ld
-o.mf.rf.long_ld.st=0
-o.mf.rf.long_ld.e=29
-o.mf.rf.long_ld.g=1,4
-o.mf.rf.long_ld.ib=all
-o.mf.rf.long_ld.or=all
-o.mf.rf=double_dd
-o.mf.rf.double_dd.st=4
-o.mf.rf.double_dd.e=47
-o.mf.rf.double_dd.g=2,3,11
-o.mf.rf.double_dd.ib=edge
-o.mf.rf.double_dd.or=all
-o.mf.rf=date_dtd
-o.mf.rf.date_dtd.st=1004-01-01T23:59:59Z
-o.mf.rf.date_dtd.e=1046-01-01T23:59:59Z
-o.mf.rf.date_dtd.g=+4YEARS,+5YEARS
-o.mf.rf.date_dtd.ib=upper
-o.mf.rf.date_dtd.ib=edge
-o.mf.rf.date_dtd.or=all

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/86d84bff/solr/contrib/analytics/src/test-files/solr/collection1/conf/schema-analytics.xml
----------------------------------------------------------------------
diff --git a/solr/contrib/analytics/src/test-files/solr/collection1/conf/schema-analytics.xml b/solr/contrib/analytics/src/test-files/solr/collection1/conf/schema-analytics.xml
index 527e66a..6570416 100644
--- a/solr/contrib/analytics/src/test-files/solr/collection1/conf/schema-analytics.xml
+++ b/solr/contrib/analytics/src/test-files/solr/collection1/conf/schema-analytics.xml
@@ -25,7 +25,7 @@
 
   -->
 
-<schema name="schema-analytics" version="1.0">
+<schema name="schema-analytics" version="1.6">
 
 
   <!-- field type definitions... note that the "name" attribute is
@@ -39,50 +39,89 @@
        These are provided more for backward compatability, allowing one
        to create a schema that matches an existing lucene index.
   -->
-  <fieldType name="int" class="${solr.tests.IntegerFieldType}" precisionStep="0" omitNorms="true" positionIncrementGap="0"/>
-  <fieldType name="float" class="${solr.tests.FloatFieldType}" precisionStep="0" omitNorms="true" positionIncrementGap="0"/>
-  <fieldType name="long" class="${solr.tests.LongFieldType}" precisionStep="0" omitNorms="true" positionIncrementGap="0"/>
-  <fieldType name="double" class="${solr.tests.DoubleFieldType}" precisionStep="0" omitNorms="true" positionIncrementGap="0"/>
+  <fieldType name="int" class="${solr.tests.IntegerFieldType}" docValues="true" precisionStep="0" omitNorms="true" positionIncrementGap="0"/>
+  <fieldType name="float" class="${solr.tests.FloatFieldType}" docValues="true" precisionStep="0" omitNorms="true" positionIncrementGap="0"/>
+  <fieldType name="long" class="${solr.tests.LongFieldType}" docValues="true" precisionStep="0" omitNorms="true" positionIncrementGap="0"/>
+  <fieldType name="double" class="${solr.tests.DoubleFieldType}" docValues="true" precisionStep="0" omitNorms="true" positionIncrementGap="0"/>
   <!-- format for date is 1995-12-31T23:59:59.999Z and only the fractional
        seconds part (.999) is optional.
     -->
-  <fieldType name="date" class="${solr.tests.DateFieldType}" precisionStep="0" omitNorms="true" positionIncrementGap="0"/>
-
-  <fieldType name="boolean" class="solr.BoolField"/>
-  <fieldType name="string" class="solr.StrField"/>
-
-  <fieldType name="uuid" class="solr.UUIDField"/>
-
-
-  <field name="id" type="string" docValues="true" multiValued="false" required="true"/>
-
-  <field name="floatdv" type="float" indexed="false" stored="false" docValues="true" default="1"/>
-  <field name="intdv" type="int" indexed="false" stored="false" docValues="true" default="2"/>
-  <field name="doubledv" type="double" indexed="false" stored="false" docValues="true" default="3"/>
-  <field name="longdv" type="long" indexed="false" stored="false" docValues="true" default="4"/>
-  <field name="datedv" type="date" indexed="false" stored="false" docValues="true" default="1995-12-31T23:59:59.999Z"/>
-
-  <field name="stringdv" type="string" indexed="false" stored="false" docValues="true" default="solr"/>
-  <field name="stringdvm" type="string" indexed="false" stored="false" docValues="true" default="solr" multiValued="true"/>
-
-  <dynamicField name="*_i" type="int" indexed="true" stored="true" docValues="false" multiValued="false"/>
-  <dynamicField name="*_id" type="int" indexed="true" stored="true" docValues="true" multiValued="false"/>
-  <dynamicField name="*_idm" type="int" indexed="true" stored="true" docValues="true" multiValued="true"/>
-  <dynamicField name="*_l" type="long" indexed="true" stored="true" docValues="false" multiValued="false"/>
-  <dynamicField name="*_ld" type="long" indexed="true" stored="true" docValues="true" multiValued="false"/>
-  <dynamicField name="*_ldm" type="long" indexed="true" stored="true" docValues="true" multiValued="true"/>
-  <dynamicField name="*_f" type="float" indexed="true" stored="true" docValues="false" multiValued="false"/>
-  <dynamicField name="*_fd" type="float" indexed="true" stored="true" docValues="true" multiValued="false"/>
-  <dynamicField name="*_fdm" type="float" indexed="true" stored="true" docValues="true" multiValued="true"/>
-  <dynamicField name="*_d" type="double" indexed="true" stored="true" docValues="false" multiValued="false"/>
-  <dynamicField name="*_dd" type="double" indexed="true" stored="true" docValues="true" multiValued="false"/>
-  <dynamicField name="*_ddm" type="double" indexed="true" stored="true" docValues="true" multiValued="true"/>
-  <dynamicField name="*_dt" type="date" indexed="true" stored="true" docValues="false" multiValued="false"/>
-  <dynamicField name="*_dtd" type="date" indexed="true" stored="true" docValues="true" multiValued="false"/>
-  <dynamicField name="*_dtdm" type="date" indexed="true" stored="true" docValues="true" multiValued="true"/>
-  <dynamicField name="*_s" type="string" indexed="true" stored="true" docValues="false" multiValued="false"/>
-  <dynamicField name="*_sd" type="string" indexed="true" stored="true" docValues="true" multiValued="false"/>
-  <dynamicField name="*_sdm" type="string" indexed="true" stored="true" docValues="true" multiValued="true"/>
+  <fieldType name="date" class="${solr.tests.DateFieldType}" docValues="true" precisionStep="0" omitNorms="true" positionIncrementGap="0"/>
+  
+  <!-- Numeric Trie Fields -->
+  <fieldType name="int_trie" class="solr.TrieIntField" docValues="true" precisionStep="0" omitNorms="true" positionIncrementGap="0"/>
+  <fieldType name="float_trie" class="solr.TrieFloatField" docValues="true" precisionStep="0" omitNorms="true" positionIncrementGap="0"/>
+  <fieldType name="long_trie" class="solr.TrieLongField" docValues="true" precisionStep="0" omitNorms="true" positionIncrementGap="0"/>
+  <fieldType name="double_trie" class="solr.TrieDoubleField" docValues="true" precisionStep="0" omitNorms="true" positionIncrementGap="0"/>
+  <fieldType name="date_trie" class="solr.TrieDateField" docValues="true" precisionStep="0" omitNorms="true" positionIncrementGap="0"/>
+  
+  <!-- Numeric Trie Fields -->
+  <fieldType name="int_pnt" class="solr.IntPointField" docValues="true" />
+  <fieldType name="float_pnt" class="solr.FloatPointField" docValues="true" />
+  <fieldType name="long_pnt" class="solr.LongPointField" docValues="true" />
+  <fieldType name="double_pnt" class="solr.DoublePointField" docValues="true" />
+  <fieldType name="date_pnt" class="solr.DatePointField" docValues="true" />
+
+  <fieldType name="boolean" class="solr.BoolField" docValues="true"/>
+  <fieldType name="string" class="solr.StrField" docValues="true"/>
+
+
+  <field name="id" type="string" multiValued="false" required="true"/>
+
+  <dynamicField name="*_b" type="boolean" indexed="true" stored="true" multiValued="false"/>
+  <dynamicField name="*_bm" type="boolean" indexed="true" stored="true" multiValued="true"/>
+  <dynamicField name="*_bd" type="boolean" indexed="true" stored="true" multiValued="false"/>
+  <dynamicField name="*_bdm" type="boolean" indexed="true" stored="true" multiValued="true"/>
+  
+  <dynamicField name="*_i" type="int" indexed="true" stored="true" multiValued="false"/>
+  <dynamicField name="*_im" type="int" indexed="true" stored="true" multiValued="true"/>
+  <dynamicField name="*_i_t" type="int_trie" indexed="true" stored="true" multiValued="false"/>
+  <dynamicField name="*_im_t" type="int_trie" indexed="true" stored="true" multiValued="true"/>
+  <dynamicField name="*_i_p" type="int_pnt" indexed="true" stored="true" multiValued="false"/>
+  <dynamicField name="*_im_p" type="int_pnt" indexed="true" stored="true" multiValued="true"/>
+  <dynamicField name="*_id" type="int" indexed="true" stored="true" multiValued="false"/>
+  <dynamicField name="*_idm" type="int" indexed="true" stored="true" multiValued="true"/>
+  
+  <dynamicField name="*_l" type="long" indexed="true" stored="true" multiValued="false"/>
+  <dynamicField name="*_lm" type="long" indexed="true" stored="true" multiValued="true"/>
+  <dynamicField name="*_l_t" type="long_trie" indexed="true" stored="true" multiValued="false"/>
+  <dynamicField name="*_lm_t" type="long_trie" indexed="true" stored="true" multiValued="true"/>
+  <dynamicField name="*_l_p" type="long_pnt" indexed="true" stored="true" multiValued="false"/>
+  <dynamicField name="*_lm_p" type="long_pnt" indexed="true" stored="true" multiValued="true"/>
+  <dynamicField name="*_ld" type="long" indexed="true" stored="true" multiValued="false"/>
+  <dynamicField name="*_ldm" type="long" indexed="true" stored="true" multiValued="true"/>
+  
+  <dynamicField name="*_f" type="float" indexed="true" stored="true" multiValued="false"/>
+  <dynamicField name="*_fm" type="float" indexed="true" stored="true" multiValued="true"/>
+  <dynamicField name="*_f_t" type="float_trie" indexed="true" stored="true" multiValued="false"/>
+  <dynamicField name="*_fm_t" type="float_trie" indexed="true" stored="true" multiValued="true"/>
+  <dynamicField name="*_f_p" type="float_pnt" indexed="true" stored="true" multiValued="false"/>
+  <dynamicField name="*_fm_p" type="float_pnt" indexed="true" stored="true" multiValued="true"/>
+  <dynamicField name="*_fd" type="float" indexed="true" stored="true" multiValued="false"/>
+  <dynamicField name="*_fdm" type="float" indexed="true" stored="true" multiValued="true"/>
+  
+  <dynamicField name="*_d" type="double" indexed="true" stored="true" multiValued="false"/>
+  <dynamicField name="*_dm" type="double" indexed="true" stored="true" multiValued="true"/>
+  <dynamicField name="*_d_t" type="double_trie" indexed="true" stored="true" multiValued="false"/>
+  <dynamicField name="*_dm_t" type="double_trie" indexed="true" stored="true" multiValued="true"/>
+  <dynamicField name="*_d_p" type="double_pnt" indexed="true" stored="true" multiValued="false"/>
+  <dynamicField name="*_dm_p" type="double_pnt" indexed="true" stored="true" multiValued="true"/>
+  <dynamicField name="*_dd" type="double" indexed="true" stored="true" multiValued="false"/>
+  <dynamicField name="*_ddm" type="double" indexed="true" stored="true" multiValued="true"/>
+  
+  <dynamicField name="*_dt" type="date" indexed="true" stored="true" multiValued="false"/>
+  <dynamicField name="*_dtm" type="date" indexed="true" stored="true" multiValued="true"/>
+  <dynamicField name="*_dt_t" type="date_trie" indexed="true" stored="true" multiValued="false"/>
+  <dynamicField name="*_dtm_t" type="date_trie" indexed="true" stored="true" multiValued="true"/>
+  <dynamicField name="*_dt_p" type="date_pnt" indexed="true" stored="true" multiValued="false"/>
+  <dynamicField name="*_dtm_p" type="date_pnt" indexed="true" stored="true" multiValued="true"/>
+  <dynamicField name="*_dtd" type="date" indexed="true" stored="true" multiValued="false"/>
+  <dynamicField name="*_dtdm" type="date" indexed="true" stored="true" multiValued="true"/>
+  
+  <dynamicField name="*_s" type="string" indexed="true" stored="true" multiValued="false"/>
+  <dynamicField name="*_sm" type="string" indexed="true" stored="true" multiValued="true"/>
+  <dynamicField name="*_sd" type="string" indexed="true" stored="true" multiValued="false"/>
+  <dynamicField name="*_sdm" type="string" indexed="true" stored="true" multiValued="true"/>
 
 
   <uniqueKey>id</uniqueKey>

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/86d84bff/solr/contrib/analytics/src/test-files/solr/configsets/cloud-analytics/conf/schema.xml
----------------------------------------------------------------------
diff --git a/solr/contrib/analytics/src/test-files/solr/configsets/cloud-analytics/conf/schema.xml b/solr/contrib/analytics/src/test-files/solr/configsets/cloud-analytics/conf/schema.xml
index 0fac17f..cb9ad13 100644
--- a/solr/contrib/analytics/src/test-files/solr/configsets/cloud-analytics/conf/schema.xml
+++ b/solr/contrib/analytics/src/test-files/solr/configsets/cloud-analytics/conf/schema.xml
@@ -16,18 +16,18 @@
  limitations under the License.
 -->
 
-<!-- The Solr schema file for cloud analytics, version 1.0  -->
+<!-- The Solr schema file for cloud analytics, version 1.6  -->
 
-<schema name="cloud-analytics" version="1.0">
+<schema name="cloud-analytics" version="1.6">
 
-  <fieldType name="boolean" class="solr.BoolField" sortMissingLast="true"/>
-  <fieldType name="string" class="solr.StrField" sortMissingLast="true"/>
+  <fieldType name="boolean" class="solr.BoolField" docValues="true" sortMissingLast="true"/>
+  <fieldType name="string" class="solr.StrField" docValues="true" sortMissingLast="true"/>
   
-  <fieldType name="int" class="${solr.tests.IntegerFieldType}" precisionStep="0" omitNorms="true" positionIncrementGap="0" />
-  <fieldType name="float" class="${solr.tests.FloatFieldType}" precisionStep="0" omitNorms="true" positionIncrementGap="0" />
-  <fieldType name="long" class="${solr.tests.LongFieldType}" precisionStep="0" omitNorms="true" positionIncrementGap="0"/>
-  <fieldType name="double" class="${solr.tests.DoubleFieldType}" precisionStep="0" omitNorms="true" positionIncrementGap="0"/>
-  <fieldType name="date" class="${solr.tests.DateFieldType}" precisionStep="0" omitNorms="true" positionIncrementGap="0" />
+  <fieldType name="int" class="${solr.tests.IntegerFieldType}" docValues="true" precisionStep="0" omitNorms="true" positionIncrementGap="0" />
+  <fieldType name="float" class="${solr.tests.FloatFieldType}" docValues="true" precisionStep="0" omitNorms="true" positionIncrementGap="0" />
+  <fieldType name="long" class="${solr.tests.LongFieldType}" docValues="true" precisionStep="0" omitNorms="true" positionIncrementGap="0"/>
+  <fieldType name="double" class="${solr.tests.DoubleFieldType}" docValues="true" precisionStep="0" omitNorms="true" positionIncrementGap="0"/>
+  <fieldType name="date" class="${solr.tests.DateFieldType}" docValues="true" precisionStep="0" omitNorms="true" positionIncrementGap="0" />
 
   <field name="id" type="string" indexed="true" stored="true" multiValued="false" required="true"/>
 
@@ -39,20 +39,40 @@
   <field name="_route_" type="string" indexed="true" stored="true" multiValued="false"/>
 
   <!-- dynamic fields with doc-values (for analytics) -->
-  <dynamicField name="*_id"  type="int" docValues="true"    indexed="true"  stored="true"/>
-  <dynamicField name="*_idm" type="int" docValues="true"    indexed="true"  stored="true"  multiValued="true"/>
-  <dynamicField name="*_sd"  type="string" docValues="true"  indexed="true"  stored="true" />
-  <dynamicField name="*_sdm" type="string" docValues="true"  indexed="true"  stored="true" multiValued="true"/>
-  <dynamicField name="*_ld"  type="long" docValues="true"   indexed="true"  stored="true"/>
-  <dynamicField name="*_ldm" type="long" docValues="true"   indexed="true"  stored="true"  multiValued="true"/>
-  <dynamicField name="*_bd"  type="boolean" docValues="true" indexed="true" stored="true"/>
-  <dynamicField name="*_bdm" type="boolean" docValues="true" indexed="true" stored="true"  multiValued="true"/>
-  <dynamicField name="*_fd"  type="float" docValues="true"  indexed="true"  stored="true"/>
-  <dynamicField name="*_fdm" type="float" docValues="true"  indexed="true"  stored="true"  multiValued="true"/>
-  <dynamicField name="*_dd"  type="double" docValues="true" indexed="true"  stored="true"/>
-  <dynamicField name="*_ddm" type="double" docValues="true" indexed="true"  stored="true"  multiValued="true"/>
-  <dynamicField name="*_dtd"  type="date" docValues="true" indexed="true"  stored="true"/>
-  <dynamicField name="*_dtdm" type="date" docValues="true" indexed="true"  stored="true"  multiValued="true"/>
+  <dynamicField name="*_i"  type="int" indexed="true" stored="true"/>
+  <dynamicField name="*_im" type="int" indexed="true" stored="true" multiValued="true"/>
+  <dynamicField name="*_id"  type="int" indexed="true" stored="true"/>
+  <dynamicField name="*_idm" type="int" indexed="true" stored="true" multiValued="true"/>
+  
+  <dynamicField name="*_s"  type="string" indexed="true" stored="true" />
+  <dynamicField name="*_sm" type="string" indexed="true" stored="true" multiValued="true"/>
+  <dynamicField name="*_sd"  type="string" indexed="true" stored="true" />
+  <dynamicField name="*_sdm" type="string" indexed="true" stored="true" multiValued="true"/>
+  
+  <dynamicField name="*_l"  type="long" indexed="true" stored="true"/>
+  <dynamicField name="*_lm" type="long" indexed="true" stored="true" multiValued="true"/>
+  <dynamicField name="*_ld"  type="long" indexed="true" stored="true"/>
+  <dynamicField name="*_ldm" type="long" indexed="true" stored="true" multiValued="true"/>
+  
+  <dynamicField name="*_b"  type="boolean" indexed="true" stored="true"/>
+  <dynamicField name="*_bm" type="boolean" indexed="true" stored="true" multiValued="true"/>
+  <dynamicField name="*_bd"  type="boolean" indexed="true" stored="true"/>
+  <dynamicField name="*_bdm" type="boolean" indexed="true" stored="true" multiValued="true"/>
+  
+  <dynamicField name="*_f"  type="float" indexed="true" stored="true"/>
+  <dynamicField name="*_fm" type="float" indexed="true" stored="true" multiValued="true"/>
+  <dynamicField name="*_fd"  type="float" indexed="true" stored="true"/>
+  <dynamicField name="*_fdm" type="float" indexed="true" stored="true" multiValued="true"/>
+  
+  <dynamicField name="*_d"  type="double" indexed="true" stored="true"/>
+  <dynamicField name="*_dm" type="double" indexed="true" stored="true" multiValued="true"/>
+  <dynamicField name="*_dd"  type="double" indexed="true" stored="true"/>
+  <dynamicField name="*_ddm" type="double" indexed="true" stored="true" multiValued="true"/>
+  
+  <dynamicField name="*_dt" type="date" indexed="true" stored="true"/>
+  <dynamicField name="*_dtm" type="date" indexed="true" stored="true" multiValued="true"/>
+  <dynamicField name="*_dtd" type="date" indexed="true" stored="true"/>
+  <dynamicField name="*_dtdm" type="date" indexed="true" stored="true" multiValued="true"/>
 
   <uniqueKey>id</uniqueKey>
 </schema>


Mime
View raw message