lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From da...@apache.org
Subject [01/56] lucene-solr:jira/gradle: Add :solr:contrib:analytics module
Date Fri, 02 Nov 2018 11:16:10 GMT
Repository: lucene-solr
Updated Branches:
  refs/heads/jira/gradle f349c6a73 -> 887b80895


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/f0366b94/solr/contrib/analytics/src/test/org/apache/solr/analytics/value/CastingStringValueTest.java
----------------------------------------------------------------------
diff --git a/solr/contrib/analytics/src/test/org/apache/solr/analytics/value/CastingStringValueTest.java b/solr/contrib/analytics/src/test/org/apache/solr/analytics/value/CastingStringValueTest.java
deleted file mode 100644
index 3286a15..0000000
--- a/solr/contrib/analytics/src/test/org/apache/solr/analytics/value/CastingStringValueTest.java
+++ /dev/null
@@ -1,120 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.solr.analytics.value;
-
-import java.util.Arrays;
-import java.util.Iterator;
-
-import org.apache.solr.SolrTestCaseJ4;
-import org.apache.solr.analytics.value.AnalyticsValueStream.ExpressionType;
-import org.apache.solr.analytics.value.FillableTestValue.TestStringValue;
-import org.apache.solr.analytics.value.constant.ConstantStringValue;
-import org.junit.Test;
-
-public class CastingStringValueTest extends SolrTestCaseJ4 {
-
-  @Test
-  public void objectCastingTest() {
-    TestStringValue val = new TestStringValue();
-    
-    assertTrue(val instanceof AnalyticsValue);
-    AnalyticsValue casted = (AnalyticsValue)val;
-
-    val.setValue("string 1").setExists(true);
-    assertEquals("string 1", casted.getObject());
-    assertTrue(casted.exists());
-
-    val.setValue("abc").setExists(true);
-    assertEquals("abc", casted.getObject());
-    assertTrue(casted.exists());
-  }
-
-  @Test
-  public void stringStreamCastingTest() {
-    TestStringValue val = new TestStringValue();
-    
-    assertTrue(val instanceof StringValueStream);
-    StringValueStream casted = (StringValueStream)val;
-    
-    // No values
-    val.setExists(false);
-    casted.streamStrings( value -> {
-      assertTrue("There should be no values to stream", false);
-    });
-
-    // Multiple Values
-    val.setValue("abcd").setExists(true);
-    Iterator<String> values = Arrays.asList("abcd").iterator();
-    casted.streamStrings( value -> {
-      assertTrue(values.hasNext());
-      assertEquals(values.next(), value);
-    });
-    assertFalse(values.hasNext());
-  }
-
-  @Test
-  public void objectStreamCastingTest() {
-    TestStringValue val = new TestStringValue();
-    
-    assertTrue(val instanceof AnalyticsValueStream);
-    AnalyticsValueStream casted = (AnalyticsValueStream)val;
-    
-    // No values
-    val.setExists(false);
-    casted.streamObjects( value -> {
-      assertTrue("There should be no values to stream", false);
-    });
-
-    // Multiple Values
-    val.setValue("abcd").setExists(true);
-    Iterator<Object> values = Arrays.<Object>asList("abcd").iterator();
-    casted.streamObjects( value -> {
-      assertTrue(values.hasNext());
-      assertEquals(values.next(), value);
-    });
-    assertFalse(values.hasNext());
-  }
-  
-  @Test
-  public void constantConversionTest() {
-    TestStringValue val = new TestStringValue(ExpressionType.CONST);
-    val.setValue("asd23n23").setExists(true);
-    AnalyticsValueStream conv = val.convertToConstant();
-    assertTrue(conv instanceof ConstantStringValue);
-    assertEquals("asd23n23", ((ConstantStringValue)conv).getString());
-
-    val = new TestStringValue(ExpressionType.FIELD);
-    val.setValue("asd23n23").setExists(true);
-    conv = val.convertToConstant();
-    assertSame(val, conv);
-
-    val = new TestStringValue(ExpressionType.UNREDUCED_MAPPING);
-    val.setValue("asd23n23").setExists(true);
-    conv = val.convertToConstant();
-    assertSame(val, conv);
-
-    val = new TestStringValue(ExpressionType.REDUCTION);
-    val.setValue("asd23n23").setExists(true);
-    conv = val.convertToConstant();
-    assertSame(val, conv);
-
-    val = new TestStringValue(ExpressionType.REDUCED_MAPPING);
-    val.setValue("asd23n23").setExists(true);
-    conv = val.convertToConstant();
-    assertSame(val, conv);
-  }
-}

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/f0366b94/solr/contrib/analytics/src/test/org/apache/solr/analytics/value/ConstantValueTest.java
----------------------------------------------------------------------
diff --git a/solr/contrib/analytics/src/test/org/apache/solr/analytics/value/ConstantValueTest.java b/solr/contrib/analytics/src/test/org/apache/solr/analytics/value/ConstantValueTest.java
deleted file mode 100644
index 81ccd1f..0000000
--- a/solr/contrib/analytics/src/test/org/apache/solr/analytics/value/ConstantValueTest.java
+++ /dev/null
@@ -1,368 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.solr.analytics.value;
-
-import java.time.Instant;
-import java.time.format.DateTimeParseException;
-import java.util.Date;
-
-import org.apache.solr.SolrTestCaseJ4;
-import org.apache.solr.analytics.value.FillableTestValue.TestIntValue;
-import org.apache.solr.analytics.value.constant.ConstantBooleanValue;
-import org.apache.solr.analytics.value.constant.ConstantDateValue;
-import org.apache.solr.analytics.value.constant.ConstantDoubleValue;
-import org.apache.solr.analytics.value.constant.ConstantFloatValue;
-import org.apache.solr.analytics.value.constant.ConstantIntValue;
-import org.apache.solr.analytics.value.constant.ConstantLongValue;
-import org.apache.solr.analytics.value.constant.ConstantStringValue;
-import org.apache.solr.analytics.value.constant.ConstantValue;
-import org.junit.Test;
-
-public class ConstantValueTest extends SolrTestCaseJ4 {
-  
-
-  @Test
-  public void constantParsingTest() throws DateTimeParseException {
-    // Int
-    AnalyticsValueStream uncasted = ConstantValue.creatorFunction.apply("1234");
-    assertTrue(uncasted instanceof ConstantIntValue);
-    assertEquals(1234, ((ConstantIntValue)uncasted).getInt());
-
-    // Long
-    uncasted = ConstantValue.creatorFunction.apply("1234123412341234");
-    assertTrue(uncasted instanceof ConstantLongValue);
-    assertEquals(1234123412341234L, ((ConstantLongValue)uncasted).getLong());
-
-    // Floats cannot currently be implicitly created
-
-    // Double
-    uncasted = ConstantValue.creatorFunction.apply("12341234.12341234");
-    assertTrue(uncasted instanceof ConstantDoubleValue);
-    assertEquals(12341234.12341234, ((ConstantDoubleValue)uncasted).getDouble(), .000000001);
-
-    // String
-    uncasted = ConstantValue.creatorFunction.apply("'abcdef'");
-    assertTrue(uncasted instanceof ConstantStringValue);
-    assertEquals("abcdef", ((ConstantStringValue)uncasted).getString());
-    
-    uncasted = ConstantValue.creatorFunction.apply("\"abcdef\"");
-    assertTrue(uncasted instanceof ConstantStringValue);
-    assertEquals("abcdef", ((ConstantStringValue)uncasted).getString());
-
-    // Date
-    uncasted = ConstantValue.creatorFunction.apply("1800-01-01T10:30:15.33Z");
-    assertTrue(uncasted instanceof ConstantDateValue);
-    assertEquals(Date.from(Instant.parse("1800-01-01T10:30:15.33Z")), ((ConstantDateValue)uncasted).getDate());
-  }
-  
-  @Test
-  public void constantConversionTest() {
-    AnalyticsValueStream val = new ConstantBooleanValue(true);
-    assertSame(val, val.convertToConstant());
-
-    val = new ConstantIntValue(123);
-    assertSame(val, val.convertToConstant());
-
-    val = new ConstantLongValue(123L);
-    assertSame(val, val.convertToConstant());
-
-    val = new ConstantFloatValue(123F);
-    assertSame(val, val.convertToConstant());
-
-    val = new ConstantDoubleValue(123.0);
-    assertSame(val, val.convertToConstant());
-
-    val = new ConstantDateValue(123L);
-    assertSame(val, val.convertToConstant());
-
-    val = new ConstantStringValue("123");
-    assertSame(val, val.convertToConstant());
-  }
-
-  @Test
-  public void constantBooleanTest() {
-    ConstantBooleanValue val = new ConstantBooleanValue(true);
-    
-    assertTrue(val.exists());
-    assertEquals(true, val.getBoolean());
-    assertEquals("true", val.getString());
-    assertEquals(Boolean.TRUE, val.getObject());
-    
-    TestIntValue counter = new TestIntValue();
-    counter.setValue(0);
-    val.streamBooleans( value -> {
-      assertEquals(true, value);
-      assertEquals(0, counter.getInt());
-      counter.setValue(1);
-    });
-    counter.setValue(0);
-    val.streamStrings( value -> {
-      assertEquals("true", value);
-      assertEquals(0, counter.getInt());
-      counter.setValue(1);
-    });
-    counter.setValue(0);
-    val.streamObjects( value -> {
-      assertEquals(Boolean.TRUE, value);
-      assertEquals(0, counter.getInt());
-      counter.setValue(1);
-    });
-    
-
-    val = new ConstantBooleanValue(false);
-    
-    assertTrue(val.exists());
-    assertEquals(false, val.getBoolean());
-    assertEquals("false", val.getString());
-    assertEquals(Boolean.FALSE, val.getObject());
-    
-    counter.setValue(0);
-    val.streamBooleans( value -> {
-      assertEquals(false, value);
-      assertEquals(0, counter.getInt());
-      counter.setValue(1);
-    });
-    counter.setValue(0);
-    val.streamStrings( value -> {
-      assertEquals("false", value);
-      assertEquals(0, counter.getInt());
-      counter.setValue(1);
-    });
-    counter.setValue(0);
-    val.streamObjects( value -> {
-      assertEquals(Boolean.FALSE, value);
-      assertEquals(0, counter.getInt());
-      counter.setValue(1);
-    });
-  }
-
-  @Test
-  public void constantIntTest() {
-    ConstantIntValue val = new ConstantIntValue(24);
-    
-    assertTrue(val.exists());
-    assertEquals(24, val.getInt());
-    assertEquals(24L, val.getLong());
-    assertEquals(24F, val.getFloat(), .00001);
-    assertEquals(24.0, val.getDouble(), .00001);
-    assertEquals("24", val.getString());
-    assertEquals(24, val.getObject());
-    
-    TestIntValue counter = new TestIntValue();
-    counter.setValue(0);
-    val.streamInts( value -> {
-      assertEquals(24, value);
-      assertEquals(0, counter.getInt());
-      counter.setValue(1);
-    });
-    counter.setValue(0);
-    val.streamLongs( value -> {
-      assertEquals(24L, value);
-      assertEquals(0, counter.getInt());
-      counter.setValue(1);
-    });
-    counter.setValue(0);
-    val.streamFloats( value -> {
-      assertEquals(24F, value, .00001);
-      assertEquals(0, counter.getInt());
-      counter.setValue(1);
-    });
-    counter.setValue(0);
-    val.streamDoubles( value -> {
-      assertEquals(24.0, value, .00001);
-      assertEquals(0, counter.getInt());
-      counter.setValue(1);
-    });
-    counter.setValue(0);
-    val.streamStrings( value -> {
-      assertEquals("24", value);
-      assertEquals(0, counter.getInt());
-      counter.setValue(1);
-    });
-    counter.setValue(0);
-    val.streamObjects( value -> {
-      assertEquals(24, value);
-      assertEquals(0, counter.getInt());
-      counter.setValue(1);
-    });
-  }
-
-  @Test
-  public void constantLongTest() {
-    ConstantLongValue val = new ConstantLongValue(24L);
-    
-    assertTrue(val.exists());
-    assertEquals(24L, val.getLong());
-    assertEquals(24.0, val.getDouble(), .00001);
-    assertEquals("24", val.getString());
-    assertEquals(24L, val.getObject());
-    
-    TestIntValue counter = new TestIntValue();
-    counter.setValue(0);
-    val.streamLongs( value -> {
-      assertEquals(24L, value);
-      assertEquals(0, counter.getInt());
-      counter.setValue(1);
-    });
-    counter.setValue(0);
-    val.streamDoubles( value -> {
-      assertEquals(24.0, value, .00001);
-      assertEquals(0, counter.getInt());
-      counter.setValue(1);
-    });
-    counter.setValue(0);
-    val.streamStrings( value -> {
-      assertEquals("24", value);
-      assertEquals(0, counter.getInt());
-      counter.setValue(1);
-    });
-    counter.setValue(0);
-    val.streamObjects( value -> {
-      assertEquals(24L, value);
-      assertEquals(0, counter.getInt());
-      counter.setValue(1);
-    });
-  }
-
-  @Test
-  public void constantFloatTest() {
-    ConstantFloatValue val = new ConstantFloatValue(24F);
-    
-    assertTrue(val.exists());
-    assertEquals(24F, val.getFloat(), .00001);
-    assertEquals(24.0, val.getDouble(), .00001);
-    assertEquals("24.0", val.getString());
-    assertEquals(24F, val.getObject());
-    
-    TestIntValue counter = new TestIntValue();
-    counter.setValue(0);
-    val.streamFloats( value -> {
-      assertEquals(24F, value, .00001);
-      assertEquals(0, counter.getInt());
-      counter.setValue(1);
-    });
-    counter.setValue(0);
-    val.streamDoubles( value -> {
-      assertEquals(24.0, value, .00001);
-      assertEquals(0, counter.getInt());
-      counter.setValue(1);
-    });
-    counter.setValue(0);
-    val.streamStrings( value -> {
-      assertEquals("24.0", value);
-      assertEquals(0, counter.getInt());
-      counter.setValue(1);
-    });
-    counter.setValue(0);
-    val.streamObjects( value -> {
-      assertEquals(24F, value);
-      assertEquals(0, counter.getInt());
-      counter.setValue(1);
-    });
-  }
-
-  @Test
-  public void constantDoubleTest() {
-    ConstantDoubleValue val = new ConstantDoubleValue(24.0);
-    
-    assertTrue(val.exists());
-    assertEquals(24.0, val.getDouble(), .00001);
-    assertEquals("24.0", val.getString());
-    assertEquals(24.0, val.getObject());
-    
-    TestIntValue counter = new TestIntValue();
-    counter.setValue(0);
-    val.streamDoubles( value -> {
-      assertEquals(24.0, value, .00001);
-      assertEquals(0, counter.getInt());
-      counter.setValue(1);
-    });
-    counter.setValue(0);
-    val.streamStrings( value -> {
-      assertEquals("24.0", value);
-      assertEquals(0, counter.getInt());
-      counter.setValue(1);
-    });
-    counter.setValue(0);
-    val.streamObjects( value -> {
-      assertEquals(24.0, value);
-      assertEquals(0, counter.getInt());
-      counter.setValue(1);
-    });
-  }
-
-  @Test
-  public void constantDateTest() throws DateTimeParseException {
-    Date date = Date.from(Instant.parse("1800-01-01T10:30:15Z"));
-    ConstantDateValue val = new ConstantDateValue(date.getTime());
-    
-    assertTrue(val.exists());
-    assertEquals(date.getTime(), val.getLong());
-    assertEquals(date, val.getDate());
-    assertEquals("1800-01-01T10:30:15Z", val.getString());
-    assertEquals(date, val.getObject());
-    
-    TestIntValue counter = new TestIntValue();
-    counter.setValue(0);
-    val.streamLongs( value -> {
-      assertEquals(date.getTime(), value);
-      assertEquals(0, counter.getInt());
-      counter.setValue(1);
-    });
-    counter.setValue(0);
-    val.streamDates( value -> {
-      assertEquals(date, value);
-      assertEquals(0, counter.getInt());
-      counter.setValue(1);
-    });
-    counter.setValue(0);
-    val.streamStrings( value -> {
-      assertEquals("1800-01-01T10:30:15Z", value);
-      assertEquals(0, counter.getInt());
-      counter.setValue(1);
-    });
-    counter.setValue(0);
-    val.streamObjects( value -> {
-      assertEquals(date, value);
-      assertEquals(0, counter.getInt());
-      counter.setValue(1);
-    });
-  }
-
-  @Test
-  public void constantStringTest() {
-    ConstantStringValue val = new ConstantStringValue("abcdef");
-    
-    assertTrue(val.exists());
-    assertEquals("abcdef", val.getString());
-    assertEquals("abcdef", val.getObject());
-    
-    TestIntValue counter = new TestIntValue();
-    counter.setValue(0);
-    val.streamStrings( value -> {
-      assertEquals("abcdef", value);
-      assertEquals(0, counter.getInt());
-      counter.setValue(1);
-    });
-    counter.setValue(0);
-    val.streamObjects( value -> {
-      assertEquals("abcdef", value);
-      assertEquals(0, counter.getInt());
-      counter.setValue(1);
-    });
-  }
-}

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/f0366b94/solr/contrib/analytics/src/test/org/apache/solr/analytics/value/FillableTestValue.java
----------------------------------------------------------------------
diff --git a/solr/contrib/analytics/src/test/org/apache/solr/analytics/value/FillableTestValue.java b/solr/contrib/analytics/src/test/org/apache/solr/analytics/value/FillableTestValue.java
deleted file mode 100644
index 7facef9..0000000
--- a/solr/contrib/analytics/src/test/org/apache/solr/analytics/value/FillableTestValue.java
+++ /dev/null
@@ -1,641 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.solr.analytics.value;
-
-import java.time.Instant;
-import java.time.format.DateTimeParseException;
-import java.util.function.Consumer;
-import java.util.function.DoubleConsumer;
-import java.util.function.IntConsumer;
-import java.util.function.LongConsumer;
-
-import org.apache.solr.analytics.util.function.BooleanConsumer;
-import org.apache.solr.analytics.util.function.FloatConsumer;
-import org.apache.solr.analytics.value.AnalyticsValue.AbstractAnalyticsValue;
-import org.apache.solr.analytics.value.AnalyticsValueStream.AbstractAnalyticsValueStream;
-import org.apache.solr.analytics.value.BooleanValue.AbstractBooleanValue;
-import org.apache.solr.analytics.value.BooleanValueStream.AbstractBooleanValueStream;
-import org.apache.solr.analytics.value.DateValue.AbstractDateValue;
-import org.apache.solr.analytics.value.DateValueStream.AbstractDateValueStream;
-import org.apache.solr.analytics.value.DoubleValue.AbstractDoubleValue;
-import org.apache.solr.analytics.value.DoubleValueStream.AbstractDoubleValueStream;
-import org.apache.solr.analytics.value.FloatValue.AbstractFloatValue;
-import org.apache.solr.analytics.value.FloatValueStream.AbstractFloatValueStream;
-import org.apache.solr.analytics.value.IntValue.AbstractIntValue;
-import org.apache.solr.analytics.value.IntValueStream.AbstractIntValueStream;
-import org.apache.solr.analytics.value.LongValue.AbstractLongValue;
-import org.apache.solr.analytics.value.LongValueStream.AbstractLongValueStream;
-import org.apache.solr.analytics.value.StringValue.AbstractStringValue;
-import org.apache.solr.analytics.value.StringValueStream.AbstractStringValueStream;
-
-public class FillableTestValue {
-  public static class TestAnalyticsValue extends AbstractAnalyticsValue {
-    private final ExpressionType expressionType;
-    
-    private Object value;
-    private boolean exists;
-    
-    public TestAnalyticsValue() {
-      this(ExpressionType.CONST);
-    }
-    
-    public TestAnalyticsValue(ExpressionType expressionType) {
-      this.expressionType = expressionType;
-    }
-
-    public TestAnalyticsValue setValue(Object value) {
-      this.value = value;
-      return this;
-    }
-    
-    public TestAnalyticsValue setExists(boolean exists) {
-      this.exists = exists;
-      return this;
-    }
-
-    @Override
-    public Object getObject() {
-      return value;
-    }
-
-    @Override
-    public boolean exists() {
-      return exists;
-    }
-
-    @Override
-    public String getName() { return "test_analytics_value"; }
-
-    @Override
-    public String getExpressionStr() { return "test_analytics_value"; }
-
-    @Override
-    public ExpressionType getExpressionType() { return expressionType; }
-  }
-  
-  public static class TestAnalyticsValueStream extends AbstractAnalyticsValueStream {
-    private final ExpressionType expressionType;
-    
-    private Object[] values;
-    
-    public TestAnalyticsValueStream() {
-      this(ExpressionType.CONST);
-    }
-    
-    public TestAnalyticsValueStream(ExpressionType expressionType) {
-      this.expressionType = expressionType;
-    }
-
-    public TestAnalyticsValueStream setValues(Object... values) {
-      this.values = values;
-      return this;
-    }
-
-    @Override
-    public void streamObjects(Consumer<Object> cons) {
-      for (int i = 0; i < values.length; ++i) {
-        cons.accept(values[i]);
-      }
-    }
-
-    @Override
-    public String getName() { return "test_analytics_value_stream"; }
-
-    @Override
-    public String getExpressionStr() { return "test_analytics_value_stream"; }
-
-    @Override
-    public ExpressionType getExpressionType() { return expressionType; }
-  }
-  
-  public static class TestIntValue extends AbstractIntValue {
-    private final ExpressionType expressionType;
-    
-    private int value;
-    private boolean exists;
-    
-    public TestIntValue() {
-      this(ExpressionType.CONST);
-    }
-    
-    public TestIntValue(ExpressionType expressionType) {
-      this.expressionType = expressionType;
-    }
-
-    public TestIntValue setValue(int value) {
-      this.value = value;
-      return this;
-    }
-    
-    public TestIntValue setExists(boolean exists) {
-      this.exists = exists;
-      return this;
-    }
-
-    @Override
-    public int getInt() {
-      return value;
-    }
-
-    @Override
-    public boolean exists() {
-      return exists;
-    }
-
-    @Override
-    public String getName() { return "test_int_value"; }
-
-    @Override
-    public String getExpressionStr() { return "test_int_value"; }
-
-    @Override
-    public ExpressionType getExpressionType() { return expressionType; }
-  }
-  
-  public static class TestIntValueStream extends AbstractIntValueStream {
-    private int[] values;
-    
-    public TestIntValueStream() {
-      this.values = new int[0];
-    }
-
-    public TestIntValueStream setValues(int... values) {
-      this.values = values;
-      return this;
-    }
-
-    @Override
-    public void streamInts(IntConsumer cons) {
-      for (int i = 0; i < values.length; ++i) {
-        cons.accept(values[i]);
-      }
-    }
-
-    @Override
-    public String getName() { return "test_int_value_stream"; }
-
-    @Override
-    public String getExpressionStr() { return "test_int_value_stream"; }
-
-    @Override
-    public ExpressionType getExpressionType() { return ExpressionType.UNREDUCED_MAPPING; }
-  }
-
-  public static class TestLongValue extends AbstractLongValue {
-    private final ExpressionType expressionType;
-    
-    private long value;
-    private boolean exists;
-    
-    public TestLongValue() {
-      this(ExpressionType.CONST);
-    }
-    
-    public TestLongValue(ExpressionType expressionType) {
-      this.expressionType = expressionType;
-    }
-
-    public TestLongValue setValue(long value) {
-      this.value = value;
-      return this;
-    }
-    
-    public TestLongValue setExists(boolean exists) {
-      this.exists = exists;
-      return this;
-    }
-
-    @Override
-    public long getLong() {
-      return value;
-    }
-
-    @Override
-    public boolean exists() {
-      return exists;
-    }
-
-    @Override
-    public String getName() { return "test_long_value"; }
-
-    @Override
-    public String getExpressionStr() { return "test_long_value"; }
-
-    @Override
-    public ExpressionType getExpressionType() { return expressionType; }
-  }
-
-  public static class TestLongValueStream extends AbstractLongValueStream {
-    private long[] values;
-    
-    public TestLongValueStream() {
-      this.values = new long[0];
-    }
-
-    public TestLongValueStream setValues(long... values) {
-      this.values = values;
-      return this;
-    }
-
-    @Override
-    public void streamLongs(LongConsumer cons) {
-      for (int i = 0; i < values.length; ++i) {
-        cons.accept(values[i]);
-      }
-    }
-
-    @Override
-    public String getName() { return "test_long_value_stream"; }
-
-    @Override
-    public String getExpressionStr() { return "test_long_value_stream"; }
-
-    @Override
-    public ExpressionType getExpressionType() { return ExpressionType.UNREDUCED_MAPPING; }
-  }
-
-  public static class TestFloatValue extends AbstractFloatValue {
-    private final ExpressionType expressionType;
-    
-    private float value;
-    private boolean exists;
-    
-    public TestFloatValue() {
-      this(ExpressionType.CONST);
-    }
-    
-    public TestFloatValue(ExpressionType expressionType) {
-      this.expressionType = expressionType;
-    }
-
-    public TestFloatValue setValue(float value) {
-      this.value = value;
-      return this;
-    }
-    
-    public TestFloatValue setExists(boolean exists) {
-      this.exists = exists;
-      return this;
-    }
-
-    @Override
-    public float getFloat() {
-      return value;
-    }
-
-    @Override
-    public boolean exists() {
-      return exists;
-    }
-
-    @Override
-    public String getName() { return "test_float_value"; }
-
-    @Override
-    public String getExpressionStr() { return "test_float_value"; }
-
-    @Override
-    public ExpressionType getExpressionType() { return expressionType; }
-  }
-  
-  public static class TestFloatValueStream extends AbstractFloatValueStream {
-    private float[] values;
-    
-    public TestFloatValueStream() {
-      this.values = new float[0];
-    }
-
-    public TestFloatValueStream setValues(float... values) {
-      this.values = values;
-      return this;
-    }
-
-    @Override
-    public void streamFloats(FloatConsumer cons) {
-      for (int i = 0; i < values.length; ++i) {
-        cons.accept(values[i]);
-      }
-    }
-
-    @Override
-    public String getName() { return "test_float_value_stream"; }
-
-    @Override
-    public String getExpressionStr() { return "test_float_value_stream"; }
-
-    @Override
-    public ExpressionType getExpressionType() { return ExpressionType.UNREDUCED_MAPPING; }
-  }
-
-  public static class TestDoubleValue extends AbstractDoubleValue {
-    private final ExpressionType expressionType;
-    
-    private double value;
-    private boolean exists;
-    
-    public TestDoubleValue() {
-      this(ExpressionType.CONST);
-    }
-    
-    public TestDoubleValue(ExpressionType expressionType) {
-      this.expressionType = expressionType;
-    }
-
-    public TestDoubleValue setValue(double value) {
-      this.value = value;
-      return this;
-    }
-    
-    public TestDoubleValue setExists(boolean exists) {
-      this.exists = exists;
-      return this;
-    }
-
-    @Override
-    public double getDouble() {
-      return value;
-    }
-
-    @Override
-    public boolean exists() {
-      return exists;
-    }
-
-    @Override
-    public String getName() { return "test_double_value"; }
-
-    @Override
-    public String getExpressionStr() { return "test_double_value"; }
-
-    @Override
-    public ExpressionType getExpressionType() { return expressionType; }
-  }
-  
-  public static class TestDoubleValueStream extends AbstractDoubleValueStream {
-    private double[] values;
-    
-    public TestDoubleValueStream() {
-      this.values = new double[0];
-    }
-
-    public TestDoubleValueStream setValues(double... values) {
-      this.values = values;
-      return this;
-    }
-
-    @Override
-    public void streamDoubles(DoubleConsumer cons) {
-      for (int i = 0; i < values.length; ++i) {
-        cons.accept(values[i]);
-      }
-    }
-
-    @Override
-    public String getName() { return "test_double_value_stream"; }
-
-    @Override
-    public String getExpressionStr() { return "test_double_value_stream"; }
-
-    @Override
-    public ExpressionType getExpressionType() { return ExpressionType.UNREDUCED_MAPPING; }
-  }
-
-  public static class TestBooleanValue extends AbstractBooleanValue {
-    private final ExpressionType expressionType;
-    
-    private boolean value;
-    private boolean exists;
-    
-    public TestBooleanValue() {
-      this(ExpressionType.CONST);
-    }
-    
-    public TestBooleanValue(ExpressionType expressionType) {
-      this.expressionType = expressionType;
-    }
-
-    public TestBooleanValue setValue(boolean value) {
-      this.value = value;
-      return this;
-    }
-    
-    public TestBooleanValue setExists(boolean exists) {
-      this.exists = exists;
-      return this;
-    }
-
-    @Override
-    public boolean getBoolean() {
-      return value;
-    }
-
-    @Override
-    public boolean exists() {
-      return exists;
-    }
-
-    @Override
-    public String getName() { return "test_boolean_value"; }
-
-    @Override
-    public String getExpressionStr() { return "test_boolean_value"; }
-
-    @Override
-    public ExpressionType getExpressionType() { return expressionType; }
-  }
-
-  public static class TestBooleanValueStream extends AbstractBooleanValueStream {
-    private boolean[] values;
-    
-    public TestBooleanValueStream() {
-      this.values = new boolean[0];
-    }
-
-    public TestBooleanValueStream setValues(boolean... values) {
-      this.values = values;
-      return this;
-    }
-
-    @Override
-    public void streamBooleans(BooleanConsumer cons) {
-      for (int i = 0; i < values.length; ++i) {
-        cons.accept(values[i]);
-      }
-    }
-
-    @Override
-    public String getName() { return "test_boolean_value_stream"; }
-
-    @Override
-    public String getExpressionStr() { return "test_boolean_value_stream"; }
-
-    @Override
-    public ExpressionType getExpressionType() { return ExpressionType.UNREDUCED_MAPPING; }
-  }
-
-  public static class TestDateValue extends AbstractDateValue {
-    private final ExpressionType expressionType;
-    
-    private long value;
-    private boolean exists;
-    
-    public TestDateValue() {
-      this(ExpressionType.CONST);
-    }
-    
-    public TestDateValue(ExpressionType expressionType) {
-      this.expressionType = expressionType;
-    }
-
-    public TestDateValue setValue(String value) {
-      try {
-        this.value = Instant.parse(value).toEpochMilli();
-      } catch (DateTimeParseException e) {
-        this.value = 0;
-      }
-      return this;
-    }
-    
-    public TestDateValue setExists(boolean exists) {
-      this.exists = exists;
-      return this;
-    }
-
-    @Override
-    public long getLong() {
-      return value;
-    }
-
-    @Override
-    public boolean exists() {
-      return exists;
-    }
-
-    @Override
-    public String getName() { return "test_date_value"; }
-
-    @Override
-    public String getExpressionStr() { return "test_date_value"; }
-
-    @Override
-    public ExpressionType getExpressionType() { return expressionType; }
-  }
-
-  public static class TestDateValueStream extends AbstractDateValueStream {
-    private String[] values;
-    
-    public TestDateValueStream() {
-      this.values = new String[0];
-    }
-
-    public TestDateValueStream setValues(String... values) {
-      this.values = values;
-      return this;
-    }
-
-    @Override
-    public void streamLongs(LongConsumer cons) {
-      for (int i = 0; i < values.length; ++i) {
-        try {
-          cons.accept(Instant.parse(values[i]).toEpochMilli());
-        } catch (DateTimeParseException e) { }
-      }
-    }
-
-    @Override
-    public String getName() { return "test_date_value_stream"; }
-
-    @Override
-    public String getExpressionStr() { return "test_date_value_stream"; }
-
-    @Override
-    public ExpressionType getExpressionType() { return ExpressionType.UNREDUCED_MAPPING; }
-  }
-
-  public static class TestStringValue extends AbstractStringValue {
-    private final ExpressionType expressionType;
-    
-    private String value;
-    private boolean exists;
-    
-    public TestStringValue() {
-      this(ExpressionType.CONST);
-    }
-    
-    public TestStringValue(ExpressionType expressionType) {
-      this.expressionType = expressionType;
-    }
-
-    public TestStringValue setValue(String value) {
-      this.value = value;
-      return this;
-    }
-    
-    public TestStringValue setExists(boolean exists) {
-      this.exists = exists;
-      return this;
-    }
-
-    @Override
-    public String getString() {
-      return value;
-    }
-
-    @Override
-    public boolean exists() {
-      return exists;
-    }
-
-    @Override
-    public String getName() { return "test_string_value"; }
-
-    @Override
-    public String getExpressionStr() { return "test_string_value"; }
-
-    @Override
-    public ExpressionType getExpressionType() { return expressionType; }
-  }
-
-  public static class TestStringValueStream extends AbstractStringValueStream {
-    private String[] values;
-    
-    public TestStringValueStream() {
-      this.values = new String[0];
-    }
-
-    public TestStringValueStream setValues(String... values) {
-      this.values = values;
-      return this;
-    }
-
-    @Override
-    public void streamStrings(Consumer<String> cons) {
-      for (int i = 0; i < values.length; ++i) {
-        cons.accept(values[i]);
-      }
-    }
-
-    @Override
-    public String getName() { return "test_string_value_stream"; }
-
-    @Override
-    public String getExpressionStr() { return "test_string_value_stream"; }
-
-    @Override
-    public ExpressionType getExpressionType() { return ExpressionType.UNREDUCED_MAPPING; }
-  }
-}

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/f0366b94/solr/contrib/analytics/src/test/resources/solr/analytics/legacy/expressions.txt
----------------------------------------------------------------------
diff --git a/solr/contrib/analytics/src/test/resources/solr/analytics/legacy/expressions.txt b/solr/contrib/analytics/src/test/resources/solr/analytics/legacy/expressions.txt
new file mode 100644
index 0000000..6f5c916
--- /dev/null
+++ b/solr/contrib/analytics/src/test/resources/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/f0366b94/solr/contrib/analytics/src/test/resources/solr/analytics/legacy/facetSorting.txt
----------------------------------------------------------------------
diff --git a/solr/contrib/analytics/src/test/resources/solr/analytics/legacy/facetSorting.txt b/solr/contrib/analytics/src/test/resources/solr/analytics/legacy/facetSorting.txt
new file mode 100644
index 0000000..4663217
--- /dev/null
+++ b/solr/contrib/analytics/src/test/resources/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/f0366b94/solr/contrib/analytics/src/test/resources/solr/analytics/legacy/fieldFacetExtras.txt
----------------------------------------------------------------------
diff --git a/solr/contrib/analytics/src/test/resources/solr/analytics/legacy/fieldFacetExtras.txt b/solr/contrib/analytics/src/test/resources/solr/analytics/legacy/fieldFacetExtras.txt
new file mode 100644
index 0000000..3979f57
--- /dev/null
+++ b/solr/contrib/analytics/src/test/resources/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/f0366b94/solr/contrib/analytics/src/test/resources/solr/analytics/legacy/fieldFacets.txt
----------------------------------------------------------------------
diff --git a/solr/contrib/analytics/src/test/resources/solr/analytics/legacy/fieldFacets.txt b/solr/contrib/analytics/src/test/resources/solr/analytics/legacy/fieldFacets.txt
new file mode 100644
index 0000000..5ba5953
--- /dev/null
+++ b/solr/contrib/analytics/src/test/resources/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/f0366b94/solr/contrib/analytics/src/test/resources/solr/analytics/legacy/functions.txt
----------------------------------------------------------------------
diff --git a/solr/contrib/analytics/src/test/resources/solr/analytics/legacy/functions.txt b/solr/contrib/analytics/src/test/resources/solr/analytics/legacy/functions.txt
new file mode 100644
index 0000000..ce73583
--- /dev/null
+++ b/solr/contrib/analytics/src/test/resources/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/f0366b94/solr/contrib/analytics/src/test/resources/solr/analytics/legacy/noFacets.txt
----------------------------------------------------------------------
diff --git a/solr/contrib/analytics/src/test/resources/solr/analytics/legacy/noFacets.txt b/solr/contrib/analytics/src/test/resources/solr/analytics/legacy/noFacets.txt
new file mode 100644
index 0000000..84e43eb
--- /dev/null
+++ b/solr/contrib/analytics/src/test/resources/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/f0366b94/solr/contrib/analytics/src/test/resources/solr/analytics/legacy/queryFacets.txt
----------------------------------------------------------------------
diff --git a/solr/contrib/analytics/src/test/resources/solr/analytics/legacy/queryFacets.txt b/solr/contrib/analytics/src/test/resources/solr/analytics/legacy/queryFacets.txt
new file mode 100644
index 0000000..84d8fc6
--- /dev/null
+++ b/solr/contrib/analytics/src/test/resources/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/f0366b94/solr/contrib/analytics/src/test/resources/solr/analytics/legacy/rangeFacets.txt
----------------------------------------------------------------------
diff --git a/solr/contrib/analytics/src/test/resources/solr/analytics/legacy/rangeFacets.txt b/solr/contrib/analytics/src/test/resources/solr/analytics/legacy/rangeFacets.txt
new file mode 100644
index 0000000..29aae5d
--- /dev/null
+++ b/solr/contrib/analytics/src/test/resources/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/f0366b94/solr/contrib/analytics/src/test/resources/solr/collection1/conf/schema-analytics.xml
----------------------------------------------------------------------
diff --git a/solr/contrib/analytics/src/test/resources/solr/collection1/conf/schema-analytics.xml b/solr/contrib/analytics/src/test/resources/solr/collection1/conf/schema-analytics.xml
new file mode 100644
index 0000000..6570416
--- /dev/null
+++ b/solr/contrib/analytics/src/test/resources/solr/collection1/conf/schema-analytics.xml
@@ -0,0 +1,129 @@
+<?xml version="1.0" ?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements.  See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<!-- The Solr schema file. This file should be named "schema.xml" and
+     should be located where the classloader for the Solr webapp can find it.
+
+     This schema is used for testing, and as such has everything and the
+     kitchen sink thrown in. See example/solr/conf/schema.xml for a
+     more concise example.
+
+  -->
+
+<schema name="schema-analytics" version="1.6">
+
+
+  <!-- field type definitions... note that the "name" attribute is
+       just a label to be used by field definitions.  The "class"
+       attribute and any other attributes determine the real type and
+       behavior of the fieldType.
+    -->
+
+  <!-- numeric field types that store and index the text
+       value verbatim (and hence don't sort correctly or support range queries.)
+       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}" 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}" 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>
+
+</schema>

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/f0366b94/solr/contrib/analytics/src/test/resources/solr/collection1/conf/solrconfig-analytics.xml
----------------------------------------------------------------------
diff --git a/solr/contrib/analytics/src/test/resources/solr/collection1/conf/solrconfig-analytics.xml b/solr/contrib/analytics/src/test/resources/solr/collection1/conf/solrconfig-analytics.xml
new file mode 100644
index 0000000..4c359a6
--- /dev/null
+++ b/solr/contrib/analytics/src/test/resources/solr/collection1/conf/solrconfig-analytics.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" ?>
+
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements.  See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<config>
+  <luceneMatchVersion>${tests.luceneMatchVersion:LATEST}</luceneMatchVersion>
+  <dataDir>${solr.data.dir:}</dataDir>
+  <xi:include href="solrconfig.snippet.randomindexconfig.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
+  <directoryFactory name="DirectoryFactory" class="${solr.directoryFactory:solr.RAMDirectoryFactory}"/>
+  <schemaFactory class="ClassicIndexSchemaFactory"/>
+
+  <requestHandler name="/select" class="solr.SearchHandler">
+    <arr name="components">
+      <str>query</str>
+      <str>facet</str>
+      <str>analytics</str>
+      <str>highlight</str>
+      <str>debug</str>
+      <str>expand</str>
+    </arr>
+  </requestHandler>
+
+  <searchComponent name="analytics" class="org.apache.solr.handler.component.AnalyticsComponent" />
+
+  <requestHandler name="/analytics" class="org.apache.solr.handler.AnalyticsHandler" />
+
+</config>

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/f0366b94/solr/contrib/analytics/src/test/resources/solr/collection1/conf/solrconfig.snippet.randomindexconfig.xml
----------------------------------------------------------------------
diff --git a/solr/contrib/analytics/src/test/resources/solr/collection1/conf/solrconfig.snippet.randomindexconfig.xml b/solr/contrib/analytics/src/test/resources/solr/collection1/conf/solrconfig.snippet.randomindexconfig.xml
new file mode 100644
index 0000000..ecf1f14
--- /dev/null
+++ b/solr/contrib/analytics/src/test/resources/solr/collection1/conf/solrconfig.snippet.randomindexconfig.xml
@@ -0,0 +1,46 @@
+<?xml version="1.0" ?>
+
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements.  See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<!-- 
+
+A solrconfig.xml snippet containing indexConfig settings for randomized testing.
+
+-->
+<indexConfig>
+  <!-- this sys property is not set by SolrTestCaseJ4 because we ideally want to use
+       the RandomMergePolicy in all tests - but some tests expect very specific
+       Merge behavior, so those tests can set it as needed.
+  -->
+  <mergePolicyFactory class="${solr.tests.mergePolicyFactory:org.apache.solr.util.RandomMergePolicyFactory}" />
+  
+  <useCompoundFile>${useCompoundFile:false}</useCompoundFile>
+
+  <maxBufferedDocs>${solr.tests.maxBufferedDocs}</maxBufferedDocs>
+  <ramBufferSizeMB>${solr.tests.ramBufferSizeMB}</ramBufferSizeMB>
+
+  <mergeScheduler class="${solr.tests.mergeScheduler}" />
+
+  <writeLockTimeout>1000</writeLockTimeout>
+  <commitLockTimeout>10000</commitLockTimeout>
+
+  <!-- this sys property is not set by SolrTestCaseJ4 because almost all tests should
+       use the single process lockType for speed - but tests that explicitly need
+       to vary the lockType canset it as needed.
+  -->
+  <lockType>${solr.tests.lockType:single}</lockType>
+</indexConfig>

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/f0366b94/solr/contrib/analytics/src/test/resources/solr/configsets/cloud-analytics/conf/schema.xml
----------------------------------------------------------------------
diff --git a/solr/contrib/analytics/src/test/resources/solr/configsets/cloud-analytics/conf/schema.xml b/solr/contrib/analytics/src/test/resources/solr/configsets/cloud-analytics/conf/schema.xml
new file mode 100644
index 0000000..cb9ad13
--- /dev/null
+++ b/solr/contrib/analytics/src/test/resources/solr/configsets/cloud-analytics/conf/schema.xml
@@ -0,0 +1,78 @@
+<?xml version="1.0" ?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements.  See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<!-- The Solr schema file for cloud analytics, version 1.6  -->
+
+<schema name="cloud-analytics" version="1.6">
+
+  <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}" 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"/>
+
+  <!-- for versioning -->
+  <field name="_version_" type="long" indexed="true" stored="true" multiValued="false"/>
+  <!-- points to the root document of a block of nested documents -->
+  <field name="_root_" type="string" indexed="true" stored="true"/>
+
+  <field name="_route_" type="string" indexed="true" stored="true" multiValued="false"/>
+
+  <!-- dynamic fields with doc-values (for analytics) -->
+  <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>

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/f0366b94/solr/contrib/analytics/src/test/resources/solr/configsets/cloud-analytics/conf/solrconfig.xml
----------------------------------------------------------------------
diff --git a/solr/contrib/analytics/src/test/resources/solr/configsets/cloud-analytics/conf/solrconfig.xml b/solr/contrib/analytics/src/test/resources/solr/configsets/cloud-analytics/conf/solrconfig.xml
new file mode 100644
index 0000000..102e39e
--- /dev/null
+++ b/solr/contrib/analytics/src/test/resources/solr/configsets/cloud-analytics/conf/solrconfig.xml
@@ -0,0 +1,59 @@
+<?xml version="1.0" ?>
+
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements.  See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<!-- Minimal solrconfig.xml with /select, /admin and /update only -->
+
+<config>
+
+  <dataDir>${solr.data.dir:}</dataDir>
+
+  <directoryFactory name="DirectoryFactory"
+                    class="${solr.directoryFactory:solr.NRTCachingDirectoryFactory}"/>
+  <schemaFactory class="ClassicIndexSchemaFactory"/>
+
+  <luceneMatchVersion>${tests.luceneMatchVersion:LATEST}</luceneMatchVersion>
+
+  <updateHandler class="solr.DirectUpdateHandler2">
+    <commitWithin>
+      <softCommit>${solr.commitwithin.softcommit:true}</softCommit>
+    </commitWithin>
+    <updateLog></updateLog>
+  </updateHandler>
+
+  <requestHandler name="/select" class="solr.SearchHandler">
+    <lst name="defaults">
+      <str name="echoParams">explicit</str>
+      <str name="indent">true</str>
+      <str name="df">text</str>
+    </lst>
+
+    <arr name="components">
+      <str>query</str>
+      <str>facet</str>
+      <str>analytics</str>
+      <str>highlight</str>
+      <str>debug</str>
+      <str>expand</str>
+    </arr>
+  </requestHandler>
+
+  <searchComponent name="analytics" class="org.apache.solr.handler.component.AnalyticsComponent" />
+  <requestHandler name="/analytics" class="org.apache.solr.handler.AnalyticsHandler" />
+</config>
+


Mime
View raw message