incubator-blur-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amccu...@apache.org
Subject [08/10] git commit: First commit for highlighting, I had to cleanup the types and field creation to have the indexex be setup correctly for highlighting.
Date Thu, 06 Jun 2013 03:00:17 GMT
First commit for highlighting, I had to cleanup the types and field creation to have the indexex be setup correctly for highlighting.


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

Branch: refs/heads/0.1.5
Commit: 7bbf19d80aa3af80e5869b81827ffc8e8c700d87
Parents: bf1258f
Author: Aaron McCurry <amccurry@gmail.com>
Authored: Wed Jun 5 22:31:29 2013 -0400
Committer: Aaron McCurry <amccurry@gmail.com>
Committed: Wed Jun 5 22:31:29 2013 -0400

----------------------------------------------------------------------
 .../java/org/apache/blur/manager/IndexManager.java |   11 +-
 .../blur/manager/writer/TransactionRecorder.java   |   46 +-
 .../java/org/apache/blur/utils/RowIndexWriter.java |  141 --
 .../org/apache/blur/manager/IndexManagerTest.java  |    2 +
 .../org/apache/blur/mapreduce/BlurReducer.java     |    5 +-
 .../org/apache/blur/analysis/BlurAnalyzer.java     |  285 +++--
 .../org/apache/blur/analysis/DoubleAnalyzer.java   |   83 --
 .../org/apache/blur/analysis/FloatAnalyzer.java    |   86 --
 .../org/apache/blur/analysis/IntegerAnalyzer.java  |  101 --
 .../org/apache/blur/analysis/LongAnalyzer.java     |  101 --
 .../org/apache/blur/lucene/search/SuperParser.java |    6 +-
 .../java/org/apache/blur/util/BlurConstants.java   |    2 +-
 .../org/apache/blur/analysis/BlurAnalyzerTest.java |   69 +-
 .../apache/blur/analysis/DoubleAnalyzerTest.java   |   95 --
 .../apache/blur/analysis/FloatAnalyzerTest.java    |   95 --
 .../apache/blur/analysis/IntegerAnalyzerTest.java  |  106 --
 .../org/apache/blur/analysis/LongAnalyzerTest.java |  107 --
 .../blur/thrift/generated/AnalyzerDefinition.java  |   48 +-
 .../org/apache/blur/thrift/generated/Blur.java     |  468 ++++----
 .../apache/blur/thrift/generated/BlurQuery.java    |   36 +-
 .../blur/thrift/generated/BlurQueryStatus.java     |   48 +-
 .../apache/blur/thrift/generated/BlurResults.java  |  148 ++--
 .../blur/thrift/generated/ColumnDefinition.java    |   48 +-
 .../thrift/generated/ColumnFamilyDefinition.java   |   48 +-
 .../blur/thrift/generated/ColumnPreCache.java      |   32 +-
 .../blur/thrift/generated/HighlightOptions.java    |  557 ++++++++
 .../org/apache/blur/thrift/generated/Record.java   |  196 +++-
 .../java/org/apache/blur/thrift/generated/Row.java |   36 +-
 .../apache/blur/thrift/generated/RowMutation.java  |   36 +-
 .../org/apache/blur/thrift/generated/Schema.java   |   72 +-
 .../org/apache/blur/thrift/generated/Selector.java |  229 +++-
 .../blur/thrift/generated/TableDescriptor.java     |   76 +-
 .../src/main/scripts/interface/Blur.thrift         |   82 +-
 .../src/main/scripts/interface/gen-html/Blur.html  |   43 +-
 .../src/main/scripts/interface/gen-html/index.html |    1 +
 .../blur/thrift/generated/AnalyzerDefinition.java  |   48 +-
 .../org/apache/blur/thrift/generated/Blur.java     |  468 ++++----
 .../apache/blur/thrift/generated/BlurQuery.java    |   36 +-
 .../blur/thrift/generated/BlurQueryStatus.java     |   48 +-
 .../apache/blur/thrift/generated/BlurResults.java  |  148 ++--
 .../blur/thrift/generated/ColumnDefinition.java    |   48 +-
 .../thrift/generated/ColumnFamilyDefinition.java   |   48 +-
 .../blur/thrift/generated/ColumnPreCache.java      |   32 +-
 .../blur/thrift/generated/HighlightOptions.java    |  557 ++++++++
 .../org/apache/blur/thrift/generated/Record.java   |  196 +++-
 .../org/apache/blur/thrift/generated/Row.java      |   36 +-
 .../apache/blur/thrift/generated/RowMutation.java  |   36 +-
 .../org/apache/blur/thrift/generated/Schema.java   |   72 +-
 .../org/apache/blur/thrift/generated/Selector.java |  229 +++-
 .../blur/thrift/generated/TableDescriptor.java     |   76 +-
 .../src/main/scripts/interface/gen-js/Blur.js      |  416 +++---
 .../main/scripts/interface/gen-js/Blur_types.js    | 1005 ++++++++-------
 .../main/scripts/interface/gen-perl/Blur/Blur.pm   |  270 ++--
 .../main/scripts/interface/gen-perl/Blur/Types.pm  |  813 +++++++-----
 .../main/scripts/interface/gen-rb/blur_types.rb    |  102 +-
 55 files changed, 4736 insertions(+), 3493 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/7bbf19d8/src/blur-core/src/main/java/org/apache/blur/manager/IndexManager.java
----------------------------------------------------------------------
diff --git a/src/blur-core/src/main/java/org/apache/blur/manager/IndexManager.java b/src/blur-core/src/main/java/org/apache/blur/manager/IndexManager.java
index e7e3857..479c872 100644
--- a/src/blur-core/src/main/java/org/apache/blur/manager/IndexManager.java
+++ b/src/blur-core/src/main/java/org/apache/blur/manager/IndexManager.java
@@ -214,7 +214,9 @@ public class IndexManager {
         usedCache = false;
       }
 
-      fetchRow(searcher.getIndexReader(), table, selector, fetchResult);
+      Query highlightQuery = getHighlightQuery(selector);
+      
+      fetchRow(searcher.getIndexReader(), table, selector, fetchResult, highlightQuery);
       if (fetchResult.rowResult != null) {
         if (fetchResult.rowResult.row != null && fetchResult.rowResult.row.records != null) {
           _recordsMeter.mark(fetchResult.rowResult.row.records.size());
@@ -240,6 +242,11 @@ public class IndexManager {
     }
   }
 
+  private Query getHighlightQuery(Selector selector) {
+    // TODO Auto-generated method stub
+    return null;
+  }
+
   private void populateSelector(String table, Selector selector) throws IOException, BlurException {
     String rowId = selector.rowId;
     String recordId = selector.recordId;
@@ -438,7 +445,7 @@ public class IndexManager {
     return _statusManager.queryStatusIdList(table);
   }
 
-  public static void fetchRow(IndexReader reader, String table, Selector selector, FetchResult fetchResult)
+  public static void fetchRow(IndexReader reader, String table, Selector selector, FetchResult fetchResult, Query highlightQuery)
       throws CorruptIndexException, IOException {
     fetchResult.table = table;
     String locationId = selector.locationId;

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/7bbf19d8/src/blur-core/src/main/java/org/apache/blur/manager/writer/TransactionRecorder.java
----------------------------------------------------------------------
diff --git a/src/blur-core/src/main/java/org/apache/blur/manager/writer/TransactionRecorder.java b/src/blur-core/src/main/java/org/apache/blur/manager/writer/TransactionRecorder.java
index febc7ef..6a5cf05 100644
--- a/src/blur-core/src/main/java/org/apache/blur/manager/writer/TransactionRecorder.java
+++ b/src/blur-core/src/main/java/org/apache/blur/manager/writer/TransactionRecorder.java
@@ -16,6 +16,8 @@ package org.apache.blur.manager.writer;
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+import static org.apache.blur.utils.BlurConstants.SEP;
+
 import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
 import java.io.Closeable;
@@ -25,6 +27,7 @@ import java.io.EOFException;
 import java.io.IOException;
 import java.util.ArrayList;
 import java.util.List;
+import java.util.Set;
 import java.util.Timer;
 import java.util.TimerTask;
 import java.util.concurrent.TimeUnit;
@@ -43,7 +46,6 @@ import org.apache.blur.thrift.generated.Record;
 import org.apache.blur.thrift.generated.Row;
 import org.apache.blur.utils.BlurConstants;
 import org.apache.blur.utils.BlurUtil;
-import org.apache.blur.utils.RowIndexWriter;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.fs.FSDataInputStream;
 import org.apache.hadoop.fs.FSDataOutputStream;
@@ -372,7 +374,7 @@ public class TransactionRecorder extends TimerTask implements Closeable {
     document.add(new Field(BlurConstants.ROW_ID, rowId, ID_TYPE));
     document.add(new Field(BlurConstants.RECORD_ID, record.recordId, ID_TYPE));
     document.add(new Field(BlurConstants.FAMILY, record.family, ID_TYPE));
-    RowIndexWriter.addColumns(document, analyzer, builder, record.family, record.columns);
+    addColumns(document, analyzer, builder, record.family, record.columns);
     return document;
   }
 
@@ -401,5 +403,45 @@ public class TransactionRecorder extends TimerTask implements Closeable {
       }
     }
   }
+  
+  public static boolean addColumns(Document document, BlurAnalyzer analyzer, StringBuilder builder,
+      String columnFamily, Iterable<Column> set) {
+    if (set == null) {
+      return false;
+    }
+    builder.setLength(0);
+    OUTER: for (Column column : set) {
+      String name = column.getName();
+      String value = column.value;
+      if (value == null || name == null) {
+        continue OUTER;
+      }
+      String fieldName = getFieldName(columnFamily, name);
+      FieldType fieldType = analyzer.getFieldType(fieldName);
+      Field field = analyzer.getField(fieldName, value, fieldType);
+      document.add(field);
+      
+      // @TODO remove full text stuff
+//      if (analyzer.isFullTextField(fieldName)) {
+//        builder.append(value).append(' ');
+//      }
+      Set<String> subFieldNames = analyzer.getSubIndexNames(fieldName);
+      if (subFieldNames != null) {
+        for (String subFieldName : subFieldNames) {
+          FieldType subFieldType = analyzer.getFieldType(subFieldName);
+          document.add(analyzer.getField(subFieldName, value, subFieldType));
+        }
+      }
+    }
+//    if (builder.length() != 0) {
+//      String superValue = builder.toString();
+//      document.add(new Field(SUPER, superValue, Store.NO, Index.ANALYZED_NO_NORMS));
+//    }
+    return true;
+  }
+
+  public static String getFieldName(String columnFamily, String name) {
+    return columnFamily + SEP + name;
+  }
 
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/7bbf19d8/src/blur-core/src/main/java/org/apache/blur/utils/RowIndexWriter.java
----------------------------------------------------------------------
diff --git a/src/blur-core/src/main/java/org/apache/blur/utils/RowIndexWriter.java b/src/blur-core/src/main/java/org/apache/blur/utils/RowIndexWriter.java
deleted file mode 100644
index 9b98a46..0000000
--- a/src/blur-core/src/main/java/org/apache/blur/utils/RowIndexWriter.java
+++ /dev/null
@@ -1,141 +0,0 @@
-package org.apache.blur.utils;
-
-/**
- * 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.RECORD_ID;
-import static org.apache.blur.utils.BlurConstants.ROW_ID;
-import static org.apache.blur.utils.BlurConstants.SEP;
-import static org.apache.blur.utils.BlurConstants.SUPER;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Set;
-
-import org.apache.blur.analysis.BlurAnalyzer;
-import org.apache.blur.thrift.generated.Column;
-import org.apache.blur.thrift.generated.Record;
-import org.apache.blur.thrift.generated.Row;
-import org.apache.lucene.document.Document;
-import org.apache.lucene.document.Field;
-import org.apache.lucene.document.Field.Index;
-import org.apache.lucene.document.Field.Store;
-import org.apache.lucene.index.IndexWriter;
-import org.apache.lucene.index.Term;
-
-
-public class RowIndexWriter {
-
-  private BlurAnalyzer _analyzer;
-  private IndexWriter _indexWriter;
-  private boolean primeDocSet;
-  private StringBuilder builder = new StringBuilder();
-
-  public RowIndexWriter(IndexWriter indexWriter, BlurAnalyzer analyzer) {
-    _indexWriter = indexWriter;
-    _analyzer = analyzer;
-  }
-
-  public void add(boolean wal, Row row) throws IOException {
-    if (row == null || row.id == null) {
-      throw new NullPointerException();
-    }
-    append(wal, row, false);
-  }
-
-  public void replace(boolean wal, Row row) throws IOException {
-    if (row == null || row.id == null) {
-      throw new NullPointerException();
-    }
-    append(wal, row, true);
-  }
-
-  private void append(boolean wal, Row row, boolean replace) throws IOException {
-    primeDocSet = false;
-    List<Document> documents = new ArrayList<Document>();
-    for (Record record : row.records) {
-      convert(row.id, record, documents);
-    }
-    if (replace) {
-      _indexWriter.updateDocuments(new Term(ROW_ID, row.id), documents, _analyzer);
-    } else {
-      _indexWriter.addDocuments(documents, _analyzer);
-    }
-  }
-
-  private void convert(String rowId, Record record, List<Document> documents) throws IOException {
-    if (record == null) {
-      return;
-    }
-    String recordId = record.recordId;
-    if (recordId == null) {
-      throw new NullPointerException("Record id is null.");
-    }
-    String family = record.getFamily();
-    if (family == null) {
-      throw new NullPointerException("Family is null.");
-    }
-    Document document = new Document();
-    document.add(new Field(ROW_ID, rowId, Store.YES, Index.NOT_ANALYZED_NO_NORMS));
-    document.add(new Field(RECORD_ID, recordId, Store.YES, Index.NOT_ANALYZED_NO_NORMS));
-    if (addColumns(document, _analyzer, builder, family, record.columns)) {
-      if (!primeDocSet) {
-        document.add(new Field(BlurConstants.PRIME_DOC, BlurConstants.PRIME_DOC_VALUE, Store.NO, Index.NOT_ANALYZED_NO_NORMS));
-        primeDocSet = true;
-      }
-      documents.add(document);
-    }
-  }
-
-  public static boolean addColumns(Document document, BlurAnalyzer analyzer, StringBuilder builder, String columnFamily, Iterable<Column> set) {
-    if (set == null) {
-      return false;
-    }
-    builder.setLength(0);
-    OUTER: for (Column column : set) {
-      String name = column.getName();
-      String value = column.value;
-      if (value == null || name == null) {
-        continue OUTER;
-      }
-      String fieldName = getFieldName(columnFamily, name);
-      Store store = analyzer.getStore(fieldName);
-      Index index = analyzer.getIndex(fieldName);
-      boolean fullText = analyzer.isFullTextField(fieldName);
-      Set<String> subFieldNames = analyzer.getSubIndexNames(fieldName);
-      document.add(new Field(fieldName, value, store, index));
-      if (fullText) {
-        builder.append(value).append(' ');
-      }
-      if (subFieldNames != null) {
-        for (String subFieldName : subFieldNames) {
-          document.add(new Field(subFieldName, value, Store.NO, index));
-        }
-      }
-    }
-    if (builder.length() != 0) {
-      String superValue = builder.toString();
-      document.add(new Field(SUPER, superValue, Store.NO, Index.ANALYZED_NO_NORMS));
-    }
-    return true;
-  }
-
-  public static String getFieldName(String columnFamily, String name) {
-    return columnFamily + SEP + name;
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/7bbf19d8/src/blur-core/src/test/java/org/apache/blur/manager/IndexManagerTest.java
----------------------------------------------------------------------
diff --git a/src/blur-core/src/test/java/org/apache/blur/manager/IndexManagerTest.java b/src/blur-core/src/test/java/org/apache/blur/manager/IndexManagerTest.java
index 2ce6376..a7461d4 100644
--- a/src/blur-core/src/test/java/org/apache/blur/manager/IndexManagerTest.java
+++ b/src/blur-core/src/test/java/org/apache/blur/manager/IndexManagerTest.java
@@ -48,6 +48,7 @@ import java.util.concurrent.atomic.AtomicLongArray;
 import org.apache.blur.manager.clusterstatus.ClusterStatus;
 import org.apache.blur.manager.indexserver.LocalIndexServer;
 import org.apache.blur.manager.results.BlurResultIterable;
+import org.apache.blur.server.TableContext;
 import org.apache.blur.thrift.generated.AnalyzerDefinition;
 import org.apache.blur.thrift.generated.BlurException;
 import org.apache.blur.thrift.generated.BlurQuery;
@@ -87,6 +88,7 @@ public class IndexManagerTest {
 
   @Before
   public void setUp() throws BlurException, IOException, InterruptedException {
+    TableContext.clear();
     base = new File(TMPDIR, "blur-index-manager-test");
     rm(base);
     

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/7bbf19d8/src/blur-mapred/src/main/java/org/apache/blur/mapreduce/BlurReducer.java
----------------------------------------------------------------------
diff --git a/src/blur-mapred/src/main/java/org/apache/blur/mapreduce/BlurReducer.java b/src/blur-mapred/src/main/java/org/apache/blur/mapreduce/BlurReducer.java
index 82ea3e3..f694c99 100644
--- a/src/blur-mapred/src/main/java/org/apache/blur/mapreduce/BlurReducer.java
+++ b/src/blur-mapred/src/main/java/org/apache/blur/mapreduce/BlurReducer.java
@@ -40,11 +40,11 @@ import org.apache.blur.manager.writer.TransactionRecorder;
 import org.apache.blur.mapreduce.BlurTask.INDEXING_TYPE;
 import org.apache.blur.mapreduce.lib.BlurColumn;
 import org.apache.blur.mapreduce.lib.BlurMutate;
+import org.apache.blur.mapreduce.lib.BlurMutate.MUTATE_TYPE;
 import org.apache.blur.mapreduce.lib.BlurOutputFormat;
 import org.apache.blur.mapreduce.lib.BlurRecord;
 import org.apache.blur.mapreduce.lib.DefaultBlurReducer;
 import org.apache.blur.mapreduce.lib.ProgressableDirectory;
-import org.apache.blur.mapreduce.lib.BlurMutate.MUTATE_TYPE;
 import org.apache.blur.store.hdfs.HdfsDirectory;
 import org.apache.blur.thrift.generated.Column;
 import org.apache.blur.thrift.generated.Selector;
@@ -54,7 +54,6 @@ import org.apache.blur.utils.BlurUtil;
 import org.apache.blur.utils.Converter;
 import org.apache.blur.utils.IterableConverter;
 import org.apache.blur.utils.ResetableDocumentStoredFieldVisitor;
-import org.apache.blur.utils.RowIndexWriter;
 import org.apache.hadoop.conf.Configurable;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.fs.FileSystem;
@@ -476,7 +475,7 @@ public class BlurReducer extends Reducer<Text, BlurMutate, Text, BlurMutate> {
     document.add(new Field(BlurConstants.RECORD_ID, record.getRecordId(), TransactionRecorder.ID_TYPE));
 
     String columnFamily = record.getFamily();
-    RowIndexWriter.addColumns(document, _analyzer, builder, columnFamily, new IterableConverter<BlurColumn, Column>(
+    TransactionRecorder.addColumns(document, _analyzer, builder, columnFamily, new IterableConverter<BlurColumn, Column>(
         record.getColumns(), new Converter<BlurColumn, Column>() {
           @Override
           public Column convert(BlurColumn from) throws Exception {

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/7bbf19d8/src/blur-query/src/main/java/org/apache/blur/analysis/BlurAnalyzer.java
----------------------------------------------------------------------
diff --git a/src/blur-query/src/main/java/org/apache/blur/analysis/BlurAnalyzer.java b/src/blur-query/src/main/java/org/apache/blur/analysis/BlurAnalyzer.java
index 02be999..df3c825 100644
--- a/src/blur-query/src/main/java/org/apache/blur/analysis/BlurAnalyzer.java
+++ b/src/blur-query/src/main/java/org/apache/blur/analysis/BlurAnalyzer.java
@@ -28,6 +28,7 @@ import java.io.File;
 import java.io.FileInputStream;
 import java.io.IOException;
 import java.io.InputStream;
+import java.io.Reader;
 import java.lang.reflect.Constructor;
 import java.util.HashMap;
 import java.util.HashSet;
@@ -51,8 +52,14 @@ 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.Index;
-import org.apache.lucene.document.Field.Store;
+import org.apache.lucene.document.DoubleField;
+import org.apache.lucene.document.Field;
+import org.apache.lucene.document.FieldType;
+import org.apache.lucene.document.FloatField;
+import org.apache.lucene.document.IntField;
+import org.apache.lucene.document.LongField;
+import org.apache.lucene.document.TextField;
+import org.apache.lucene.index.FieldInfo.IndexOptions;
 import org.apache.lucene.search.NumericRangeQuery;
 import org.apache.lucene.search.Query;
 import org.apache.lucene.util.Version;
@@ -60,7 +67,7 @@ import org.apache.lucene.util.Version;
 public final class BlurAnalyzer extends AnalyzerWrapper {
 
   public enum TYPE {
-    LONG, DOUBLE, FLOAT, INTEGER, DEFAULT
+    LONG, DOUBLE, FLOAT, INTEGER, TEXT
   }
 
   @SuppressWarnings("serial")
@@ -75,17 +82,24 @@ public final class BlurAnalyzer extends AnalyzerWrapper {
 
   private static final String STANDARD = "org.apache.lucene.analysis.standard.StandardAnalyzer";
   public static final BlurAnalyzer BLANK_ANALYZER = new BlurAnalyzer(new KeywordAnalyzer());
+
+  private static final Analyzer ERROR_ANALYZER = new Analyzer() {
+    @Override
+    protected TokenStreamComponents createComponents(String field, Reader reader) {
+      throw new RuntimeException("This analyzer should never be used.");
+    }
+  };
   private static Map<String, Class<? extends Analyzer>> aliases = new HashMap<String, Class<? extends Analyzer>>();
 
-  private Map<String, Store> _storeMap = new HashMap<String, Store>();
+  private Set<String> _subIndexNames = new HashSet<String>();
   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 AnalyzerDefinition _analyzerDefinition;
-  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>();
+  private Map<String, FieldType> _fieldTypes = new HashMap<String, FieldType>();
 
   public Set<String> getSubIndexNames(String indexName) {
     return _subIndexNameLookups.get(indexName);
@@ -99,22 +113,20 @@ public final class BlurAnalyzer extends AnalyzerWrapper {
   public BlurAnalyzer(AnalyzerDefinition analyzerDefinition) {
     _analyzerDefinition = analyzerDefinition;
     ColumnDefinition defaultDefinition = analyzerDefinition.getDefaultDefinition();
-    String fullTextAnalyzerClassName = analyzerDefinition.fullTextAnalyzerClassName;
-    if (fullTextAnalyzerClassName != null) {
-      _fullTextAnalyzer = getAnalyzerByClassName(fullTextAnalyzerClassName, aliases, null, null);
-    }
     if (defaultDefinition == null) {
       defaultDefinition = new ColumnDefinition(STANDARD, true, null);
       analyzerDefinition.setDefaultDefinition(defaultDefinition);
     }
-    _defaultAnalyzer = getAnalyzerByClassName(defaultDefinition.getAnalyzerClassName(), aliases, null, null);
-    KeywordAnalyzer keywordAnalyzer = new KeywordAnalyzer();
+    _defaultAnalyzer = getAnalyzerByClassName(defaultDefinition.getAnalyzerClassName(), aliases, null, null,
+        _fieldTypes);
     _analyzers = new HashMap<String, Analyzer>();
-    _analyzers.put(ROW_ID, keywordAnalyzer);
-    _analyzers.put(RECORD_ID, keywordAnalyzer);
-    _analyzers.put(PRIME_DOC, keywordAnalyzer);
-    _analyzers.put(SUPER, _fullTextAnalyzer);
-    load(_analyzers, _analyzerDefinition.columnFamilyDefinitions, _fullTextFields, _subIndexNameLookups, _storeMap, _fullTextColumnFamilies, _typeLookup);
+    _analyzers.put(ROW_ID, ERROR_ANALYZER);
+    _analyzers.put(RECORD_ID, ERROR_ANALYZER);
+    _analyzers.put(PRIME_DOC, ERROR_ANALYZER);
+    _analyzers.put(PRIME_DOC, ERROR_ANALYZER);
+    _analyzers.put(SUPER, ERROR_ANALYZER);
+    load(_analyzers, _analyzerDefinition.columnFamilyDefinitions, _fullTextFields, _subIndexNameLookups,
+        _subIndexNames, _fullTextColumnFamilies, _typeLookup, _fieldTypes);
   }
 
   public BlurAnalyzer() {
@@ -129,41 +141,49 @@ public final class BlurAnalyzer extends AnalyzerWrapper {
   public TYPE getTypeLookup(String field) {
     TYPE type = _typeLookup.get(field);
     if (type == null) {
-      return TYPE.DEFAULT;
+      return TYPE.TEXT;
     }
     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;
+    TYPE type = _typeLookup.get(field);
+    if (type == null) {
+      return null;
+    }
+    FieldType fieldType = _fieldTypes.get(field);
+    switch (type) {
+    case INTEGER:
+      int integerPrecisionStep = fieldType.numericPrecisionStep();
+      int integerMin = Integer.parseInt(part1);
+      int integerMax = Integer.parseInt(part2);
+      return NumericRangeQuery.newIntRange(field, integerPrecisionStep, integerMin, integerMax, startInclusive,
+          endInclusive);
+
+    case DOUBLE:
+      int doublePrecisionStep = fieldType.numericPrecisionStep();
+      double doubleMin = Double.parseDouble(part1);
+      double doubleMax = Double.parseDouble(part2);
+      return NumericRangeQuery.newDoubleRange(field, doublePrecisionStep, doubleMin, doubleMax, startInclusive,
+          endInclusive);
+
+    case FLOAT:
+      int floatPrecisionStep = fieldType.numericPrecisionStep();
+      float floatMin = Float.parseFloat(part1);
+      float floatMax = Float.parseFloat(part2);
+      return NumericRangeQuery.newFloatRange(field, floatPrecisionStep, floatMin, floatMax, startInclusive,
+          endInclusive);
+
+    case LONG:
+      int longPrecisionStep = fieldType.numericPrecisionStep();
+      long longMin = Long.parseLong(part1);
+      long longMax = Long.parseLong(part2);
+      return NumericRangeQuery.newLongRange(field, longPrecisionStep, longMin, longMax, startInclusive, endInclusive);
+
+    default:
+      return null;
+    }
+
   }
 
   public boolean isFullTextField(String fieldName) {
@@ -186,16 +206,64 @@ public final class BlurAnalyzer extends AnalyzerWrapper {
     return false;
   }
 
-  public Store getStore(String indexName) {
-    Store store = _storeMap.get(indexName);
-    if (store == null) {
-      return Store.YES;
+  /**
+   * This method decides on the field type for the given field by name. Sub
+   * fields will also be passed in the fieldName such as fam1.col.sub1.
+   * 
+   * @param fieldName
+   * @return the {@link FieldType}
+   */
+  public FieldType getFieldType(String field) {
+    FieldType fieldType = _fieldTypes.get(field);
+    if (fieldType == null) {
+      fieldType = new FieldType(TextField.TYPE_STORED);
+      fieldType.setIndexOptions(IndexOptions.DOCS_AND_FREQS_AND_POSITIONS_AND_OFFSETS);
+    }
+    if (isSubFieldName(field)) {
+      fieldType.setStored(false);
     }
-    return store;
+    return fieldType;
+  }
+
+  /**
+   * Checks if the fieldName is a sub field or not.
+   * 
+   * @param fieldName
+   *          the field name to check.
+   * @return boolean
+   */
+  public boolean isSubFieldName(String fieldName) {
+    return _subIndexNames.contains(fieldName);
   }
 
-  public Index getIndex(String indexName) {
-    return Index.ANALYZED_NO_NORMS;
+  /**
+   * Get field will return the proper field for the given {@link FieldType}.
+   * 
+   * @param fieldName
+   *          the field name.
+   * @param value
+   *          the value.
+   * @param fieldType
+   *          the {@link FieldType}.
+   * @return the new {@link Field}.
+   */
+  public Field getField(String fieldName, String value, FieldType fieldType) {
+    TYPE type = _typeLookup.get(fieldName);
+    if (type == null) {
+      return new Field(fieldName, value, fieldType);
+    }
+    switch (type) {
+    case INTEGER:
+      return new IntField(fieldName, Integer.parseInt(value), fieldType);
+    case DOUBLE:
+      return new DoubleField(fieldName, Double.parseDouble(value), fieldType);
+    case FLOAT:
+      return new FloatField(fieldName, Float.parseFloat(value), fieldType);
+    case LONG:
+      return new LongField(fieldName, Long.parseLong(value), fieldType);
+    default:
+      return new Field(fieldName, value, fieldType);
+    }
   }
 
   public String toJSON() {
@@ -226,7 +294,7 @@ public final class BlurAnalyzer extends AnalyzerWrapper {
   public void close() {
 
   }
-  
+
   @Override
   protected Analyzer getWrappedAnalyzer(String fieldName) {
     Analyzer analyzer = getAnalyzer(fieldName);
@@ -291,8 +359,9 @@ public final class BlurAnalyzer extends AnalyzerWrapper {
     return outputStream.toByteArray();
   }
 
-  private static void load(Map<String, Analyzer> analyzers, Map<String, ColumnFamilyDefinition> familyDefinitions, Map<String, Boolean> fullTextFields,
-      Map<String, Set<String>> subIndexNameLookups, Map<String, Store> storeMap, Map<String, Boolean> fullTextColumnFamilies, Map<String, TYPE> typeLookup) {
+  private static void load(Map<String, Analyzer> analyzers, Map<String, ColumnFamilyDefinition> familyDefinitions,
+      Map<String, Boolean> fullTextFields, Map<String, Set<String>> subIndexNameLookups, Set<String> subIndexNames,
+      Map<String, Boolean> fullTextColumnFamilies, Map<String, TYPE> typeLookup, Map<String, FieldType> fieldTypes) {
     if (familyDefinitions != null) {
       for (String family : familyDefinitions.keySet()) {
         ColumnFamilyDefinition familyDefinition = familyDefinitions.get(family);
@@ -300,33 +369,41 @@ public final class BlurAnalyzer extends AnalyzerWrapper {
         if (defaultDefinition != null) {
           fullTextColumnFamilies.put(family, defaultDefinition.isFullTextIndex());
         }
-        load(family, familyDefinition, analyzers, fullTextFields, subIndexNameLookups, storeMap, typeLookup);
+        load(family, familyDefinition, analyzers, fullTextFields, subIndexNameLookups, subIndexNames, typeLookup,
+            fieldTypes);
       }
     }
   }
 
-  private static void load(String family, ColumnFamilyDefinition familyDefinition, Map<String, Analyzer> analyzers, Map<String, Boolean> fullTextFields,
-      Map<String, Set<String>> subIndexNameLookups, Map<String, Store> storeMap, Map<String, TYPE> typeLookup) {
+  private static void load(String family, ColumnFamilyDefinition familyDefinition, Map<String, Analyzer> analyzers,
+      Map<String, Boolean> fullTextFields, Map<String, Set<String>> subIndexNameLookups, Set<String> subIndexNames,
+      Map<String, TYPE> typeLookup, Map<String, FieldType> fieldTypes) {
     Map<String, ColumnDefinition> columnDefinitions = familyDefinition.getColumnDefinitions();
     if (columnDefinitions != null) {
       for (String column : columnDefinitions.keySet()) {
         ColumnDefinition columnDefinition = columnDefinitions.get(column);
-        load(family, familyDefinition, column, columnDefinition, analyzers, fullTextFields, subIndexNameLookups, storeMap, typeLookup);
+        load(family, familyDefinition, column, columnDefinition, analyzers, fullTextFields, subIndexNameLookups,
+            subIndexNames, typeLookup, fieldTypes);
       }
     }
   }
 
-  private static void load(String family, ColumnFamilyDefinition familyDefinition, String column, ColumnDefinition columnDefinition, Map<String, Analyzer> analyzers,
-      Map<String, Boolean> fullTextFields, Map<String, Set<String>> subIndexNameLookups, Map<String, Store> storeMap, Map<String, TYPE> typeLookup) {
-    Map<String, AlternateColumnDefinition> alternateColumnDefinitions = columnDefinition.getAlternateColumnDefinitions();
+  private static void load(String family, ColumnFamilyDefinition familyDefinition, String column,
+      ColumnDefinition columnDefinition, Map<String, Analyzer> analyzers, Map<String, Boolean> fullTextFields,
+      Map<String, Set<String>> subIndexNameLookups, Set<String> subIndexNames, Map<String, TYPE> typeLookup,
+      Map<String, FieldType> fieldTypes) {
+    Map<String, AlternateColumnDefinition> alternateColumnDefinitions = columnDefinition
+        .getAlternateColumnDefinitions();
     if (alternateColumnDefinitions != null) {
       for (String subColumn : alternateColumnDefinitions.keySet()) {
         AlternateColumnDefinition alternateColumnDefinition = alternateColumnDefinitions.get(subColumn);
-        load(family, familyDefinition, column, columnDefinition, subColumn, alternateColumnDefinition, analyzers, subIndexNameLookups, storeMap, typeLookup);
+        load(family, familyDefinition, column, columnDefinition, subColumn, alternateColumnDefinition, analyzers,
+            subIndexNameLookups, subIndexNames, typeLookup, fieldTypes);
       }
     }
     String fieldName = family + "." + column;
-    Analyzer analyzer = getAnalyzerByClassName(columnDefinition.getAnalyzerClassName(), aliases, fieldName, typeLookup);
+    Analyzer analyzer = getAnalyzerByClassName(columnDefinition.getAnalyzerClassName(), aliases, fieldName, typeLookup,
+        fieldTypes);
     analyzers.put(fieldName, analyzer);
     if (columnDefinition.isFullTextIndex()) {
       fullTextFields.put(fieldName, Boolean.TRUE);
@@ -335,25 +412,27 @@ public final class BlurAnalyzer extends AnalyzerWrapper {
     }
   }
 
-  private static void load(String family, ColumnFamilyDefinition familyDefinition, String column, ColumnDefinition columnDefinition, String subColumn,
-      AlternateColumnDefinition alternateColumnDefinition, Map<String, Analyzer> analyzers, Map<String, Set<String>> subIndexNameLookups, Map<String, Store> storeMap,
-      Map<String, TYPE> typeLookup) {
+  private static void load(String family, ColumnFamilyDefinition familyDefinition, String column,
+      ColumnDefinition columnDefinition, String subColumn, AlternateColumnDefinition alternateColumnDefinition,
+      Map<String, Analyzer> analyzers, Map<String, Set<String>> subIndexNameLookups, Set<String> subIndexNames,
+      Map<String, TYPE> typeLookup, Map<String, FieldType> fieldTypes) {
     String fieldName = family + "." + column + "." + subColumn;
-    Analyzer analyzer = getAnalyzerByClassName(alternateColumnDefinition.getAnalyzerClassName(), aliases, fieldName, typeLookup);
+    Analyzer analyzer = getAnalyzerByClassName(alternateColumnDefinition.getAnalyzerClassName(), aliases, fieldName,
+        typeLookup, fieldTypes);
     analyzers.put(fieldName, analyzer);
-    putStore(fieldName, Store.NO, storeMap);
     addSubField(fieldName, subIndexNameLookups);
-  }
-
-  private static void putStore(String name, Store store, Map<String, Store> storeMap) {
-    storeMap.put(name, store);
+    subIndexNames.add(fieldName);
   }
 
   @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;
+  private static Analyzer getAnalyzerByClassName(String className, Map<String, Class<? extends Analyzer>> aliases,
+      String fieldName, Map<String, TYPE> typeLookup, Map<String, FieldType> fieldTypes) {
+    TYPE type = getType(className, fieldName, fieldTypes);
+    if (fieldName != null) {
+      typeLookup.put(fieldName, type);
+    }
+    if (type != TYPE.TEXT) {
+      return null;
     }
     try {
       Class<? extends Analyzer> clazz = aliases.get(className);
@@ -371,55 +450,54 @@ public final class BlurAnalyzer extends AnalyzerWrapper {
     }
   }
 
-  private static Analyzer getType(String typeStr, String fieldName, Map<String, TYPE> typeLookup) {
+  private static TYPE getType(String typeStr, String fieldName, Map<String, FieldType> fieldTypes) {
     if (typeStr == null) {
       return null;
     }
     String[] types = typeStr.split(",");
     String type = types[0];
     String typeUpper = type.toUpperCase();
+
+    TYPE t = null;
     if (!typeNameCache.contains(typeUpper)) {
-      return null;
-    }
-    TYPE t = TYPE.valueOf(typeUpper);
-    if (fieldName != null) {
-      typeLookup.put(fieldName, t);
+      t = TYPE.TEXT;
+    } else {
+      t = TYPE.valueOf(typeUpper);
     }
+
+    FieldType fieldType;
     switch (t) {
     case LONG:
-      LongAnalyzer longAnalyzer = new LongAnalyzer();
+      fieldType = new FieldType(LongField.TYPE_STORED);
       if (types.length > 1) {
-        longAnalyzer.setPrecisionStep(Integer.parseInt(types[1]));
-      }
-      if (types.length > 2) {
-        longAnalyzer.setRadix(Integer.parseInt(types[2]));
+        fieldType.setNumericPrecisionStep(Integer.parseInt(types[1]));
       }
-      return longAnalyzer;
+      break;
     case INTEGER:
-      IntegerAnalyzer integerAnalyzer = new IntegerAnalyzer();
+      fieldType = new FieldType(IntField.TYPE_STORED);
       if (types.length > 1) {
-        integerAnalyzer.setPrecisionStep(Integer.parseInt(types[1]));
-      }
-      if (types.length > 2) {
-        integerAnalyzer.setRadix(Integer.parseInt(types[2]));
+        fieldType.setNumericPrecisionStep(Integer.parseInt(types[1]));
       }
-      return integerAnalyzer;
+      break;
     case FLOAT:
-      FloatAnalyzer floatAnalyzer = new FloatAnalyzer();
+      fieldType = new FieldType(FloatField.TYPE_STORED);
       if (types.length > 1) {
-        floatAnalyzer.setPrecisionStep(Integer.parseInt(types[1]));
+        fieldType.setNumericPrecisionStep(Integer.parseInt(types[1]));
       }
-      return floatAnalyzer;
+      break;
     case DOUBLE:
-      DoubleAnalyzer doubleAnalyzer = new DoubleAnalyzer();
+      fieldType = new FieldType(DoubleField.TYPE_STORED);
       if (types.length > 1) {
-        doubleAnalyzer.setPrecisionStep(Integer.parseInt(types[1]));
+        fieldType.setNumericPrecisionStep(Integer.parseInt(types[1]));
       }
-      return doubleAnalyzer;
+      break;
     default:
+      fieldType = new FieldType(TextField.TYPE_STORED);
+      fieldType.setIndexOptions(IndexOptions.DOCS_AND_FREQS_AND_POSITIONS_AND_OFFSETS);
       break;
     }
-    return null;
+    fieldTypes.put(fieldName, fieldType);
+    return t;
   }
 
   private static void addSubField(String name, Map<String, Set<String>> subIndexNameLookups) {
@@ -433,5 +511,4 @@ public final class BlurAnalyzer extends AnalyzerWrapper {
     set.add(name);
   }
 
-
 }

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/7bbf19d8/src/blur-query/src/main/java/org/apache/blur/analysis/DoubleAnalyzer.java
----------------------------------------------------------------------
diff --git a/src/blur-query/src/main/java/org/apache/blur/analysis/DoubleAnalyzer.java b/src/blur-query/src/main/java/org/apache/blur/analysis/DoubleAnalyzer.java
deleted file mode 100644
index 01abeae..0000000
--- a/src/blur-query/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/7bbf19d8/src/blur-query/src/main/java/org/apache/blur/analysis/FloatAnalyzer.java
----------------------------------------------------------------------
diff --git a/src/blur-query/src/main/java/org/apache/blur/analysis/FloatAnalyzer.java b/src/blur-query/src/main/java/org/apache/blur/analysis/FloatAnalyzer.java
deleted file mode 100644
index fb04888..0000000
--- a/src/blur-query/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/7bbf19d8/src/blur-query/src/main/java/org/apache/blur/analysis/IntegerAnalyzer.java
----------------------------------------------------------------------
diff --git a/src/blur-query/src/main/java/org/apache/blur/analysis/IntegerAnalyzer.java b/src/blur-query/src/main/java/org/apache/blur/analysis/IntegerAnalyzer.java
deleted file mode 100644
index f63330e..0000000
--- a/src/blur-query/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/7bbf19d8/src/blur-query/src/main/java/org/apache/blur/analysis/LongAnalyzer.java
----------------------------------------------------------------------
diff --git a/src/blur-query/src/main/java/org/apache/blur/analysis/LongAnalyzer.java b/src/blur-query/src/main/java/org/apache/blur/analysis/LongAnalyzer.java
deleted file mode 100644
index b8d7a54..0000000
--- a/src/blur-query/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/7bbf19d8/src/blur-query/src/main/java/org/apache/blur/lucene/search/SuperParser.java
----------------------------------------------------------------------
diff --git a/src/blur-query/src/main/java/org/apache/blur/lucene/search/SuperParser.java b/src/blur-query/src/main/java/org/apache/blur/lucene/search/SuperParser.java
index 21488c3..c3a7910 100644
--- a/src/blur-query/src/main/java/org/apache/blur/lucene/search/SuperParser.java
+++ b/src/blur-query/src/main/java/org/apache/blur/lucene/search/SuperParser.java
@@ -117,7 +117,7 @@ public class SuperParser extends QueryParser {
       int prefixLength) {
     String field = term.field();
     TYPE type = blurAnalyzer.getTypeLookup(field);
-    if (type != TYPE.DEFAULT) {
+    if (type != TYPE.TEXT) {
       throw new RuntimeException("Field [" + field + "] is type [" + type
           + "] which does not support fuzzy queries.");
     }
@@ -162,7 +162,7 @@ public class SuperParser extends QueryParser {
   protected Query newPrefixQuery(Term prefix) {
     String field = prefix.field();
     TYPE type = blurAnalyzer.getTypeLookup(field);
-    if (type != TYPE.DEFAULT) {
+    if (type != TYPE.TEXT) {
       throw new RuntimeException("Field [" + field + "] is type [" + type
           + "] which does not support prefix queries.");
     }
@@ -199,7 +199,7 @@ public class SuperParser extends QueryParser {
     }
     String field = t.field();
     TYPE type = blurAnalyzer.getTypeLookup(field);
-    if (type != TYPE.DEFAULT) {
+    if (type != TYPE.TEXT) {
       throw new RuntimeException("Field [" + field + "] is type [" + type
           + "] which does not support wildcard queries.");
     }

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/7bbf19d8/src/blur-query/src/main/java/org/apache/blur/util/BlurConstants.java
----------------------------------------------------------------------
diff --git a/src/blur-query/src/main/java/org/apache/blur/util/BlurConstants.java b/src/blur-query/src/main/java/org/apache/blur/util/BlurConstants.java
index f86b577..5239e18 100644
--- a/src/blur-query/src/main/java/org/apache/blur/util/BlurConstants.java
+++ b/src/blur-query/src/main/java/org/apache/blur/util/BlurConstants.java
@@ -19,10 +19,10 @@ package org.apache.blur.util;
 
 
 public class BlurConstants {
-
   public static final String PRIME_DOC = "_prime_";
   public static final String PRIME_DOC_VALUE = "true";
   public static final String ROW_ID = "rowid";
   public static final String RECORD_ID = "recordid";
   public static final String SUPER = "super";
+  public static final String FAMILY = "family";
 }

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/7bbf19d8/src/blur-query/src/test/java/org/apache/blur/analysis/BlurAnalyzerTest.java
----------------------------------------------------------------------
diff --git a/src/blur-query/src/test/java/org/apache/blur/analysis/BlurAnalyzerTest.java b/src/blur-query/src/test/java/org/apache/blur/analysis/BlurAnalyzerTest.java
index f8d4ffb..f974123 100644
--- a/src/blur-query/src/test/java/org/apache/blur/analysis/BlurAnalyzerTest.java
+++ b/src/blur-query/src/test/java/org/apache/blur/analysis/BlurAnalyzerTest.java
@@ -32,7 +32,6 @@ 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 {
@@ -50,8 +49,8 @@ public class BlurAnalyzerTest {
   @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"));
+    assertFalse(analyzer.getFieldType("b.c.sub1").stored());
+    assertTrue(analyzer.getFieldType("b.c").stored());
   }
 
   @Test
@@ -83,8 +82,8 @@ public class BlurAnalyzerTest {
   @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"));
+    assertTrue(analyzer.getFieldType("a.b").stored());
+    assertTrue(analyzer.getFieldType("b.c").stored());
   }
 
   @Test
@@ -102,32 +101,52 @@ public class BlurAnalyzerTest {
 
   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>();
+    AnalyzerDefinition analyzerDefinition = new AnalyzerDefinition().setDefaultDefinition(
+        new ColumnDefinition(STANDARD, false, null)).setFullTextAnalyzerClassName(STANDARD);
+    Map<String, ColumnFamilyDefinition> colFamDefs = new HashMap<String, ColumnFamilyDefinition>();
+
+    ColumnFamilyDefinition aColFamDef;
+    Map<String, ColumnDefinition> aColDef;
+    Map<String, ColumnDefinition> bColDef;
+    Map<String, ColumnDefinition> cColDef;
+    Map<String, AlternateColumnDefinition> alternates;
+    ColumnFamilyDefinition bColFamDef;
+    ColumnFamilyDefinition cColFamDef;
+    
+    aColFamDef = new ColumnFamilyDefinition();
+    
+    aColDef = new HashMap<String, ColumnDefinition>();
+    aColDef.put("b", new ColumnDefinition(STANDARD, true, null));
+    aColFamDef.setColumnDefinitions(aColDef);
+    colFamDefs.put("a", aColFamDef);
+    
+    bColDef = new HashMap<String, ColumnDefinition>();
+
+    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);
+    bColDef.put("c", new ColumnDefinition(STANDARD, true, alternates));
+
+    bColFamDef = new ColumnFamilyDefinition();
+    bColFamDef.setColumnDefinitions(bColDef);
+    colFamDefs.put("b", bColFamDef);
+    
+    cColFamDef = new ColumnFamilyDefinition();
+    cColDef = new HashMap<String, ColumnDefinition>();
+    cColDef.put("cint", new ColumnDefinition(BlurAnalyzer.TYPE.INTEGER.name(), true, null));
+    cColFamDef.setColumnDefinitions(cColDef);
+    
+    colFamDefs.put("c", cColFamDef);
+
+    analyzerDefinition.setColumnFamilyDefinitions(colFamDefs);
     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)));
+    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/7bbf19d8/src/blur-query/src/test/java/org/apache/blur/analysis/DoubleAnalyzerTest.java
----------------------------------------------------------------------
diff --git a/src/blur-query/src/test/java/org/apache/blur/analysis/DoubleAnalyzerTest.java b/src/blur-query/src/test/java/org/apache/blur/analysis/DoubleAnalyzerTest.java
deleted file mode 100644
index 7573025..0000000
--- a/src/blur-query/src/test/java/org/apache/blur/analysis/DoubleAnalyzerTest.java
+++ /dev/null
@@ -1,95 +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;
-import org.apache.lucene.document.Field.Index;
-import org.apache.lucene.document.Field.Store;
-import org.apache.lucene.index.IndexReader;
-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 org.apache.lucene.util.Version;
-import org.junit.Test;
-
-public class DoubleAnalyzerTest {
-
-  @Test
-  public void testLongAnalyzer() 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 testLongAnalyzerDifferentStep() 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(Version.LUCENE_36, 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 Field("test.test", value, Store.YES, Index.ANALYZED_NO_NORMS));
-      indexWriter.addDocument(document);
-    }
-    indexWriter.close();
-
-    IndexSearcher searcher = new IndexSearcher(IndexReader.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/7bbf19d8/src/blur-query/src/test/java/org/apache/blur/analysis/FloatAnalyzerTest.java
----------------------------------------------------------------------
diff --git a/src/blur-query/src/test/java/org/apache/blur/analysis/FloatAnalyzerTest.java b/src/blur-query/src/test/java/org/apache/blur/analysis/FloatAnalyzerTest.java
deleted file mode 100644
index f989c90..0000000
--- a/src/blur-query/src/test/java/org/apache/blur/analysis/FloatAnalyzerTest.java
+++ /dev/null
@@ -1,95 +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;
-import org.apache.lucene.document.Field.Index;
-import org.apache.lucene.document.Field.Store;
-import org.apache.lucene.index.IndexReader;
-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 org.apache.lucene.util.Version;
-import org.junit.Test;
-
-public class FloatAnalyzerTest {
-
-  @Test
-  public void testLongAnalyzer() 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 testLongAnalyzerDifferentStep() 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(Version.LUCENE_36, 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 Field("test.test", value, Store.YES, Index.ANALYZED_NO_NORMS));
-      indexWriter.addDocument(document);
-    }
-    indexWriter.close();
-
-    IndexSearcher searcher = new IndexSearcher(IndexReader.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/7bbf19d8/src/blur-query/src/test/java/org/apache/blur/analysis/IntegerAnalyzerTest.java
----------------------------------------------------------------------
diff --git a/src/blur-query/src/test/java/org/apache/blur/analysis/IntegerAnalyzerTest.java b/src/blur-query/src/test/java/org/apache/blur/analysis/IntegerAnalyzerTest.java
deleted file mode 100644
index 6c28e6c..0000000
--- a/src/blur-query/src/test/java/org/apache/blur/analysis/IntegerAnalyzerTest.java
+++ /dev/null
@@ -1,106 +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;
-import org.apache.lucene.document.Field.Index;
-import org.apache.lucene.document.Field.Store;
-import org.apache.lucene.index.IndexReader;
-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 org.apache.lucene.util.Version;
-import org.junit.Test;
-
-public class IntegerAnalyzerTest {
-
-  @Test
-  public void testLongAnalyzer() 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 testLongAnalyzerDifferentStep() 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 testLongAnalyzerDifferentStepAndRadix() 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(Version.LUCENE_36, 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 Field("test.test", value, Store.YES, Index.ANALYZED_NO_NORMS));
-      indexWriter.addDocument(document);
-    }
-    indexWriter.close();
-
-    IndexSearcher searcher = new IndexSearcher(IndexReader.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/7bbf19d8/src/blur-query/src/test/java/org/apache/blur/analysis/LongAnalyzerTest.java
----------------------------------------------------------------------
diff --git a/src/blur-query/src/test/java/org/apache/blur/analysis/LongAnalyzerTest.java b/src/blur-query/src/test/java/org/apache/blur/analysis/LongAnalyzerTest.java
deleted file mode 100644
index c315933..0000000
--- a/src/blur-query/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;
-import org.apache.lucene.document.Field.Index;
-import org.apache.lucene.document.Field.Store;
-import org.apache.lucene.index.IndexReader;
-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 org.apache.lucene.util.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(Version.LUCENE_36, 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 Field("test.test", value, Store.YES, Index.ANALYZED_NO_NORMS));
-      indexWriter.addDocument(document);
-    }
-    indexWriter.close();
-
-    IndexSearcher searcher = new IndexSearcher(IndexReader.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/7bbf19d8/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/AnalyzerDefinition.java
----------------------------------------------------------------------
diff --git a/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/AnalyzerDefinition.java b/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/AnalyzerDefinition.java
index 37adc0b..b720b6b 100644
--- a/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/AnalyzerDefinition.java
+++ b/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/AnalyzerDefinition.java
@@ -579,16 +579,16 @@ public class AnalyzerDefinition implements org.apache.blur.thirdparty.thrift_0_9
           case 3: // COLUMN_FAMILY_DEFINITIONS
             if (schemeField.type == org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.MAP) {
               {
-                org.apache.blur.thirdparty.thrift_0_9_0.protocol.TMap _map140 = iprot.readMapBegin();
-                struct.columnFamilyDefinitions = new HashMap<String,ColumnFamilyDefinition>(2*_map140.size);
-                for (int _i141 = 0; _i141 < _map140.size; ++_i141)
+                org.apache.blur.thirdparty.thrift_0_9_0.protocol.TMap _map148 = iprot.readMapBegin();
+                struct.columnFamilyDefinitions = new HashMap<String,ColumnFamilyDefinition>(2*_map148.size);
+                for (int _i149 = 0; _i149 < _map148.size; ++_i149)
                 {
-                  String _key142; // required
-                  ColumnFamilyDefinition _val143; // optional
-                  _key142 = iprot.readString();
-                  _val143 = new ColumnFamilyDefinition();
-                  _val143.read(iprot);
-                  struct.columnFamilyDefinitions.put(_key142, _val143);
+                  String _key150; // required
+                  ColumnFamilyDefinition _val151; // optional
+                  _key150 = iprot.readString();
+                  _val151 = new ColumnFamilyDefinition();
+                  _val151.read(iprot);
+                  struct.columnFamilyDefinitions.put(_key150, _val151);
                 }
                 iprot.readMapEnd();
               }
@@ -626,10 +626,10 @@ public class AnalyzerDefinition implements org.apache.blur.thirdparty.thrift_0_9
         oprot.writeFieldBegin(COLUMN_FAMILY_DEFINITIONS_FIELD_DESC);
         {
           oprot.writeMapBegin(new org.apache.blur.thirdparty.thrift_0_9_0.protocol.TMap(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRING, org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRUCT, struct.columnFamilyDefinitions.size()));
-          for (Map.Entry<String, ColumnFamilyDefinition> _iter144 : struct.columnFamilyDefinitions.entrySet())
+          for (Map.Entry<String, ColumnFamilyDefinition> _iter152 : struct.columnFamilyDefinitions.entrySet())
           {
-            oprot.writeString(_iter144.getKey());
-            _iter144.getValue().write(oprot);
+            oprot.writeString(_iter152.getKey());
+            _iter152.getValue().write(oprot);
           }
           oprot.writeMapEnd();
         }
@@ -672,10 +672,10 @@ public class AnalyzerDefinition implements org.apache.blur.thirdparty.thrift_0_9
       if (struct.isSetColumnFamilyDefinitions()) {
         {
           oprot.writeI32(struct.columnFamilyDefinitions.size());
-          for (Map.Entry<String, ColumnFamilyDefinition> _iter145 : struct.columnFamilyDefinitions.entrySet())
+          for (Map.Entry<String, ColumnFamilyDefinition> _iter153 : struct.columnFamilyDefinitions.entrySet())
           {
-            oprot.writeString(_iter145.getKey());
-            _iter145.getValue().write(oprot);
+            oprot.writeString(_iter153.getKey());
+            _iter153.getValue().write(oprot);
           }
         }
       }
@@ -696,16 +696,16 @@ public class AnalyzerDefinition implements org.apache.blur.thirdparty.thrift_0_9
       }
       if (incoming.get(2)) {
         {
-          org.apache.blur.thirdparty.thrift_0_9_0.protocol.TMap _map146 = new org.apache.blur.thirdparty.thrift_0_9_0.protocol.TMap(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRING, org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRUCT, iprot.readI32());
-          struct.columnFamilyDefinitions = new HashMap<String,ColumnFamilyDefinition>(2*_map146.size);
-          for (int _i147 = 0; _i147 < _map146.size; ++_i147)
+          org.apache.blur.thirdparty.thrift_0_9_0.protocol.TMap _map154 = new org.apache.blur.thirdparty.thrift_0_9_0.protocol.TMap(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRING, org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRUCT, iprot.readI32());
+          struct.columnFamilyDefinitions = new HashMap<String,ColumnFamilyDefinition>(2*_map154.size);
+          for (int _i155 = 0; _i155 < _map154.size; ++_i155)
           {
-            String _key148; // required
-            ColumnFamilyDefinition _val149; // optional
-            _key148 = iprot.readString();
-            _val149 = new ColumnFamilyDefinition();
-            _val149.read(iprot);
-            struct.columnFamilyDefinitions.put(_key148, _val149);
+            String _key156; // required
+            ColumnFamilyDefinition _val157; // optional
+            _key156 = iprot.readString();
+            _val157 = new ColumnFamilyDefinition();
+            _val157.read(iprot);
+            struct.columnFamilyDefinitions.put(_key156, _val157);
           }
         }
         struct.setColumnFamilyDefinitionsIsSet(true);


Mime
View raw message