incubator-blur-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amccu...@apache.org
Subject [4/4] git commit: Cleaned up more of the old typing code, no longer needed with Lucene 4.
Date Fri, 30 Nov 2012 02:51:22 GMT
Cleaned up more of the old typing code, no longer needed with Lucene 4.


Project: http://git-wip-us.apache.org/repos/asf/incubator-blur/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-blur/commit/fcc9b6be
Tree: http://git-wip-us.apache.org/repos/asf/incubator-blur/tree/fcc9b6be
Diff: http://git-wip-us.apache.org/repos/asf/incubator-blur/diff/fcc9b6be

Branch: refs/heads/0.2-dev-removing-old-thrift
Commit: fcc9b6bed2fcbb1937f344103dd9f0a5b96370d8
Parents: aee9843
Author: Aaron McCurry <amccurry@gmail.com>
Authored: Thu Nov 29 21:47:21 2012 -0500
Committer: Aaron McCurry <amccurry@gmail.com>
Committed: Thu Nov 29 21:47:21 2012 -0500

----------------------------------------------------------------------
 .../org/apache/blur/analysis/BlurAnalyzer.java     |  174 +----------
 .../org/apache/blur/analysis/DoubleAnalyzer.java   |   83 -----
 .../org/apache/blur/analysis/FloatAnalyzer.java    |   86 -----
 .../blur/analysis/IndexableFieldFactory.java       |   22 ++
 .../org/apache/blur/analysis/IntegerAnalyzer.java  |  101 ------
 .../org/apache/blur/analysis/LongAnalyzer.java     |  101 ------
 .../org/apache/blur/lucene/search/SuperParser.java |  244 ---------------
 .../org/apache/blur/analysis/BlurAnalyzerTest.java |  104 +------
 .../apache/blur/analysis/DoubleAnalyzerTest.java   |   94 ------
 .../apache/blur/analysis/FloatAnalyzerTest.java    |   94 ------
 .../apache/blur/analysis/IntegerAnalyzerTest.java  |  105 ------
 .../org/apache/blur/analysis/LongAnalyzerTest.java |  107 -------
 .../apache/blur/lucene/search/SuperParserTest.java |  236 --------------
 .../apache/blur/search/RandomSuperQueryTest.java   |    6 +-
 14 files changed, 25 insertions(+), 1532 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/fcc9b6be/src/blur-core/src/main/java/org/apache/blur/analysis/BlurAnalyzer.java
----------------------------------------------------------------------
diff --git a/src/blur-core/src/main/java/org/apache/blur/analysis/BlurAnalyzer.java b/src/blur-core/src/main/java/org/apache/blur/analysis/BlurAnalyzer.java
index 08faf6f..c6dd23f 100644
--- a/src/blur-core/src/main/java/org/apache/blur/analysis/BlurAnalyzer.java
+++ b/src/blur-core/src/main/java/org/apache/blur/analysis/BlurAnalyzer.java
@@ -18,53 +18,24 @@ package org.apache.blur.analysis;
  */
 import static org.apache.blur.lucene.LuceneVersionConstant.LUCENE_VERSION;
 
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.lang.reflect.Constructor;
 import java.util.HashMap;
-import java.util.HashSet;
 import java.util.Map;
 import java.util.Set;
-import java.util.TreeSet;
 
 import org.apache.lucene.analysis.Analyzer;
 import org.apache.lucene.analysis.AnalyzerWrapper;
 import org.apache.lucene.analysis.core.KeywordAnalyzer;
 import org.apache.lucene.analysis.standard.StandardAnalyzer;
 import org.apache.lucene.document.Field.Store;
-import org.apache.lucene.search.NumericRangeQuery;
-import org.apache.lucene.search.Query;
-import org.apache.lucene.util.Version;
 
 public final class BlurAnalyzer extends AnalyzerWrapper {
 
-  public enum TYPE {
-    LONG, DOUBLE, FLOAT, INTEGER, DEFAULT
-  }
-
-  @SuppressWarnings("serial")
-  private static Set<String> typeNameCache = new HashSet<String>() {
-    {
-      TYPE[] values = TYPE.values();
-      for (TYPE t : values) {
-        add(t.name());
-      }
-    }
-  };
 
-  private static final String STANDARD = "org.apache.lucene.analysis.standard.StandardAnalyzer";
   public static final BlurAnalyzer BLANK_ANALYZER = new BlurAnalyzer(new KeywordAnalyzer());
-  private static Map<String, Class<? extends Analyzer>> aliases = new HashMap<String, Class<? extends Analyzer>>();
-
   private Map<String, Store> _storeMap = new HashMap<String, Store>();
   private Map<String, Set<String>> _subIndexNameLookups = new HashMap<String, Set<String>>();
-  private Map<String, Boolean> _fullTextFields = new HashMap<String, Boolean>();
-  private Map<String, Boolean> _fullTextColumnFamilies = new HashMap<String, Boolean>();
-  private Analyzer _fullTextAnalyzer = new StandardAnalyzer(LUCENE_VERSION);
   private Analyzer _defaultAnalyzer;
   private Map<String, Analyzer> _analyzers = new HashMap<String, Analyzer>();
-  private Map<String, TYPE> _typeLookup = new HashMap<String, BlurAnalyzer.TYPE>();
 
   public Set<String> getSubIndexNames(String indexName) {
     return _subIndexNameLookups.get(indexName);
@@ -83,7 +54,7 @@ public final class BlurAnalyzer extends AnalyzerWrapper {
   }
 
   private static Analyzer convert(org.apache.blur.thrift.generated.Analyzer analyzer) {
-    return null;
+    return new StandardAnalyzer(LUCENE_VERSION);
   }
 
   private Analyzer getAnalyzer(String name) {
@@ -91,46 +62,6 @@ public final class BlurAnalyzer extends AnalyzerWrapper {
     return analyzer;
   }
 
-  public TYPE getTypeLookup(String field) {
-    TYPE type = _typeLookup.get(field);
-    if (type == null) {
-      return TYPE.DEFAULT;
-    }
-    return type;
-  }
-
-  public Query getNewRangeQuery(String field, String part1, String part2, boolean startInclusive, boolean endInclusive) {
-    Analyzer analyzer = getAnalyzer(field);
-    if (analyzer instanceof LongAnalyzer) {
-      LongAnalyzer a = (LongAnalyzer) analyzer;
-      int precisionStep = a.getPrecisionStep();
-      int radix = a.getRadix();
-      long min = Long.parseLong(part1, radix);
-      long max = Long.parseLong(part2, radix);
-      return NumericRangeQuery.newLongRange(field, precisionStep, min, max, startInclusive, endInclusive);
-    } else if (analyzer instanceof DoubleAnalyzer) {
-      DoubleAnalyzer a = (DoubleAnalyzer) analyzer;
-      int precisionStep = a.getPrecisionStep();
-      double min = Double.parseDouble(part1);
-      double max = Double.parseDouble(part2);
-      return NumericRangeQuery.newDoubleRange(field, precisionStep, min, max, startInclusive, endInclusive);
-    } else if (analyzer instanceof FloatAnalyzer) {
-      FloatAnalyzer a = (FloatAnalyzer) analyzer;
-      int precisionStep = a.getPrecisionStep();
-      float min = Float.parseFloat(part1);
-      float max = Float.parseFloat(part2);
-      return NumericRangeQuery.newFloatRange(field, precisionStep, min, max, startInclusive, endInclusive);
-    } else if (analyzer instanceof IntegerAnalyzer) {
-      IntegerAnalyzer a = (IntegerAnalyzer) analyzer;
-      int precisionStep = a.getPrecisionStep();
-      int radix = a.getRadix();
-      int min = Integer.parseInt(part1, radix);
-      int max = Integer.parseInt(part2, radix);
-      return NumericRangeQuery.newIntRange(field, precisionStep, min, max, startInclusive, endInclusive);
-    }
-    return null;
-  }
-
   public Store getStore(String indexName) {
     Store store = _storeMap.get(indexName);
     if (store == null) {
@@ -139,13 +70,6 @@ public final class BlurAnalyzer extends AnalyzerWrapper {
     return store;
   }
 
-  private String getColumnFamily(String fieldName) {
-    int index = fieldName.indexOf('.');
-    if (index < 0) {
-      return null;
-    }
-    return fieldName.substring(0, index);
-  }
 
   public void close() {
 
@@ -162,105 +86,9 @@ public final class BlurAnalyzer extends AnalyzerWrapper {
     return components;
   }
 
-  private static byte[] getBytes(InputStream inputStream) throws IOException {
-    ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
-    byte[] buffer = new byte[1024];
-    int num;
-    while ((num = inputStream.read(buffer)) != -1) {
-      outputStream.write(buffer, 0, num);
-    }
-    inputStream.close();
-    outputStream.close();
-    return outputStream.toByteArray();
-  }
-
-  private static void putStore(String name, Store store, Map<String, Store> storeMap) {
-    storeMap.put(name, store);
-  }
 
-  @SuppressWarnings("unchecked")
-  private static Analyzer getAnalyzerByClassName(String className, Map<String, Class<? extends Analyzer>> aliases, String fieldName, Map<String, TYPE> typeLookup) {
-    Analyzer type = getType(className, fieldName, typeLookup);
-    if (type != null) {
-      return type;
-    }
-    try {
-      Class<? extends Analyzer> clazz = aliases.get(className);
-      if (clazz == null) {
-        clazz = (Class<? extends Analyzer>) Class.forName(className);
-      }
-      try {
-        return (Analyzer) clazz.newInstance();
-      } catch (Exception e) {
-        Constructor<?> constructor = clazz.getConstructor(new Class[] { Version.class });
-        return (Analyzer) constructor.newInstance(LUCENE_VERSION);
-      }
-    } catch (Exception e) {
-      throw new RuntimeException(e);
-    }
-  }
 
-  private static Analyzer getType(String typeStr, String fieldName, Map<String, TYPE> typeLookup) {
-    if (typeStr == null) {
-      return null;
-    }
-    String[] types = typeStr.split(",");
-    String type = types[0];
-    String typeUpper = type.toUpperCase();
-    if (!typeNameCache.contains(typeUpper)) {
-      return null;
-    }
-    TYPE t = TYPE.valueOf(typeUpper);
-    if (fieldName != null) {
-      typeLookup.put(fieldName, t);
-    }
-    switch (t) {
-    case LONG:
-      LongAnalyzer longAnalyzer = new LongAnalyzer();
-      if (types.length > 1) {
-        longAnalyzer.setPrecisionStep(Integer.parseInt(types[1]));
-      }
-      if (types.length > 2) {
-        longAnalyzer.setRadix(Integer.parseInt(types[2]));
-      }
-      return longAnalyzer;
-    case INTEGER:
-      IntegerAnalyzer integerAnalyzer = new IntegerAnalyzer();
-      if (types.length > 1) {
-        integerAnalyzer.setPrecisionStep(Integer.parseInt(types[1]));
-      }
-      if (types.length > 2) {
-        integerAnalyzer.setRadix(Integer.parseInt(types[2]));
-      }
-      return integerAnalyzer;
-    case FLOAT:
-      FloatAnalyzer floatAnalyzer = new FloatAnalyzer();
-      if (types.length > 1) {
-        floatAnalyzer.setPrecisionStep(Integer.parseInt(types[1]));
-      }
-      return floatAnalyzer;
-    case DOUBLE:
-      DoubleAnalyzer doubleAnalyzer = new DoubleAnalyzer();
-      if (types.length > 1) {
-        doubleAnalyzer.setPrecisionStep(Integer.parseInt(types[1]));
-      }
-      return doubleAnalyzer;
-    default:
-      break;
-    }
-    return null;
-  }
 
-  private static void addSubField(String name, Map<String, Set<String>> subIndexNameLookups) {
-    int lastIndexOf = name.lastIndexOf('.');
-    String mainFieldName = name.substring(0, lastIndexOf);
-    Set<String> set = subIndexNameLookups.get(mainFieldName);
-    if (set == null) {
-      set = new TreeSet<String>();
-      subIndexNameLookups.put(mainFieldName, set);
-    }
-    set.add(name);
-  }
 
 
 }

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/fcc9b6be/src/blur-core/src/main/java/org/apache/blur/analysis/DoubleAnalyzer.java
----------------------------------------------------------------------
diff --git a/src/blur-core/src/main/java/org/apache/blur/analysis/DoubleAnalyzer.java b/src/blur-core/src/main/java/org/apache/blur/analysis/DoubleAnalyzer.java
deleted file mode 100644
index 01abeae..0000000
--- a/src/blur-core/src/main/java/org/apache/blur/analysis/DoubleAnalyzer.java
+++ /dev/null
@@ -1,83 +0,0 @@
-package org.apache.blur.analysis;
-
-/**
- * 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.
- */
-import java.io.IOException;
-import java.io.Reader;
-import org.apache.lucene.analysis.Analyzer;
-import org.apache.lucene.analysis.NumericTokenStream;
-import org.apache.lucene.analysis.util.CharTokenizer;
-import org.apache.lucene.util.NumericUtils;
-import static org.apache.blur.lucene.LuceneVersionConstant.LUCENE_VERSION;
-
-public final class DoubleAnalyzer extends Analyzer {
-
-  public static int PRECISION_STEP_DEFAULT = NumericUtils.PRECISION_STEP_DEFAULT;
-  private int precisionStep;
-
-  public DoubleAnalyzer() {
-    this(PRECISION_STEP_DEFAULT);
-  }
-
-  public DoubleAnalyzer(int precisionStep) {
-    this.precisionStep = precisionStep;
-  }
-
-  public int getPrecisionStep() {
-    return precisionStep;
-  }
-
-  public void setPrecisionStep(int precisionStep) {
-    this.precisionStep = precisionStep;
-  }
-  @Override
-  protected TokenStreamComponents createComponents(String fieldName,
-      Reader reader) {
-    final CharTokenizer source = new CharTokenizer(LUCENE_VERSION, reader) {
-      @Override
-      protected boolean isTokenChar(int arg0) {
-        return true;
-      }
-    };
-
-    final double value;
-    try {
-      value = toDouble(reader);
-    } catch (IOException e) {
-      throw new RuntimeException(e);
-    }
-    final NumericTokenStream numericTokenStream = new NumericTokenStream(
-        precisionStep);
-    numericTokenStream.setDoubleValue(value);
-
-    return new TokenStreamComponents(source, numericTokenStream) {
-      public void setReader(Reader reader) throws IOException {
-        numericTokenStream.reset();
-        numericTokenStream.setDoubleValue(toDouble(reader));
-      }
-    };
-  }
-  private double toDouble(Reader reader) throws IOException {
-    StringBuilder builder = new StringBuilder(20);
-    int read;
-    while ((read = reader.read()) != -1) {
-      builder.append((char) read);
-    }
-    return Double.parseDouble(builder.toString());
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/fcc9b6be/src/blur-core/src/main/java/org/apache/blur/analysis/FloatAnalyzer.java
----------------------------------------------------------------------
diff --git a/src/blur-core/src/main/java/org/apache/blur/analysis/FloatAnalyzer.java b/src/blur-core/src/main/java/org/apache/blur/analysis/FloatAnalyzer.java
deleted file mode 100644
index fb04888..0000000
--- a/src/blur-core/src/main/java/org/apache/blur/analysis/FloatAnalyzer.java
+++ /dev/null
@@ -1,86 +0,0 @@
-package org.apache.blur.analysis;
-
-/**
- * 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.
- */
-import java.io.IOException;
-import java.io.Reader;
-
-import org.apache.lucene.analysis.Analyzer;
-import org.apache.lucene.analysis.NumericTokenStream;
-import org.apache.lucene.analysis.util.CharTokenizer;
-import org.apache.lucene.util.NumericUtils;
-import static org.apache.blur.lucene.LuceneVersionConstant.LUCENE_VERSION;
-
-public final class FloatAnalyzer extends Analyzer {
-
-  public static int PRECISION_STEP_DEFAULT = NumericUtils.PRECISION_STEP_DEFAULT;
-  private int precisionStep;
-
-  public FloatAnalyzer() {
-    this(PRECISION_STEP_DEFAULT);
-  }
-
-  public FloatAnalyzer(int precisionStep) {
-    this.precisionStep = precisionStep;
-  }
-
-  public int getPrecisionStep() {
-    return precisionStep;
-  }
-
-  public void setPrecisionStep(int precisionStep) {
-    this.precisionStep = precisionStep;
-  }
-
-  private float toFloat(Reader reader) throws IOException {
-    StringBuilder builder = new StringBuilder(20);
-    int read;
-    while ((read = reader.read()) != -1) {
-      builder.append((char) read);
-    }
-    return Float.parseFloat(builder.toString());
-  }
-  
-  @Override
-  protected TokenStreamComponents createComponents(String fieldName,
-      Reader reader) {
-    final CharTokenizer source = new CharTokenizer(LUCENE_VERSION, reader) {
-      @Override
-      protected boolean isTokenChar(int arg0) {
-        return true;
-      }
-    };
-
-    final float value;
-    try {
-      value = toFloat(reader);
-    } catch (IOException e) {
-      throw new RuntimeException(e);
-    }
-    final NumericTokenStream numericTokenStream = new NumericTokenStream(
-        precisionStep);
-    numericTokenStream.setFloatValue(value);
-
-    return new TokenStreamComponents(source, numericTokenStream) {
-      public void setReader(Reader reader) throws IOException {
-        numericTokenStream.reset();
-        numericTokenStream.setFloatValue(toFloat(reader));
-      }
-    };
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/fcc9b6be/src/blur-core/src/main/java/org/apache/blur/analysis/IndexableFieldFactory.java
----------------------------------------------------------------------
diff --git a/src/blur-core/src/main/java/org/apache/blur/analysis/IndexableFieldFactory.java b/src/blur-core/src/main/java/org/apache/blur/analysis/IndexableFieldFactory.java
new file mode 100644
index 0000000..9fd82f2
--- /dev/null
+++ b/src/blur-core/src/main/java/org/apache/blur/analysis/IndexableFieldFactory.java
@@ -0,0 +1,22 @@
+package org.apache.blur.analysis;
+
+import org.apache.blur.thrift.generated.Field;
+import org.apache.lucene.index.IndexableField;
+
+/**
+ * This factory allows for overriding the default behavior of a field to be
+ * indexed.
+ */
+public abstract class IndexableFieldFactory {
+
+  /**
+   * The @{Field} that provided by the client has to be converted into a
+   * @{IndexableField} for Lucene to index.
+   * 
+   * @param thriftField
+   *          the provided thrift field
+   * @return the IndexableField.
+   */
+  public abstract IndexableField getIndexableField(Field thriftField);
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/fcc9b6be/src/blur-core/src/main/java/org/apache/blur/analysis/IntegerAnalyzer.java
----------------------------------------------------------------------
diff --git a/src/blur-core/src/main/java/org/apache/blur/analysis/IntegerAnalyzer.java b/src/blur-core/src/main/java/org/apache/blur/analysis/IntegerAnalyzer.java
deleted file mode 100644
index f63330e..0000000
--- a/src/blur-core/src/main/java/org/apache/blur/analysis/IntegerAnalyzer.java
+++ /dev/null
@@ -1,101 +0,0 @@
-package org.apache.blur.analysis;
-
-/**
- * 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.
- */
-import java.io.IOException;
-import java.io.Reader;
-
-import org.apache.lucene.analysis.Analyzer;
-import org.apache.lucene.analysis.NumericTokenStream;
-import org.apache.lucene.analysis.util.CharTokenizer;
-import org.apache.lucene.util.NumericUtils;
-import static org.apache.blur.lucene.LuceneVersionConstant.LUCENE_VERSION;
-
-public final class IntegerAnalyzer extends Analyzer {
-
-  public static int PRECISION_STEP_DEFAULT = NumericUtils.PRECISION_STEP_DEFAULT;
-  public static int RADIX_DEFAULT = 10;
-  private int radix = 10;
-  private int precisionStep;
-
-  public IntegerAnalyzer() {
-    this(PRECISION_STEP_DEFAULT, RADIX_DEFAULT);
-  }
-
-  public IntegerAnalyzer(int precisionStep) {
-    this(precisionStep, RADIX_DEFAULT);
-  }
-
-  public IntegerAnalyzer(int precisionStep, int radix) {
-    this.precisionStep = precisionStep;
-    this.radix = radix;
-  }
-
-  public int getRadix() {
-    return radix;
-  }
-
-  public void setRadix(int radix) {
-    this.radix = radix;
-  }
-
-  public int getPrecisionStep() {
-    return precisionStep;
-  }
-
-  public void setPrecisionStep(int precisionStep) {
-    this.precisionStep = precisionStep;
-  }
-
-  private int toInteger(Reader reader) throws IOException {
-    StringBuilder builder = new StringBuilder(20);
-    int read;
-    while ((read = reader.read()) != -1) {
-      builder.append((char) read);
-    }
-    return Integer.parseInt(builder.toString(), radix);
-  }
-  
-  @Override
-  protected TokenStreamComponents createComponents(String fieldName,
-      Reader reader) {
-    final CharTokenizer source = new CharTokenizer(LUCENE_VERSION, reader) {
-      @Override
-      protected boolean isTokenChar(int arg0) {
-        return true;
-      }
-    };
-
-    final int value;
-    try {
-      value = toInteger(reader);
-    } catch (IOException e) {
-      throw new RuntimeException(e);
-    }
-    final NumericTokenStream numericTokenStream = new NumericTokenStream(
-        precisionStep);
-    numericTokenStream.setIntValue(value);
-
-    return new TokenStreamComponents(source, numericTokenStream) {
-      public void setReader(Reader reader) throws IOException {
-        numericTokenStream.reset();
-        numericTokenStream.setIntValue(toInteger(reader));
-      }
-    };
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/fcc9b6be/src/blur-core/src/main/java/org/apache/blur/analysis/LongAnalyzer.java
----------------------------------------------------------------------
diff --git a/src/blur-core/src/main/java/org/apache/blur/analysis/LongAnalyzer.java b/src/blur-core/src/main/java/org/apache/blur/analysis/LongAnalyzer.java
deleted file mode 100644
index b8d7a54..0000000
--- a/src/blur-core/src/main/java/org/apache/blur/analysis/LongAnalyzer.java
+++ /dev/null
@@ -1,101 +0,0 @@
-package org.apache.blur.analysis;
-
-/**
- * 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.
- */
-import java.io.IOException;
-import java.io.Reader;
-
-import org.apache.lucene.analysis.Analyzer;
-import org.apache.lucene.analysis.NumericTokenStream;
-import org.apache.lucene.analysis.util.CharTokenizer;
-import org.apache.lucene.util.NumericUtils;
-import static org.apache.blur.lucene.LuceneVersionConstant.LUCENE_VERSION;
-
-public final class LongAnalyzer extends Analyzer {
-
-  public static int PRECISION_STEP_DEFAULT = NumericUtils.PRECISION_STEP_DEFAULT;
-  public static int RADIX_DEFAULT = 10;
-  private int radix = 10;
-  private int precisionStep;
-
-  public LongAnalyzer() {
-    this(PRECISION_STEP_DEFAULT, RADIX_DEFAULT);
-  }
-
-  public LongAnalyzer(int precisionStep) {
-    this(precisionStep, RADIX_DEFAULT);
-  }
-
-  public LongAnalyzer(int precisionStep, int radix) {
-    this.precisionStep = precisionStep;
-    this.radix = radix;
-  }
-
-  public int getRadix() {
-    return radix;
-  }
-
-  public void setRadix(int radix) {
-    this.radix = radix;
-  }
-
-  public int getPrecisionStep() {
-    return precisionStep;
-  }
-
-  public void setPrecisionStep(int precisionStep) {
-    this.precisionStep = precisionStep;
-  }
-
-  private long toLong(Reader reader) throws IOException {
-    StringBuilder builder = new StringBuilder(20);
-    int read;
-    while ((read = reader.read()) != -1) {
-      builder.append((char) read);
-    }
-    return Long.parseLong(builder.toString(), radix);
-  }
-  
-  @Override
-  protected TokenStreamComponents createComponents(String fieldName,
-      Reader reader) {
-    final CharTokenizer source = new CharTokenizer(LUCENE_VERSION, reader) {
-      @Override
-      protected boolean isTokenChar(int arg0) {
-        return true;
-      }
-    };
-
-    final long value;
-    try {
-      value = toLong(reader);
-    } catch (IOException e) {
-      throw new RuntimeException(e);
-    }
-    final NumericTokenStream numericTokenStream = new NumericTokenStream(
-        precisionStep);
-    numericTokenStream.setLongValue(value);
-
-    return new TokenStreamComponents(source, numericTokenStream) {
-      public void setReader(Reader reader) throws IOException {
-        numericTokenStream.reset();
-        numericTokenStream.setLongValue(toLong(reader));
-      }
-    };
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/fcc9b6be/src/blur-core/src/main/java/org/apache/blur/lucene/search/SuperParser.java
----------------------------------------------------------------------
diff --git a/src/blur-core/src/main/java/org/apache/blur/lucene/search/SuperParser.java b/src/blur-core/src/main/java/org/apache/blur/lucene/search/SuperParser.java
deleted file mode 100644
index 2a1b039..0000000
--- a/src/blur-core/src/main/java/org/apache/blur/lucene/search/SuperParser.java
+++ /dev/null
@@ -1,244 +0,0 @@
-package org.apache.blur.lucene.search;
-
-/**
- * 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.
- */
-import static org.apache.blur.utils.BlurConstants.SUPER;
-
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.UUID;
-
-import org.apache.blur.analysis.BlurAnalyzer;
-import org.apache.blur.analysis.BlurAnalyzer.TYPE;
-import org.apache.lucene.index.Term;
-import org.apache.lucene.queryparser.classic.ParseException;
-import org.apache.lucene.queryparser.classic.QueryParser;
-import org.apache.lucene.search.BooleanClause;
-import org.apache.lucene.search.BooleanQuery;
-import org.apache.lucene.search.Filter;
-import org.apache.lucene.search.FilteredQuery;
-import org.apache.lucene.search.MatchAllDocsQuery;
-import org.apache.lucene.search.MultiPhraseQuery;
-import org.apache.lucene.search.PhraseQuery;
-import org.apache.lucene.search.Query;
-import org.apache.lucene.util.Version;
-
-public class SuperParser extends QueryParser {
-
-  private final Map<Query, String> fieldNames = new HashMap<Query, String>();
-  private final boolean superSearch;
-  private final Filter queryFilter;
-  private final ScoreType scoreType;
-  private final BlurAnalyzer blurAnalyzer;
-
-  public SuperParser(Version matchVersion, BlurAnalyzer a, boolean superSearch, Filter queryFilter, ScoreType scoreType) {
-    super(matchVersion, SUPER, a);
-    this.setAutoGeneratePhraseQueries(true);
-    this.setAllowLeadingWildcard(true);
-    this.superSearch = superSearch;
-    this.queryFilter = queryFilter;
-    this.scoreType = scoreType;
-    this.blurAnalyzer = a;
-  }
-
-  @Override
-  public Query parse(String query) throws ParseException {
-    return reprocess(super.parse(query));
-  }
-
-  @Override
-  protected Query newFuzzyQuery(Term term, float minimumSimilarity, int prefixLength) {
-    String field = term.field();
-    TYPE type = blurAnalyzer.getTypeLookup(field);
-    if (type != TYPE.DEFAULT) {
-      throw new RuntimeException("Field [" + field + "] is type [" + type + "] which does not support fuzzy queries.");
-    }
-    return addField(super.newFuzzyQuery(term, minimumSimilarity, prefixLength), term.field());
-  }
-
-  @Override
-  protected Query newMatchAllDocsQuery() {
-    return addField(super.newMatchAllDocsQuery(), UUID.randomUUID().toString());
-  }
-
-  @Override
-  protected MultiPhraseQuery newMultiPhraseQuery() {
-    return new MultiPhraseQuery() {
-
-      @Override
-      public void add(Term[] terms, int position) {
-        super.add(terms, position);
-        for (Term term : terms) {
-          addField(this, term.field());
-        }
-      }
-    };
-  }
-
-  @Override
-  protected PhraseQuery newPhraseQuery() {
-    return new PhraseQuery() {
-
-      @Override
-      public void add(Term term, int position) {
-        super.add(term, position);
-        addField(this, term.field());
-      }
-    };
-  }
-
-  @Override
-  protected Query newPrefixQuery(Term prefix) {
-    String field = prefix.field();
-    TYPE type = blurAnalyzer.getTypeLookup(field);
-    if (type != TYPE.DEFAULT) {
-      throw new RuntimeException("Field [" + field + "] is type [" + type + "] which does not support prefix queries.");
-    }
-    return addField(super.newPrefixQuery(prefix), field);
-  }
-
-  @Override
-  protected Query newRangeQuery(String field, String part1, String part2, boolean startInclusive, boolean endInclusive) {
-    Query q = blurAnalyzer.getNewRangeQuery(field, part1, part2, startInclusive, endInclusive);
-    if (q != null) {
-      return addField(q, field);
-    }
-    return addField(super.newRangeQuery(field, part1, part2, startInclusive, endInclusive), field);
-  }
-
-  @Override
-  protected Query newTermQuery(Term term) {
-    String field = term.field();
-    Query q = blurAnalyzer.getNewRangeQuery(field, term.text(), term.text(), true, true);
-    if (q != null) {
-      return addField(q, field);
-    }
-    return addField(super.newTermQuery(term), field);
-  }
-
-  @Override
-  protected Query newWildcardQuery(Term t) {
-    if (SUPER.equals(t.field()) && "*".equals(t.text())) {
-      return new MatchAllDocsQuery();
-    }
-    String field = t.field();
-    TYPE type = blurAnalyzer.getTypeLookup(field);
-    if (type != TYPE.DEFAULT) {
-      throw new RuntimeException("Field [" + field + "] is type [" + type + "] which does not support wildcard queries.");
-    }
-    return addField(super.newWildcardQuery(t), t.field());
-  }
-
-  private Query reprocess(Query query) {
-    if (query == null || !isSuperSearch()) {
-      return wrapFilter(query);
-    }
-    if (query instanceof BooleanQuery) {
-      BooleanQuery booleanQuery = (BooleanQuery) query;
-      List<BooleanClause> clauses = booleanQuery.clauses();
-      for (BooleanClause bc : clauses) {
-        Query q = bc.getQuery();
-        bc.setQuery(newSuperQuery(q));
-      }
-      return booleanQuery;
-
-      // if (isSameGroupName(booleanQuery)) {
-      // return newSuperQuery(query);
-      // } else {
-      // List<BooleanClause> clauses = booleanQuery.clauses();
-      // for (BooleanClause clause : clauses) {
-      // clause.setQuery(reprocess(clause.getQuery()));
-      // }
-      // return booleanQuery;
-      // }
-    } else {
-      return newSuperQuery(query);
-    }
-  }
-
-  private SuperQuery newSuperQuery(Query query) {
-    return new SuperQuery(wrapFilter(query), scoreType);
-  }
-
-  private Query wrapFilter(Query query) {
-    if (queryFilter == null) {
-      return query;
-    }
-    return new FilteredQuery(query, queryFilter);
-  }
-
-  // private boolean isSameGroupName(BooleanQuery booleanQuery) {
-  // String groupName = findFirstGroupName(booleanQuery);
-  // if (groupName == null) {
-  // return false;
-  // }
-  // return isSameGroupName(booleanQuery, groupName);
-  // }
-  //
-  // private boolean isSameGroupName(Query query, String groupName) {
-  // if (query instanceof BooleanQuery) {
-  // BooleanQuery booleanQuery = (BooleanQuery) query;
-  // for (BooleanClause clause : booleanQuery.clauses()) {
-  // if (!isSameGroupName(clause.getQuery(), groupName)) {
-  // return false;
-  // }
-  // }
-  // return true;
-  // } else {
-  // String fieldName = fieldNames.get(query);
-  // String currentGroupName = getGroupName(fieldName);
-  // if (groupName.equals(currentGroupName)) {
-  // return true;
-  // }
-  // return false;
-  // }
-  // }
-  //
-  // private String getGroupName(String fieldName) {
-  // if (fieldName == null) {
-  // return null;
-  // }
-  // int index = fieldName.indexOf(SEP);
-  // if (index < 0) {
-  // return null;
-  // }
-  // return fieldName.substring(0, index);
-  // }
-  //
-  // private String findFirstGroupName(Query query) {
-  // if (query instanceof BooleanQuery) {
-  // BooleanQuery booleanQuery = (BooleanQuery) query;
-  // for (BooleanClause clause : booleanQuery.clauses()) {
-  // return findFirstGroupName(clause.getQuery());
-  // }
-  // return null;
-  // } else {
-  // String fieldName = fieldNames.get(query);
-  // return getGroupName(fieldName);
-  // }
-  // }
-
-  private Query addField(Query q, String field) {
-    fieldNames.put(q, field);
-    return q;
-  }
-
-  public boolean isSuperSearch() {
-    return superSearch;
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/fcc9b6be/src/blur-core/src/test/java/org/apache/blur/analysis/BlurAnalyzerTest.java
----------------------------------------------------------------------
diff --git a/src/blur-core/src/test/java/org/apache/blur/analysis/BlurAnalyzerTest.java b/src/blur-core/src/test/java/org/apache/blur/analysis/BlurAnalyzerTest.java
index f8d4ffb..e7eecbf 100644
--- a/src/blur-core/src/test/java/org/apache/blur/analysis/BlurAnalyzerTest.java
+++ b/src/blur-core/src/test/java/org/apache/blur/analysis/BlurAnalyzerTest.java
@@ -17,117 +17,15 @@ package org.apache.blur.analysis;
  * limitations under the License.
  */
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
-
 import java.io.IOException;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Set;
-import java.util.TreeSet;
 
-import org.apache.blur.thrift.generated.AlternateColumnDefinition;
-import org.apache.blur.thrift.generated.AnalyzerDefinition;
-import org.apache.blur.thrift.generated.ColumnDefinition;
-import org.apache.blur.thrift.generated.ColumnFamilyDefinition;
-import org.apache.lucene.document.Field.Store;
 import org.junit.Test;
 
 public class BlurAnalyzerTest {
 
-  private static final String STANDARD = "org.apache.lucene.analysis.standard.StandardAnalyzer";
-
-  @Test
-  public void testToAndFromJSONDef1() throws IOException {
-    BlurAnalyzer analyzer = new BlurAnalyzer(getDef1());
-    String json = analyzer.toJSON();
-    BlurAnalyzer analyzer2 = BlurAnalyzer.create(json);
-    assertEquals(analyzer.getAnalyzerDefinition(), analyzer2.getAnalyzerDefinition());
-  }
-
-  @Test
-  public void testStoringOfFieldDef1() throws IOException {
-    BlurAnalyzer analyzer = new BlurAnalyzer(getDef1());
-    assertEquals(Store.NO, analyzer.getStore("b.c.sub1"));
-    assertEquals(Store.YES, analyzer.getStore("b.c"));
-  }
-
-  @Test
-  public void testGetSubFieldsDef1() throws IOException {
-    BlurAnalyzer analyzer = new BlurAnalyzer(getDef1());
-    assertNull(analyzer.getSubIndexNames("b.d"));
-    Set<String> subIndexNames = analyzer.getSubIndexNames("b.c");
-    TreeSet<String> set = new TreeSet<String>();
-    set.add("b.c.sub1");
-    set.add("b.c.sub2");
-    assertEquals(set, subIndexNames);
-  }
-
-  @Test
-  public void testFullTextFieldsDef1() throws IOException {
-    BlurAnalyzer analyzer = new BlurAnalyzer(getDef1());
-    assertTrue(analyzer.isFullTextField("a.b"));
-    assertFalse(analyzer.isFullTextField("a.d"));
-  }
-
-  @Test
-  public void testToAndFromJSONDef2() throws IOException {
-    BlurAnalyzer analyzer = new BlurAnalyzer(getDef2());
-    String json = analyzer.toJSON();
-    BlurAnalyzer analyzer2 = BlurAnalyzer.create(json);
-    assertEquals(analyzer.getAnalyzerDefinition(), analyzer2.getAnalyzerDefinition());
-  }
-
-  @Test
-  public void testStoringOfFieldDef2() throws IOException {
-    BlurAnalyzer analyzer = new BlurAnalyzer(getDef2());
-    assertEquals(Store.YES, analyzer.getStore("a.b"));
-    assertEquals(Store.YES, analyzer.getStore("b.c"));
-  }
-
   @Test
-  public void testGetSubFieldsDef2() throws IOException {
-    BlurAnalyzer analyzer = new BlurAnalyzer(getDef2());
-    assertNull(analyzer.getSubIndexNames("b.d"));
-  }
+  public void testNeedsToBeWritten() throws IOException {
 
-  @Test
-  public void testFullTextFieldsDef2() throws IOException {
-    BlurAnalyzer analyzer = new BlurAnalyzer(getDef2());
-    assertTrue(analyzer.isFullTextField("a.b"));
-    assertFalse(analyzer.isFullTextField("d.a"));
   }
 
-  private AnalyzerDefinition getDef1() {
-
-    AnalyzerDefinition analyzerDefinition = new AnalyzerDefinition().setDefaultDefinition(new ColumnDefinition(STANDARD, false, null)).setFullTextAnalyzerClassName(STANDARD);
-    Map<String, ColumnFamilyDefinition> columnFamilyDefinitions = new HashMap<String, ColumnFamilyDefinition>();
-
-    ColumnFamilyDefinition aColumnFamilyDefinition = new ColumnFamilyDefinition();
-
-    Map<String, ColumnDefinition> aColumnDefinitions = new HashMap<String, ColumnDefinition>();
-    aColumnDefinitions.put("b", new ColumnDefinition(STANDARD, true, null));
-    aColumnFamilyDefinition.setColumnDefinitions(aColumnDefinitions);
-    columnFamilyDefinitions.put("a", aColumnFamilyDefinition);
-
-    Map<String, ColumnDefinition> bColumnDefinitions = new HashMap<String, ColumnDefinition>();
-    Map<String, AlternateColumnDefinition> alternates = new HashMap<String, AlternateColumnDefinition>();
-    alternates.put("sub1", new AlternateColumnDefinition(STANDARD));
-    alternates.put("sub2", new AlternateColumnDefinition(STANDARD));
-    bColumnDefinitions.put("c", new ColumnDefinition(STANDARD, true, alternates));
-    ColumnFamilyDefinition bColumnFamilyDefinition = new ColumnFamilyDefinition();
-    bColumnFamilyDefinition.setColumnDefinitions(bColumnDefinitions);
-    columnFamilyDefinitions.put("b", bColumnFamilyDefinition);
-
-    analyzerDefinition.setColumnFamilyDefinitions(columnFamilyDefinitions);
-    return analyzerDefinition;
-  }
-
-  private AnalyzerDefinition getDef2() {
-    AnalyzerDefinition analyzerDefinition = new AnalyzerDefinition().setDefaultDefinition(new ColumnDefinition(STANDARD, false, null)).setFullTextAnalyzerClassName(STANDARD);
-    analyzerDefinition.putToColumnFamilyDefinitions("a", new ColumnFamilyDefinition().setDefaultDefinition(new ColumnDefinition(STANDARD, true, null)));
-    return analyzerDefinition;
-  }
 }

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/fcc9b6be/src/blur-core/src/test/java/org/apache/blur/analysis/DoubleAnalyzerTest.java
----------------------------------------------------------------------
diff --git a/src/blur-core/src/test/java/org/apache/blur/analysis/DoubleAnalyzerTest.java b/src/blur-core/src/test/java/org/apache/blur/analysis/DoubleAnalyzerTest.java
deleted file mode 100644
index 1dd4e9d..0000000
--- a/src/blur-core/src/test/java/org/apache/blur/analysis/DoubleAnalyzerTest.java
+++ /dev/null
@@ -1,94 +0,0 @@
-package org.apache.blur.analysis;
-
-/**
- * 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.
- */
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
-import java.io.IOException;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.apache.blur.index.IndexWriter;
-import org.apache.blur.thrift.generated.AnalyzerDefinition;
-import org.apache.blur.thrift.generated.ColumnDefinition;
-import org.apache.blur.thrift.generated.ColumnFamilyDefinition;
-import org.apache.lucene.analysis.Analyzer;
-import org.apache.lucene.document.Document;
-import org.apache.lucene.document.Field.Store;
-import org.apache.lucene.document.TextField;
-import org.apache.lucene.index.DirectoryReader;
-import org.apache.lucene.index.IndexWriterConfig;
-import org.apache.lucene.search.IndexSearcher;
-import org.apache.lucene.search.NumericRangeQuery;
-import org.apache.lucene.search.Query;
-import org.apache.lucene.search.ScoreDoc;
-import org.apache.lucene.search.TopDocs;
-import org.apache.lucene.store.Directory;
-import org.apache.lucene.store.RAMDirectory;
-import static org.apache.blur.lucene.LuceneVersionConstant.LUCENE_VERSION;
-import org.junit.Test;
-
-public class DoubleAnalyzerTest {
-
-  @Test
-  public void testDoubleAnalyzer() throws IOException {
-    AnalyzerDefinition analyzerDefinition = new AnalyzerDefinition();
-    Map<String, ColumnDefinition> columnDefinitions = new HashMap<String, ColumnDefinition>();
-    columnDefinitions.put("test", new ColumnDefinition("double", false, null));
-    ColumnFamilyDefinition val = new ColumnFamilyDefinition(null, columnDefinitions);
-    analyzerDefinition.putToColumnFamilyDefinitions("test", val);
-    Analyzer analyzer = new BlurAnalyzer(analyzerDefinition);
-    runTestString(analyzer);
-  }
-
-  @Test
-  public void testDoubleAnalyzerDifferentStep() throws IOException {
-    AnalyzerDefinition analyzerDefinition = new AnalyzerDefinition();
-    Map<String, ColumnDefinition> columnDefinitions = new HashMap<String, ColumnDefinition>();
-    columnDefinitions.put("test", new ColumnDefinition("double,4", false, null));
-    ColumnFamilyDefinition val = new ColumnFamilyDefinition(null, columnDefinitions);
-    analyzerDefinition.putToColumnFamilyDefinitions("test", val);
-    Analyzer analyzer = new BlurAnalyzer(analyzerDefinition);
-    runTestString(analyzer);
-  }
-
-  private void runTestString(Analyzer analyzer) throws IOException {
-    IndexWriterConfig conf = new IndexWriterConfig(LUCENE_VERSION, analyzer);
-    Directory dir = new RAMDirectory();
-    IndexWriter indexWriter = new IndexWriter(dir, conf);
-    for (int i = 0; i < 1000; i++) {
-      Document document = new Document();
-      String value = Double.toString(i);
-      document.add(new TextField("test.test", value, Store.YES));
-      indexWriter.addDocument(document);
-    }
-    indexWriter.close();
-
-    IndexSearcher searcher = new IndexSearcher(DirectoryReader.open(dir));
-    NumericRangeQuery<Double> query = NumericRangeQuery.newDoubleRange("test.test", 0.0, 2.0, true, true);
-    Query rewrite = searcher.rewrite(query);
-    TopDocs docs = searcher.search(rewrite, 100);
-    ScoreDoc[] scoreDocs = docs.scoreDocs;
-    assertEquals(3, docs.totalHits);
-    for (int i = 0; i < docs.totalHits; i++) {
-      Document document = searcher.doc(scoreDocs[i].doc);
-      assertTrue(Double.parseDouble(document.get("test.test")) < 3.0);
-    }
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/fcc9b6be/src/blur-core/src/test/java/org/apache/blur/analysis/FloatAnalyzerTest.java
----------------------------------------------------------------------
diff --git a/src/blur-core/src/test/java/org/apache/blur/analysis/FloatAnalyzerTest.java b/src/blur-core/src/test/java/org/apache/blur/analysis/FloatAnalyzerTest.java
deleted file mode 100644
index 4b57cb2..0000000
--- a/src/blur-core/src/test/java/org/apache/blur/analysis/FloatAnalyzerTest.java
+++ /dev/null
@@ -1,94 +0,0 @@
-package org.apache.blur.analysis;
-
-/**
- * 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.
- */
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
-import java.io.IOException;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.apache.blur.index.IndexWriter;
-import org.apache.blur.thrift.generated.AnalyzerDefinition;
-import org.apache.blur.thrift.generated.ColumnDefinition;
-import org.apache.blur.thrift.generated.ColumnFamilyDefinition;
-import org.apache.lucene.analysis.Analyzer;
-import org.apache.lucene.document.Document;
-import org.apache.lucene.document.Field.Store;
-import org.apache.lucene.document.TextField;
-import org.apache.lucene.index.DirectoryReader;
-import org.apache.lucene.index.IndexWriterConfig;
-import org.apache.lucene.search.IndexSearcher;
-import org.apache.lucene.search.NumericRangeQuery;
-import org.apache.lucene.search.Query;
-import org.apache.lucene.search.ScoreDoc;
-import org.apache.lucene.search.TopDocs;
-import org.apache.lucene.store.Directory;
-import org.apache.lucene.store.RAMDirectory;
-import static org.apache.blur.lucene.LuceneVersionConstant.LUCENE_VERSION;
-import org.junit.Test;
-
-public class FloatAnalyzerTest {
-
-  @Test
-  public void testFloatAnalyzer() throws IOException {
-    AnalyzerDefinition analyzerDefinition = new AnalyzerDefinition();
-    Map<String, ColumnDefinition> columnDefinitions = new HashMap<String, ColumnDefinition>();
-    columnDefinitions.put("test", new ColumnDefinition("float", false, null));
-    ColumnFamilyDefinition val = new ColumnFamilyDefinition(null, columnDefinitions);
-    analyzerDefinition.putToColumnFamilyDefinitions("test", val);
-    Analyzer analyzer = new BlurAnalyzer(analyzerDefinition);
-    runTestString(analyzer);
-  }
-
-  @Test
-  public void testFloatAnalyzerDifferentStep() throws IOException {
-    AnalyzerDefinition analyzerDefinition = new AnalyzerDefinition();
-    Map<String, ColumnDefinition> columnDefinitions = new HashMap<String, ColumnDefinition>();
-    columnDefinitions.put("test", new ColumnDefinition("float,4", false, null));
-    ColumnFamilyDefinition val = new ColumnFamilyDefinition(null, columnDefinitions);
-    analyzerDefinition.putToColumnFamilyDefinitions("test", val);
-    Analyzer analyzer = new BlurAnalyzer(analyzerDefinition);
-    runTestString(analyzer);
-  }
-
-  private void runTestString(Analyzer analyzer) throws IOException {
-    IndexWriterConfig conf = new IndexWriterConfig(LUCENE_VERSION, analyzer);
-    Directory dir = new RAMDirectory();
-    IndexWriter indexWriter = new IndexWriter(dir, conf);
-    for (int i = 0; i < 1000; i++) {
-      Document document = new Document();
-      String value = Float.toString(i);
-      document.add(new TextField("test.test", value, Store.YES));
-      indexWriter.addDocument(document);
-    }
-    indexWriter.close();
-
-    IndexSearcher searcher = new IndexSearcher(DirectoryReader.open(dir));
-    NumericRangeQuery<Float> query = NumericRangeQuery.newFloatRange("test.test", 0.0F, 2.0F, true, true);
-    Query rewrite = searcher.rewrite(query);
-    TopDocs docs = searcher.search(rewrite, 100);
-    ScoreDoc[] scoreDocs = docs.scoreDocs;
-    assertEquals(3, docs.totalHits);
-    for (int i = 0; i < docs.totalHits; i++) {
-      Document document = searcher.doc(scoreDocs[i].doc);
-      assertTrue(Float.parseFloat(document.get("test.test")) < 3.0F);
-    }
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/fcc9b6be/src/blur-core/src/test/java/org/apache/blur/analysis/IntegerAnalyzerTest.java
----------------------------------------------------------------------
diff --git a/src/blur-core/src/test/java/org/apache/blur/analysis/IntegerAnalyzerTest.java b/src/blur-core/src/test/java/org/apache/blur/analysis/IntegerAnalyzerTest.java
deleted file mode 100644
index c189ec1..0000000
--- a/src/blur-core/src/test/java/org/apache/blur/analysis/IntegerAnalyzerTest.java
+++ /dev/null
@@ -1,105 +0,0 @@
-package org.apache.blur.analysis;
-
-/**
- * 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.
- */
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
-import java.io.IOException;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.apache.blur.index.IndexWriter;
-import org.apache.blur.thrift.generated.AnalyzerDefinition;
-import org.apache.blur.thrift.generated.ColumnDefinition;
-import org.apache.blur.thrift.generated.ColumnFamilyDefinition;
-import org.apache.lucene.analysis.Analyzer;
-import org.apache.lucene.document.Document;
-import org.apache.lucene.document.Field.Store;
-import org.apache.lucene.document.TextField;
-import org.apache.lucene.index.DirectoryReader;
-import org.apache.lucene.index.IndexWriterConfig;
-import org.apache.lucene.search.IndexSearcher;
-import org.apache.lucene.search.NumericRangeQuery;
-import org.apache.lucene.search.Query;
-import org.apache.lucene.search.ScoreDoc;
-import org.apache.lucene.search.TopDocs;
-import org.apache.lucene.store.Directory;
-import org.apache.lucene.store.RAMDirectory;
-import static org.apache.blur.lucene.LuceneVersionConstant.LUCENE_VERSION;
-import org.junit.Test;
-
-public class IntegerAnalyzerTest {
-
-  @Test
-  public void testIntegerAnalyzer() throws IOException {
-    AnalyzerDefinition analyzerDefinition = new AnalyzerDefinition();
-    Map<String, ColumnDefinition> columnDefinitions = new HashMap<String, ColumnDefinition>();
-    columnDefinitions.put("test", new ColumnDefinition("integer", false, null));
-    ColumnFamilyDefinition val = new ColumnFamilyDefinition(null, columnDefinitions);
-    analyzerDefinition.putToColumnFamilyDefinitions("test", val);
-    Analyzer analyzer = new BlurAnalyzer(analyzerDefinition);
-    runTestString(analyzer, 10);
-  }
-
-  @Test
-  public void testIntegerAnalyzerDifferentStep() throws IOException {
-    AnalyzerDefinition analyzerDefinition = new AnalyzerDefinition();
-    Map<String, ColumnDefinition> columnDefinitions = new HashMap<String, ColumnDefinition>();
-    columnDefinitions.put("test", new ColumnDefinition("integer,4", false, null));
-    ColumnFamilyDefinition val = new ColumnFamilyDefinition(null, columnDefinitions);
-    analyzerDefinition.putToColumnFamilyDefinitions("test", val);
-    Analyzer analyzer = new BlurAnalyzer(analyzerDefinition);
-    runTestString(analyzer, 10);
-  }
-
-  @Test
-  public void testIntegerAnalyzerDifferentStepAndRadix() throws IOException {
-    AnalyzerDefinition analyzerDefinition = new AnalyzerDefinition();
-    Map<String, ColumnDefinition> columnDefinitions = new HashMap<String, ColumnDefinition>();
-    columnDefinitions.put("test", new ColumnDefinition("integer,4,16", false, null));
-    ColumnFamilyDefinition val = new ColumnFamilyDefinition(null, columnDefinitions);
-    analyzerDefinition.putToColumnFamilyDefinitions("test", val);
-    Analyzer analyzer = new BlurAnalyzer(analyzerDefinition);
-    runTestString(analyzer, 16);
-  }
-
-  private void runTestString(Analyzer analyzer, int radix) throws IOException {
-    IndexWriterConfig conf = new IndexWriterConfig(LUCENE_VERSION, analyzer);
-    Directory dir = new RAMDirectory();
-    IndexWriter indexWriter = new IndexWriter(dir, conf);
-    for (int i = 0; i < 1000; i++) {
-      Document document = new Document();
-      String value = Integer.toString(i, radix);
-      document.add(new TextField("test.test", value, Store.YES));
-      indexWriter.addDocument(document);
-    }
-    indexWriter.close();
-
-    IndexSearcher searcher = new IndexSearcher(DirectoryReader.open(dir));
-    NumericRangeQuery<Integer> query = NumericRangeQuery.newIntRange("test.test", 0, 2, true, true);
-    Query rewrite = searcher.rewrite(query);
-    TopDocs docs = searcher.search(rewrite, 100);
-    ScoreDoc[] scoreDocs = docs.scoreDocs;
-    assertEquals(3, docs.totalHits);
-    for (int i = 0; i < docs.totalHits; i++) {
-      Document document = searcher.doc(scoreDocs[i].doc);
-      assertTrue(Integer.parseInt(document.get("test.test"), radix) < 3);
-    }
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/fcc9b6be/src/blur-core/src/test/java/org/apache/blur/analysis/LongAnalyzerTest.java
----------------------------------------------------------------------
diff --git a/src/blur-core/src/test/java/org/apache/blur/analysis/LongAnalyzerTest.java b/src/blur-core/src/test/java/org/apache/blur/analysis/LongAnalyzerTest.java
deleted file mode 100644
index a55ef1e..0000000
--- a/src/blur-core/src/test/java/org/apache/blur/analysis/LongAnalyzerTest.java
+++ /dev/null
@@ -1,107 +0,0 @@
-package org.apache.blur.analysis;
-
-/**
- * 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.
- */
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
-import java.io.IOException;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.apache.blur.index.IndexWriter;
-import org.apache.blur.thrift.generated.AnalyzerDefinition;
-import org.apache.blur.thrift.generated.ColumnDefinition;
-import org.apache.blur.thrift.generated.ColumnFamilyDefinition;
-import org.apache.lucene.analysis.Analyzer;
-import org.apache.lucene.document.Document;
-import org.apache.lucene.document.Field.Store;
-import org.apache.lucene.document.TextField;
-import org.apache.lucene.index.DirectoryReader;
-import org.apache.lucene.index.IndexWriterConfig;
-import org.apache.lucene.search.IndexSearcher;
-import org.apache.lucene.search.NumericRangeQuery;
-import org.apache.lucene.search.Query;
-import org.apache.lucene.search.ScoreDoc;
-import org.apache.lucene.search.TopDocs;
-import org.apache.lucene.store.Directory;
-import org.apache.lucene.store.RAMDirectory;
-import static org.apache.blur.lucene.LuceneVersionConstant.LUCENE_VERSION;
-
-import org.junit.Test;
-
-public class LongAnalyzerTest {
-
-  @Test
-  public void testLongAnalyzer() throws IOException {
-    AnalyzerDefinition analyzerDefinition = new AnalyzerDefinition();
-    Map<String, ColumnDefinition> columnDefinitions = new HashMap<String, ColumnDefinition>();
-    columnDefinitions.put("test", new ColumnDefinition("long", false, null));
-    ColumnFamilyDefinition val = new ColumnFamilyDefinition(null, columnDefinitions);
-    analyzerDefinition.putToColumnFamilyDefinitions("test", val);
-    Analyzer analyzer = new BlurAnalyzer(analyzerDefinition);
-    runTestString(analyzer, 10);
-  }
-
-  @Test
-  public void testLongAnalyzerDifferentStep() throws IOException {
-
-    AnalyzerDefinition analyzerDefinition = new AnalyzerDefinition();
-    Map<String, ColumnDefinition> columnDefinitions = new HashMap<String, ColumnDefinition>();
-    columnDefinitions.put("test", new ColumnDefinition("long,4", false, null));
-    ColumnFamilyDefinition val = new ColumnFamilyDefinition(null, columnDefinitions);
-    analyzerDefinition.putToColumnFamilyDefinitions("test", val);
-    Analyzer analyzer = new BlurAnalyzer(analyzerDefinition);
-    runTestString(analyzer, 10);
-  }
-
-  @Test
-  public void testLongAnalyzerDifferentStepAndRadix() throws IOException {
-    AnalyzerDefinition analyzerDefinition = new AnalyzerDefinition();
-    Map<String, ColumnDefinition> columnDefinitions = new HashMap<String, ColumnDefinition>();
-    columnDefinitions.put("test", new ColumnDefinition("long,4,16", false, null));
-    ColumnFamilyDefinition val = new ColumnFamilyDefinition(null, columnDefinitions);
-    analyzerDefinition.putToColumnFamilyDefinitions("test", val);
-    Analyzer analyzer = new BlurAnalyzer(analyzerDefinition);
-    runTestString(analyzer, 16);
-  }
-
-  private void runTestString(Analyzer analyzer, int radix) throws IOException {
-    IndexWriterConfig conf = new IndexWriterConfig(LUCENE_VERSION, analyzer);
-    Directory dir = new RAMDirectory();
-    IndexWriter indexWriter = new IndexWriter(dir, conf);
-    for (int i = 0; i < 1000; i++) {
-      Document document = new Document();
-      String value = Long.toString(i, radix);
-      document.add(new TextField("test.test", value, Store.YES));
-      indexWriter.addDocument(document);
-    }
-    indexWriter.close();
-
-    IndexSearcher searcher = new IndexSearcher(DirectoryReader.open(dir));
-    NumericRangeQuery<Long> query = NumericRangeQuery.newLongRange("test.test", 0L, 2L, true, true);
-    Query rewrite = searcher.rewrite(query);
-    TopDocs docs = searcher.search(rewrite, 100);
-    ScoreDoc[] scoreDocs = docs.scoreDocs;
-    assertEquals(3, docs.totalHits);
-    for (int i = 0; i < docs.totalHits; i++) {
-      Document document = searcher.doc(scoreDocs[i].doc);
-      assertTrue(Long.parseLong(document.get("test.test"), radix) < 3);
-    }
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/fcc9b6be/src/blur-core/src/test/java/org/apache/blur/lucene/search/SuperParserTest.java
----------------------------------------------------------------------
diff --git a/src/blur-core/src/test/java/org/apache/blur/lucene/search/SuperParserTest.java b/src/blur-core/src/test/java/org/apache/blur/lucene/search/SuperParserTest.java
deleted file mode 100644
index 498fb08..0000000
--- a/src/blur-core/src/test/java/org/apache/blur/lucene/search/SuperParserTest.java
+++ /dev/null
@@ -1,236 +0,0 @@
-package org.apache.blur.lucene.search;
-
-/**
- * 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.
- */
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.fail;
-
-import java.util.List;
-
-import org.apache.blur.analysis.BlurAnalyzer;
-import org.apache.blur.thrift.generated.AnalyzerDefinition;
-import org.apache.blur.thrift.generated.ColumnDefinition;
-import org.apache.blur.thrift.generated.ColumnFamilyDefinition;
-import org.apache.blur.thrift.generated.ScoreType;
-import org.apache.lucene.analysis.standard.StandardAnalyzer;
-import org.apache.lucene.index.Term;
-import org.apache.lucene.queryparser.classic.ParseException;
-import org.apache.lucene.search.BooleanClause;
-import org.apache.lucene.search.BooleanClause.Occur;
-import org.apache.lucene.search.BooleanQuery;
-import org.apache.lucene.search.NumericRangeQuery;
-import org.apache.lucene.search.Query;
-import org.apache.lucene.search.TermQuery;
-import static org.apache.blur.lucene.LuceneVersionConstant.LUCENE_VERSION;
-import org.junit.Before;
-import org.junit.Test;
-
-public class SuperParserTest {
-
-  private BlurAnalyzer analyzer;
-
-  @Before
-  public void setup() {
-    AnalyzerDefinition ad = new AnalyzerDefinition();
-    ad.setDefaultDefinition(new ColumnDefinition(StandardAnalyzer.class.getName(), true, null));
-    ColumnFamilyDefinition cfDef = new ColumnFamilyDefinition();
-    cfDef.putToColumnDefinitions("id_l", new ColumnDefinition("long", false, null));
-    cfDef.putToColumnDefinitions("id_d", new ColumnDefinition("double", false, null));
-    cfDef.putToColumnDefinitions("id_f", new ColumnDefinition("float", false, null));
-    cfDef.putToColumnDefinitions("id_i", new ColumnDefinition("integer", false, null));
-    ad.putToColumnFamilyDefinitions("a", cfDef);
-    analyzer = new BlurAnalyzer(ad);
-  }
-
-  @Test
-  public void test1() throws ParseException {
-    Query q = parseSq("(a.b:cool) (+a.c:cool a.b:cool)");
-    assertQuery(bq(bc(sq(tq("a.b", "cool"))), bc(sq(bq(bc_m(tq("a.c", "cool")), bc(tq("a.b", "cool")))))), q);
-  }
-
-  @Test
-  public void test2() throws ParseException {
-    Query q = parseSq("(a.b:cool) (a.c:cool a.b:cool)");
-    assertQuery(bq(bc(sq(tq("a.b", "cool"))), bc(sq(bq(bc(tq("a.c", "cool")), bc(tq("a.b", "cool")))))), q);
-  }
-
-  @Test
-  public void test3() throws ParseException {
-    Query q = parseSq("a.b:cool (a.c:cool a.b:cool)");
-    assertQuery(bq(bc(sq(tq("a.b", "cool"))), bc(sq(bq(bc(tq("a.c", "cool")), bc(tq("a.b", "cool")))))), q);
-  }
-
-  @Test
-  public void test4() throws ParseException {
-    Query q = parseSq("a.b:cool a.c:cool a.b:cool");
-    assertQuery(bq(bc(sq(tq("a.b", "cool"))), bc(sq(tq("a.c", "cool"))), bc(sq(tq("a.b", "cool")))), q);
-  }
-
-  @Test
-  public void test5() throws ParseException {
-    Query q = parseSq("(a.b:cool) (+a.c:cool c.b:cool)");
-    assertQuery(bq(bc(sq(tq("a.b", "cool"))), bc(sq(bq(bc_m(tq("a.c", "cool")), bc(tq("c.b", "cool")))))), q);
-  }
-
-  @Test
-  public void test6() throws ParseException {
-    Query q = parseSq("(a.b:cool) (a.c:cool c.b:cool)");
-    assertQuery(bq(bc(sq(tq("a.b", "cool"))), bc(sq(bq(bc(tq("a.c", "cool")), bc(tq("c.b", "cool")))))), q);
-  }
-
-  @Test
-  public void test7() throws ParseException {
-    Query q = parseSq("a.b:cool (a.c:cool c.b:cool)");
-    assertQuery(bq(bc(sq(tq("a.b", "cool"))), bc(sq(bq(bc(tq("a.c", "cool")), bc(tq("c.b", "cool")))))), q);
-  }
-
-  @Test
-  public void test8() throws ParseException {
-    Query q = parseSq("a.b:cool a.c:cool c.b:cool");
-    assertQuery(bq(bc(sq(tq("a.b", "cool"))), bc(sq(tq("a.c", "cool"))), bc(sq(tq("c.b", "cool")))), q);
-  }
-
-  @Test
-  public void test9() throws ParseException {
-    Query q = parseSq("a.id_l:[0 TO 2]");
-    assertQuery(sq(rq_i("a.id_l", 0L, 2L)), q);
-  }
-  
-  @Test
-  public void test10() throws ParseException {
-    Query q = parseSq("a.id_d:[0 TO 2]");
-    assertQuery(sq(rq_i("a.id_d", 0.0D, 2.0D)), q);
-  }
-  
-  @Test
-  public void test11() throws ParseException {
-    Query q = parseSq("a.id_f:[0 TO 2]");
-    assertQuery(sq(rq_i("a.id_f", 0.0F, 2.0F)), q);
-  }
-  
-  @Test
-  public void test12() throws ParseException {
-    Query q = parseSq("a.id_i:[0 TO 2]");
-    assertQuery(sq(rq_i("a.id_i", 0, 2)), q);
-  }
-
-  public static BooleanClause bc_m(Query q) {
-    return new BooleanClause(q, Occur.MUST);
-  }
-
-  public static BooleanClause bc_n(Query q) {
-    return new BooleanClause(q, Occur.MUST_NOT);
-  }
-
-  public static BooleanClause bc(Query q) {
-    return new BooleanClause(q, Occur.SHOULD);
-  }
-
-  public static void assertQuery(Query expected, Query actual) {
-    System.out.println(expected);
-    System.out.println(actual);
-    assertEqualsQuery(expected, actual);
-  }
-
-  public static void assertEqualsQuery(Query expected, Query actual) {
-    assertEquals(expected.getClass(), actual.getClass());
-    if (expected instanceof BooleanQuery) {
-      assertEqualsBooleanQuery((BooleanQuery) expected, (BooleanQuery) actual);
-    } else if (expected instanceof SuperQuery) {
-      assertEqualsSuperQuery((SuperQuery) expected, (SuperQuery) actual);
-    } else if (expected instanceof TermQuery) {
-      assertEqualsTermQuery((TermQuery) expected, (TermQuery) actual);
-    } else {
-      fail("Type [" + expected.getClass() + "] not supported");
-    }
-  }
-
-  public static void assertEqualsTermQuery(TermQuery expected, TermQuery actual) {
-    Term term1 = expected.getTerm();
-    Term term2 = actual.getTerm();
-    assertEquals(term1, term2);
-  }
-
-  public static void assertEqualsSuperQuery(SuperQuery expected, SuperQuery actual) {
-    assertEquals(expected.getQuery(), actual.getQuery());
-  }
-
-  public static void assertEqualsBooleanQuery(BooleanQuery expected, BooleanQuery actual) {
-    List<BooleanClause> clauses1 = expected.clauses();
-    List<BooleanClause> clauses2 = actual.clauses();
-    assertEqualsBooleanClause(clauses1, clauses2);
-  }
-
-  public static void assertEqualsBooleanClause(List<BooleanClause> clauses1, List<BooleanClause> clauses2) {
-    if (clauses1 == null && clauses2 == null) {
-      return;
-    }
-    if (clauses1 == null || clauses2 == null) {
-      fail();
-    }
-    if (clauses1.size() != clauses2.size()) {
-      fail();
-    }
-    int size = clauses1.size();
-    for (int i = 0; i < size; i++) {
-      assertEqualsBooleanClause(clauses1.get(i), clauses2.get(i));
-    }
-  }
-
-  public static void assertEqualsBooleanClause(BooleanClause booleanClause1, BooleanClause booleanClause2) {
-    assertEquals(booleanClause1.getOccur(), booleanClause2.getOccur());
-    assertEqualsQuery(booleanClause1.getQuery(), booleanClause2.getQuery());
-  }
-  
-  private Query rq_i(String field, float min, float max) {
-    return NumericRangeQuery.newFloatRange(field, min, max, true, true);
-  }
-  
-  private Query rq_i(String field, int min, int max) {
-    return NumericRangeQuery.newIntRange(field, min, max, true, true);
-  }
-  
-  private Query rq_i(String field, double min, double max) {
-    return NumericRangeQuery.newDoubleRange(field, min, max, true, true);
-  }
-
-  private Query rq_i(String field, long min, long max) {
-    return NumericRangeQuery.newLongRange(field, min, max, true, true);
-  }
-
-  private BooleanQuery bq(BooleanClause... bcs) {
-    BooleanQuery bq = new BooleanQuery();
-    for (BooleanClause bc : bcs) {
-      bq.add(bc);
-    }
-    return bq;
-  }
-
-  private SuperQuery sq(Query q) {
-    return new SuperQuery(q, ScoreType.SUPER);
-  }
-
-  private TermQuery tq(String field, String text) {
-    return new TermQuery(new Term(field, text));
-  }
-
-  private Query parseSq(String qstr) throws ParseException {
-    SuperParser parser = new SuperParser(LUCENE_VERSION, analyzer, true, null, ScoreType.SUPER);
-    return parser.parse(qstr);
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/fcc9b6be/src/blur-core/src/test/java/org/apache/blur/search/RandomSuperQueryTest.java
----------------------------------------------------------------------
diff --git a/src/blur-core/src/test/java/org/apache/blur/search/RandomSuperQueryTest.java b/src/blur-core/src/test/java/org/apache/blur/search/RandomSuperQueryTest.java
index 66d6c01..4c9d7d1 100644
--- a/src/blur-core/src/test/java/org/apache/blur/search/RandomSuperQueryTest.java
+++ b/src/blur-core/src/test/java/org/apache/blur/search/RandomSuperQueryTest.java
@@ -18,16 +18,12 @@ package org.apache.blur.search;
  */
 
 import static junit.framework.Assert.assertTrue;
-import static org.apache.blur.lucene.LuceneVersionConstant.LUCENE_VERSION;
 
 import java.io.IOException;
 import java.util.Collection;
 import java.util.HashSet;
 import java.util.Random;
 
-import org.apache.blur.analysis.BlurAnalyzer;
-import org.apache.blur.lucene.search.ScoreType;
-import org.apache.blur.lucene.search.SuperParser;
 import org.apache.lucene.index.CorruptIndexException;
 import org.apache.lucene.index.DirectoryReader;
 import org.apache.lucene.index.IndexReader;
@@ -76,7 +72,7 @@ public class RandomSuperQueryTest {
     IndexSearcher searcher = new IndexSearcher(reader);
     long s = System.currentTimeMillis();
     for (String str : sampler) {
-      Query query = new SuperParser(LUCENE_VERSION, new BlurAnalyzer(), true, filter, ScoreType.AGGREGATE).parse(str);
+      Query query = null;// new SuperParser(LUCENE_VERSION, new BlurAnalyzer(), true, filter, ScoreType.AGGREGATE).parse(str);
       TopDocs topDocs = searcher.search(query, 10);
       assertTrue("seed [" + seed + "] {" + query + "} {" + s + "}", topDocs.totalHits > 0);
     }


Mime
View raw message