incubator-blur-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amccu...@apache.org
Subject [14/16] git commit: Fixing apache header.
Date Wed, 31 Oct 2012 02:36:14 GMT
Fixing apache header.


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

Branch: refs/heads/0.2-dev
Commit: 334a3af7091415c5e905f7d418ad5974502de920
Parents: e26e4cd
Author: Aaron McCurry <amccurry@gmail.com>
Authored: Tue Oct 30 21:57:22 2012 -0400
Committer: Aaron McCurry <amccurry@gmail.com>
Committed: Tue Oct 30 21:57:22 2012 -0400

----------------------------------------------------------------------
 .../lucene/serializer/AbtractQueryWritable.java    |   10 --
 .../lucene/serializer/BooleanClauseWritable.java   |   71 ---------
 .../lucene/serializer/BooleanQueryWritable.java    |   57 --------
 .../blur/lucene/serializer/FuzzyQueryWritable.java |   89 ------------
 .../blur/lucene/serializer/ProtoSerializer.java    |   63 --------
 .../apache/blur/lucene/serializer/QUERY_TYPE.java  |  113 ---------------
 .../blur/lucene/serializer/QueryWritable.java      |   51 -------
 .../blur/lucene/serializer/SerializerUtil.java     |   37 -----
 .../blur/lucene/serializer/TermQueryWritable.java  |   46 ------
 .../blur/lucene/serializer/TermWritable.java       |   46 ------
 .../lucene/serializer/AbtractQueryWritable.java    |   21 +++-
 .../lucene/serializer/BooleanClauseWritable.java   |   16 ++
 .../lucene/serializer/BooleanQueryWritable.java    |   16 ++
 .../blur/lucene/serializer/FuzzyQueryWritable.java |   16 ++
 .../blur/lucene/serializer/ProtoSerializer.java    |   16 ++
 .../apache/blur/lucene/serializer/QUERY_TYPE.java  |   20 +++-
 .../blur/lucene/serializer/QueryWritable.java      |   16 ++
 .../blur/lucene/serializer/SerializerUtil.java     |   16 ++
 .../blur/lucene/serializer/TermQueryWritable.java  |   16 ++
 .../blur/lucene/serializer/TermWritable.java       |   16 ++
 20 files changed, 164 insertions(+), 588 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/334a3af7/src/blur-new-api-prototype/src/main/java/org/apache/blur/lucene/serializer/AbtractQueryWritable.java
----------------------------------------------------------------------
diff --git a/src/blur-new-api-prototype/src/main/java/org/apache/blur/lucene/serializer/AbtractQueryWritable.java
b/src/blur-new-api-prototype/src/main/java/org/apache/blur/lucene/serializer/AbtractQueryWritable.java
deleted file mode 100644
index b089b98..0000000
--- a/src/blur-new-api-prototype/src/main/java/org/apache/blur/lucene/serializer/AbtractQueryWritable.java
+++ /dev/null
@@ -1,10 +0,0 @@
-package org.apache.blur.lucene.serializer;
-
-import org.apache.hadoop.io.Writable;
-import org.apache.lucene.search.Query;
-
-public abstract class AbtractQueryWritable implements Writable {
-  
-  public abstract Query getQuery();
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/334a3af7/src/blur-new-api-prototype/src/main/java/org/apache/blur/lucene/serializer/BooleanClauseWritable.java
----------------------------------------------------------------------
diff --git a/src/blur-new-api-prototype/src/main/java/org/apache/blur/lucene/serializer/BooleanClauseWritable.java
b/src/blur-new-api-prototype/src/main/java/org/apache/blur/lucene/serializer/BooleanClauseWritable.java
deleted file mode 100644
index 54cb9fc..0000000
--- a/src/blur-new-api-prototype/src/main/java/org/apache/blur/lucene/serializer/BooleanClauseWritable.java
+++ /dev/null
@@ -1,71 +0,0 @@
-package org.apache.blur.lucene.serializer;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.hadoop.io.Writable;
-import org.apache.lucene.search.BooleanClause;
-import org.apache.lucene.search.BooleanClause.Occur;
-
-public class BooleanClauseWritable implements Writable {
-
-  private BooleanClause booleanClause;
-
-  public BooleanClauseWritable() {
-
-  }
-
-  public BooleanClauseWritable(BooleanClause booleanClause) {
-    this.booleanClause = booleanClause;
-  }
-
-  @Override
-  public void write(DataOutput out) throws IOException {
-    Occur occur = booleanClause.getOccur();
-    switch (occur) {
-    case MUST:
-      out.write(0);
-      break;
-    case MUST_NOT:
-      out.write(1);
-      break;
-    case SHOULD:
-      out.write(2);
-      break;
-    default:
-      throw new RuntimeException("Occur [" + occur + "] not supported");
-    }
-    new QueryWritable(booleanClause.getQuery()).write(out);
-  }
-
-  @Override
-  public void readFields(DataInput in) throws IOException {
-    Occur occur = null;
-    byte o = in.readByte();
-    switch (o) {
-    case 0:
-      occur = Occur.MUST;
-      break;
-    case 1:
-      occur = Occur.MUST_NOT;
-      break;
-    case 2:
-      occur = Occur.SHOULD;
-      break;
-    default:
-      throw new RuntimeException("Occur [" + o + "] not supported");
-    }
-    QueryWritable queryWritable = new QueryWritable();
-    queryWritable.readFields(in);
-    booleanClause = new BooleanClause(queryWritable.getQuery(), occur);
-  }
-
-  public BooleanClause getBooleanClause() {
-    return booleanClause;
-  }
-
-  public void setBooleanClause(BooleanClause booleanClause) {
-    this.booleanClause = booleanClause;
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/334a3af7/src/blur-new-api-prototype/src/main/java/org/apache/blur/lucene/serializer/BooleanQueryWritable.java
----------------------------------------------------------------------
diff --git a/src/blur-new-api-prototype/src/main/java/org/apache/blur/lucene/serializer/BooleanQueryWritable.java
b/src/blur-new-api-prototype/src/main/java/org/apache/blur/lucene/serializer/BooleanQueryWritable.java
deleted file mode 100644
index 9cedb91..0000000
--- a/src/blur-new-api-prototype/src/main/java/org/apache/blur/lucene/serializer/BooleanQueryWritable.java
+++ /dev/null
@@ -1,57 +0,0 @@
-package org.apache.blur.lucene.serializer;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.lucene.search.BooleanClause;
-import org.apache.lucene.search.BooleanQuery;
-
-public class BooleanQueryWritable extends AbtractQueryWritable {
-
-  private BooleanQuery query;
-
-  public BooleanQuery getQuery() {
-    return query;
-  }
-
-  public void setQuery(BooleanQuery query) {
-    this.query = query;
-  }
-
-  public BooleanQueryWritable() {
-
-  }
-
-  public BooleanQueryWritable(BooleanQuery booleanQuery) {
-    this.query = booleanQuery;
-  }
-
-  @Override
-  public void write(DataOutput out) throws IOException {
-    out.writeBoolean(query.isCoordDisabled());
-    out.writeFloat(query.getBoost());
-    out.writeInt(query.getMinimumNumberShouldMatch());
-    BooleanClause[] clauses = query.getClauses();
-    out.writeInt(clauses.length);
-    for (int i = 0; i < clauses.length; i++) {
-      BooleanClauseWritable booleanClauseWritable = new BooleanClauseWritable(clauses[i]);
-      booleanClauseWritable.write(out);
-    }
-  }
-
-  @Override
-  public void readFields(DataInput in) throws IOException {
-    query = new BooleanQuery(in.readBoolean());
-    query.setBoost(in.readFloat());
-    query.setMinimumNumberShouldMatch(in.readInt());
-    int length = in.readInt();
-    for (int i = 0; i < length; i++) {
-      BooleanClauseWritable booleanClauseWritable = new BooleanClauseWritable();
-      booleanClauseWritable.readFields(in);
-      query.add(booleanClauseWritable.getBooleanClause());
-    }
-
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/334a3af7/src/blur-new-api-prototype/src/main/java/org/apache/blur/lucene/serializer/FuzzyQueryWritable.java
----------------------------------------------------------------------
diff --git a/src/blur-new-api-prototype/src/main/java/org/apache/blur/lucene/serializer/FuzzyQueryWritable.java
b/src/blur-new-api-prototype/src/main/java/org/apache/blur/lucene/serializer/FuzzyQueryWritable.java
deleted file mode 100644
index 174746e..0000000
--- a/src/blur-new-api-prototype/src/main/java/org/apache/blur/lucene/serializer/FuzzyQueryWritable.java
+++ /dev/null
@@ -1,89 +0,0 @@
-package org.apache.blur.lucene.serializer;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-import java.lang.reflect.Field;
-
-import org.apache.lucene.index.Term;
-import org.apache.lucene.search.FuzzyQuery;
-
-public class FuzzyQueryWritable extends AbtractQueryWritable {
-
-  private FuzzyQuery query;
-  private static Field maxExpansionsField;
-  private static Field transpositionsField;
-
-  static {
-    try {
-      maxExpansionsField = FuzzyQuery.class.getDeclaredField("maxExpansions");
-      transpositionsField = FuzzyQuery.class.getDeclaredField("transpositions");
-      maxExpansionsField.setAccessible(true);
-      transpositionsField.setAccessible(true);
-    } catch (SecurityException e) {
-      throw new RuntimeException(e);
-    } catch (NoSuchFieldException e) {
-      throw new RuntimeException(e);
-    }
-  }
-
-  public FuzzyQueryWritable() {
-
-  }
-
-  public FuzzyQueryWritable(FuzzyQuery query) {
-    this.query = query;
-  }
-
-  public FuzzyQuery getQuery() {
-    return query;
-  }
-
-  public void setQuery(FuzzyQuery query) {
-    this.query = query;
-  }
-
-  @Override
-  public void write(DataOutput out) throws IOException {
-    out.writeFloat(query.getBoost());
-    new TermWritable(query.getTerm()).write(out);
-    out.writeInt(query.getMaxEdits());
-    out.writeInt(query.getPrefixLength());
-    out.writeInt(getMaxExpansions(query));
-    out.writeBoolean(getTranspositions(query));
-  }
-
-  @Override
-  public void readFields(DataInput in) throws IOException {
-    float boost = in.readFloat();
-    TermWritable termWritable = new TermWritable();
-    termWritable.readFields(in);
-    Term term = termWritable.getTerm();
-    int maxEdits = in.readInt();
-    int prefixLength = in.readInt();
-    int maxExpansions = in.readInt();
-    boolean transpositions = in.readBoolean();
-    query = new FuzzyQuery(term, maxEdits, prefixLength, maxExpansions, transpositions);
-    query.setBoost(boost);
-  }
-
-  private static boolean getTranspositions(FuzzyQuery query) {
-    try {
-      return transpositionsField.getBoolean(query);
-    } catch (IllegalArgumentException e) {
-      throw new RuntimeException(e);
-    } catch (IllegalAccessException e) {
-      throw new RuntimeException(e);
-    }
-  }
-
-  private static int getMaxExpansions(FuzzyQuery query) {
-    try {
-      return maxExpansionsField.getInt(query);
-    } catch (IllegalArgumentException e) {
-      throw new RuntimeException(e);
-    } catch (IllegalAccessException e) {
-      throw new RuntimeException(e);
-    }
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/334a3af7/src/blur-new-api-prototype/src/main/java/org/apache/blur/lucene/serializer/ProtoSerializer.java
----------------------------------------------------------------------
diff --git a/src/blur-new-api-prototype/src/main/java/org/apache/blur/lucene/serializer/ProtoSerializer.java
b/src/blur-new-api-prototype/src/main/java/org/apache/blur/lucene/serializer/ProtoSerializer.java
deleted file mode 100644
index 76b0aec..0000000
--- a/src/blur-new-api-prototype/src/main/java/org/apache/blur/lucene/serializer/ProtoSerializer.java
+++ /dev/null
@@ -1,63 +0,0 @@
-package org.apache.blur.lucene.serializer;
-
-import java.io.IOException;
-
-import org.apache.hadoop.io.DataInputBuffer;
-import org.apache.hadoop.io.DataOutputBuffer;
-import org.apache.lucene.analysis.standard.StandardAnalyzer;
-import org.apache.lucene.queryparser.classic.ParseException;
-import org.apache.lucene.queryparser.classic.QueryParser;
-import org.apache.lucene.search.Query;
-import org.apache.lucene.util.Version;
-
-public class ProtoSerializer {
-
-  public static void main(String[] args) throws ParseException, IOException {
-
-    QueryParser parser = new QueryParser(Version.LUCENE_40, "", new StandardAnalyzer(Version.LUCENE_40));
-
-    Query query = parser.parse("a:v1 b:v2 c:v3~");
-
-    QueryWritable queryWritable = new QueryWritable(query);
-    DataOutputBuffer buffer = new DataOutputBuffer();
-    queryWritable.write(buffer);
-    buffer.close();
-
-    System.out.println(new String(buffer.getData(), 0, buffer.getLength()));
-
-    QueryWritable qw = new QueryWritable();
-
-    DataInputBuffer in = new DataInputBuffer();
-    in.reset(buffer.getData(), 0, buffer.getLength());
-    qw.readFields(in);
-
-    System.out.println(qw.getQuery());
-
-    while (true) {
-      run(query);
-    }
-  }
-
-  private static void run(Query query) throws IOException {
-
-    DataOutputBuffer buffer = new DataOutputBuffer();
-    DataInputBuffer in = new DataInputBuffer();
-    QueryWritable outQw = new QueryWritable();
-    QueryWritable inQw = new QueryWritable();
-
-    long s = System.nanoTime();
-    int count = 1000000;
-    for (int i = 0; i < count; i++) {
-      outQw.setQuery(query);
-      outQw.write(buffer);
-
-      in.reset(buffer.getData(), 0, buffer.getLength());
-      inQw.readFields(in);
-
-      buffer.reset();
-    }
-    long e = System.nanoTime();
-    System.out.println((e - s) / 1000000.0 / (double) count);
-    // System.out.println((e - s) / (double) count);
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/334a3af7/src/blur-new-api-prototype/src/main/java/org/apache/blur/lucene/serializer/QUERY_TYPE.java
----------------------------------------------------------------------
diff --git a/src/blur-new-api-prototype/src/main/java/org/apache/blur/lucene/serializer/QUERY_TYPE.java
b/src/blur-new-api-prototype/src/main/java/org/apache/blur/lucene/serializer/QUERY_TYPE.java
deleted file mode 100644
index 1b980cc..0000000
--- a/src/blur-new-api-prototype/src/main/java/org/apache/blur/lucene/serializer/QUERY_TYPE.java
+++ /dev/null
@@ -1,113 +0,0 @@
-package org.apache.blur.lucene.serializer;
-
-import org.apache.lucene.queries.BoostingQuery;
-import org.apache.lucene.queries.CustomScoreQuery;
-import org.apache.lucene.queries.mlt.MoreLikeThisQuery;
-import org.apache.lucene.sandbox.queries.FuzzyLikeThisQuery;
-import org.apache.lucene.search.AutomatonQuery;
-import org.apache.lucene.search.BooleanQuery;
-import org.apache.lucene.search.ConstantScoreQuery;
-import org.apache.lucene.search.DisjunctionMaxQuery;
-import org.apache.lucene.search.FilteredQuery;
-import org.apache.lucene.search.FuzzyQuery;
-import org.apache.lucene.search.MatchAllDocsQuery;
-import org.apache.lucene.search.MultiPhraseQuery;
-import org.apache.lucene.search.NGramPhraseQuery;
-import org.apache.lucene.search.NumericRangeQuery;
-import org.apache.lucene.search.PhraseQuery;
-import org.apache.lucene.search.PrefixQuery;
-import org.apache.lucene.search.Query;
-import org.apache.lucene.search.RegexpQuery;
-import org.apache.lucene.search.TermQuery;
-import org.apache.lucene.search.TermRangeQuery;
-import org.apache.lucene.search.WildcardQuery;
-
-public enum QUERY_TYPE {
-  BOOLEAN((byte) 0), TERM((byte) 1), FUZZY((byte) 2);
-
-  private final byte type;
-
-  private QUERY_TYPE(byte type) {
-    this.type = type;
-  }
-
-  public byte getType() {
-    return type;
-  }
-
-  public static QUERY_TYPE lookup(byte type) {
-    switch (type) {
-    case 0:
-      return BOOLEAN;
-    case 1:
-      return TERM;
-    case 2:
-      return FUZZY;
-    default:
-      throw new RuntimeException("Type [" + type + "] is not supported");
-    }
-  }
-  
-  public static QUERY_TYPE lookup(Query query) {
-    if (query instanceof BooleanQuery) {
-      return BOOLEAN;
-    } else if (query instanceof TermQuery) {
-      return TERM;
-    } else if (query instanceof FuzzyQuery) {
-      return FUZZY;
-    } else if (query instanceof BoostingQuery) {
-      throw new RuntimeException("no impl");
-    } else if (query instanceof ConstantScoreQuery) {
-      throw new RuntimeException("no impl");
-    } else if (query instanceof CustomScoreQuery) {
-      throw new RuntimeException("no impl");
-    } else if (query instanceof DisjunctionMaxQuery) {
-      throw new RuntimeException("no impl");
-    } else if (query instanceof FilteredQuery) {
-      throw new RuntimeException("no impl");
-    } else if (query instanceof FuzzyLikeThisQuery) {
-      throw new RuntimeException("no impl");
-    } else if (query instanceof MatchAllDocsQuery) {
-      throw new RuntimeException("no impl");
-    } else if (query instanceof MoreLikeThisQuery) {
-      throw new RuntimeException("no impl");
-    } else if (query instanceof MultiPhraseQuery) {
-      throw new RuntimeException("no impl");
-    } else if (query instanceof AutomatonQuery) {
-      throw new RuntimeException("no impl");
-    } else if (query instanceof RegexpQuery) {
-      throw new RuntimeException("no impl");
-    } else if (query instanceof WildcardQuery) {
-      throw new RuntimeException("no impl");
-    } else if (query instanceof FuzzyQuery) {
-      throw new RuntimeException("no impl");
-    } else if (query instanceof NumericRangeQuery) {
-      throw new RuntimeException("no impl");
-    } else if (query instanceof PrefixQuery) {
-      throw new RuntimeException("no impl");
-    } else if (query instanceof RegexpQuery) {
-      throw new RuntimeException("no impl");
-    } else if (query instanceof TermRangeQuery) {
-      throw new RuntimeException("no impl");
-    } else if (query instanceof PhraseQuery) {
-      throw new RuntimeException("no impl");
-    } else if (query instanceof NGramPhraseQuery) {
-      throw new RuntimeException("no impl");
-    } else {
-      throw new RuntimeException("Query" + query + "] is not supported");
-    }
-  }
-  
-  public static AbtractQueryWritable lookupQueryWritable(QUERY_TYPE type) {
-    switch (type) {
-    case BOOLEAN:
-      return new BooleanQueryWritable();
-    case TERM:
-      return new TermQueryWritable();
-    case FUZZY:
-      return new FuzzyQueryWritable();
-    default:
-      throw new RuntimeException("Type [" + type + "] is not supported");
-    }
-  }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/334a3af7/src/blur-new-api-prototype/src/main/java/org/apache/blur/lucene/serializer/QueryWritable.java
----------------------------------------------------------------------
diff --git a/src/blur-new-api-prototype/src/main/java/org/apache/blur/lucene/serializer/QueryWritable.java
b/src/blur-new-api-prototype/src/main/java/org/apache/blur/lucene/serializer/QueryWritable.java
deleted file mode 100644
index 0ed4f60..0000000
--- a/src/blur-new-api-prototype/src/main/java/org/apache/blur/lucene/serializer/QueryWritable.java
+++ /dev/null
@@ -1,51 +0,0 @@
-package org.apache.blur.lucene.serializer;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.lucene.search.Query;
-
-public class QueryWritable extends AbtractQueryWritable {
-
-  private Query query;
-  private QUERY_TYPE lookup;
-
-  public QueryWritable() {
-
-  }
-
-  public QueryWritable(Query query) {
-    this.query = query;
-    this.lookup = QUERY_TYPE.lookup(query);
-  }
-
-  public Query getQuery() {
-    return query;
-  }
-
-  public void setQuery(Query query) {
-    this.query = query;
-    this.lookup = QUERY_TYPE.lookup(query);
-  }
-
-  public QUERY_TYPE getLookup() {
-    return lookup;
-  }
-
-  @Override
-  public void write(DataOutput out) throws IOException {
-    out.write(lookup.getType());
-    AbtractQueryWritable writable = QUERY_TYPE.lookupQueryWritable(lookup);
-    writable.write(out);
-  }
-
-  @Override
-  public void readFields(DataInput in) throws IOException {
-    byte b = in.readByte();
-    lookup = QUERY_TYPE.lookup(b);
-    AbtractQueryWritable writable = QUERY_TYPE.lookupQueryWritable(lookup);
-    writable.readFields(in);
-    query = writable.getQuery();
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/334a3af7/src/blur-new-api-prototype/src/main/java/org/apache/blur/lucene/serializer/SerializerUtil.java
----------------------------------------------------------------------
diff --git a/src/blur-new-api-prototype/src/main/java/org/apache/blur/lucene/serializer/SerializerUtil.java
b/src/blur-new-api-prototype/src/main/java/org/apache/blur/lucene/serializer/SerializerUtil.java
deleted file mode 100644
index ac8e39b..0000000
--- a/src/blur-new-api-prototype/src/main/java/org/apache/blur/lucene/serializer/SerializerUtil.java
+++ /dev/null
@@ -1,37 +0,0 @@
-package org.apache.blur.lucene.serializer;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.lucene.util.BytesRef;
-import org.apache.lucene.util.UnicodeUtil;
-
-public class SerializerUtil {
-
-  public static void writeString(String s, DataOutput out) throws IOException {
-    BytesRef bytes = new BytesRef();
-    UnicodeUtil.UTF16toUTF8(s, 0, s.length(), bytes);
-    writeBytesRef(bytes, out);
-  }
-
-  public static void writeBytesRef(BytesRef bytes, DataOutput out) throws IOException {
-    out.writeInt(bytes.length);
-    out.write(bytes.bytes, bytes.offset, bytes.length);
-  }
-
-  public static String readString(DataInput in) throws IOException {
-    BytesRef bytes = readBytesRef(in);
-    return bytes.utf8ToString();
-  }
-
-  public static BytesRef readBytesRef(DataInput in) throws IOException {
-    int length = in.readInt();
-    BytesRef bytes = new BytesRef(length);
-    in.readFully(bytes.bytes);
-    bytes.offset = 0;
-    bytes.length = length;
-    return bytes;
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/334a3af7/src/blur-new-api-prototype/src/main/java/org/apache/blur/lucene/serializer/TermQueryWritable.java
----------------------------------------------------------------------
diff --git a/src/blur-new-api-prototype/src/main/java/org/apache/blur/lucene/serializer/TermQueryWritable.java
b/src/blur-new-api-prototype/src/main/java/org/apache/blur/lucene/serializer/TermQueryWritable.java
deleted file mode 100644
index 8a79102..0000000
--- a/src/blur-new-api-prototype/src/main/java/org/apache/blur/lucene/serializer/TermQueryWritable.java
+++ /dev/null
@@ -1,46 +0,0 @@
-package org.apache.blur.lucene.serializer;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.lucene.index.Term;
-import org.apache.lucene.search.TermQuery;
-
-public class TermQueryWritable extends AbtractQueryWritable {
-
-  private TermQuery query;
-
-  public TermQuery getQuery() {
-    return query;
-  }
-
-  public void setQuery(TermQuery query) {
-    this.query = query;
-  }
-
-  public TermQueryWritable() {
-
-  }
-
-  public TermQueryWritable(TermQuery termQuery) {
-    this.query = termQuery;
-  }
-
-  @Override
-  public void write(DataOutput out) throws IOException {
-    out.writeFloat(query.getBoost());
-    Term term = query.getTerm();
-    new TermWritable(term).write(out);
-  }
-
-  @Override
-  public void readFields(DataInput in) throws IOException {
-    float boost = in.readFloat();
-    TermWritable termWritable = new TermWritable();
-    termWritable.readFields(in);
-    query = new TermQuery(termWritable.getTerm());
-    query.setBoost(boost);
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/334a3af7/src/blur-new-api-prototype/src/main/java/org/apache/blur/lucene/serializer/TermWritable.java
----------------------------------------------------------------------
diff --git a/src/blur-new-api-prototype/src/main/java/org/apache/blur/lucene/serializer/TermWritable.java
b/src/blur-new-api-prototype/src/main/java/org/apache/blur/lucene/serializer/TermWritable.java
deleted file mode 100644
index 32f2790..0000000
--- a/src/blur-new-api-prototype/src/main/java/org/apache/blur/lucene/serializer/TermWritable.java
+++ /dev/null
@@ -1,46 +0,0 @@
-package org.apache.blur.lucene.serializer;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.hadoop.io.Writable;
-import org.apache.lucene.index.Term;
-import org.apache.lucene.util.BytesRef;
-
-public class TermWritable implements Writable {
-
-  private Term term;
-
-  public TermWritable() {
-
-  }
-
-  public TermWritable(Term term) {
-    this.term = term;
-  }
-
-  public Term getTerm() {
-    return term;
-  }
-
-  public void setTerm(Term term) {
-    this.term = term;
-  }
-
-  @Override
-  public void write(DataOutput out) throws IOException {
-    String field = term.field();
-    BytesRef bytes = term.bytes();
-    SerializerUtil.writeString(field, out);
-    SerializerUtil.writeBytesRef(bytes, out);
-  }
-
-  @Override
-  public void readFields(DataInput in) throws IOException {
-    String field = SerializerUtil.readString(in);
-    BytesRef bytes = SerializerUtil.readBytesRef(in);
-    term = new Term(field, bytes);
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/334a3af7/src/blur-store/src/main/java/org/apache/blur/lucene/serializer/AbtractQueryWritable.java
----------------------------------------------------------------------
diff --git a/src/blur-store/src/main/java/org/apache/blur/lucene/serializer/AbtractQueryWritable.java
b/src/blur-store/src/main/java/org/apache/blur/lucene/serializer/AbtractQueryWritable.java
index 0e0fb71..1e59fba 100644
--- a/src/blur-store/src/main/java/org/apache/blur/lucene/serializer/AbtractQueryWritable.java
+++ b/src/blur-store/src/main/java/org/apache/blur/lucene/serializer/AbtractQueryWritable.java
@@ -1,13 +1,28 @@
 package org.apache.blur.lucene.serializer;
 
-
+/**
+ * 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 org.apache.hadoop.io.Writable;
 import org.apache.lucene.search.Query;
 
 public abstract class AbtractQueryWritable<T extends Query> implements Writable {
-  
+
   public abstract Query getQuery();
-  
+
   public abstract void setQuery(T query);
 
 }

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/334a3af7/src/blur-store/src/main/java/org/apache/blur/lucene/serializer/BooleanClauseWritable.java
----------------------------------------------------------------------
diff --git a/src/blur-store/src/main/java/org/apache/blur/lucene/serializer/BooleanClauseWritable.java
b/src/blur-store/src/main/java/org/apache/blur/lucene/serializer/BooleanClauseWritable.java
index 54cb9fc..e96a19b 100644
--- a/src/blur-store/src/main/java/org/apache/blur/lucene/serializer/BooleanClauseWritable.java
+++ b/src/blur-store/src/main/java/org/apache/blur/lucene/serializer/BooleanClauseWritable.java
@@ -1,5 +1,21 @@
 package org.apache.blur.lucene.serializer;
 
+/**
+ * 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.DataInput;
 import java.io.DataOutput;
 import java.io.IOException;

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/334a3af7/src/blur-store/src/main/java/org/apache/blur/lucene/serializer/BooleanQueryWritable.java
----------------------------------------------------------------------
diff --git a/src/blur-store/src/main/java/org/apache/blur/lucene/serializer/BooleanQueryWritable.java
b/src/blur-store/src/main/java/org/apache/blur/lucene/serializer/BooleanQueryWritable.java
index f785edb..a7da00b 100644
--- a/src/blur-store/src/main/java/org/apache/blur/lucene/serializer/BooleanQueryWritable.java
+++ b/src/blur-store/src/main/java/org/apache/blur/lucene/serializer/BooleanQueryWritable.java
@@ -1,5 +1,21 @@
 package org.apache.blur.lucene.serializer;
 
+/**
+ * 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.DataInput;
 import java.io.DataOutput;
 import java.io.IOException;

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/334a3af7/src/blur-store/src/main/java/org/apache/blur/lucene/serializer/FuzzyQueryWritable.java
----------------------------------------------------------------------
diff --git a/src/blur-store/src/main/java/org/apache/blur/lucene/serializer/FuzzyQueryWritable.java
b/src/blur-store/src/main/java/org/apache/blur/lucene/serializer/FuzzyQueryWritable.java
index b63f6c6..d285f5b 100644
--- a/src/blur-store/src/main/java/org/apache/blur/lucene/serializer/FuzzyQueryWritable.java
+++ b/src/blur-store/src/main/java/org/apache/blur/lucene/serializer/FuzzyQueryWritable.java
@@ -1,5 +1,21 @@
 package org.apache.blur.lucene.serializer;
 
+/**
+ * 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.DataInput;
 import java.io.DataOutput;
 import java.io.IOException;

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/334a3af7/src/blur-store/src/main/java/org/apache/blur/lucene/serializer/ProtoSerializer.java
----------------------------------------------------------------------
diff --git a/src/blur-store/src/main/java/org/apache/blur/lucene/serializer/ProtoSerializer.java
b/src/blur-store/src/main/java/org/apache/blur/lucene/serializer/ProtoSerializer.java
index 76b0aec..0aada55 100644
--- a/src/blur-store/src/main/java/org/apache/blur/lucene/serializer/ProtoSerializer.java
+++ b/src/blur-store/src/main/java/org/apache/blur/lucene/serializer/ProtoSerializer.java
@@ -1,5 +1,21 @@
 package org.apache.blur.lucene.serializer;
 
+/**
+ * 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 org.apache.hadoop.io.DataInputBuffer;

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/334a3af7/src/blur-store/src/main/java/org/apache/blur/lucene/serializer/QUERY_TYPE.java
----------------------------------------------------------------------
diff --git a/src/blur-store/src/main/java/org/apache/blur/lucene/serializer/QUERY_TYPE.java
b/src/blur-store/src/main/java/org/apache/blur/lucene/serializer/QUERY_TYPE.java
index 6fb9b42..005e204 100644
--- a/src/blur-store/src/main/java/org/apache/blur/lucene/serializer/QUERY_TYPE.java
+++ b/src/blur-store/src/main/java/org/apache/blur/lucene/serializer/QUERY_TYPE.java
@@ -1,5 +1,21 @@
 package org.apache.blur.lucene.serializer;
 
+/**
+ * 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 org.apache.lucene.queries.BoostingQuery;
 import org.apache.lucene.queries.CustomScoreQuery;
 import org.apache.lucene.queries.mlt.MoreLikeThisQuery;
@@ -47,7 +63,7 @@ public enum QUERY_TYPE {
       throw new RuntimeException("Type [" + type + "] is not supported");
     }
   }
-  
+
   public static QUERY_TYPE lookup(Query query) {
     if (query instanceof BooleanQuery) {
       return BOOLEAN;
@@ -97,7 +113,7 @@ public enum QUERY_TYPE {
       throw new RuntimeException("Query" + query + "] is not supported");
     }
   }
-  
+
   public static AbtractQueryWritable<?> lookupQueryWritable(QUERY_TYPE type) {
     switch (type) {
     case BOOLEAN:

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/334a3af7/src/blur-store/src/main/java/org/apache/blur/lucene/serializer/QueryWritable.java
----------------------------------------------------------------------
diff --git a/src/blur-store/src/main/java/org/apache/blur/lucene/serializer/QueryWritable.java
b/src/blur-store/src/main/java/org/apache/blur/lucene/serializer/QueryWritable.java
index e00bdbd..2a1fa93 100644
--- a/src/blur-store/src/main/java/org/apache/blur/lucene/serializer/QueryWritable.java
+++ b/src/blur-store/src/main/java/org/apache/blur/lucene/serializer/QueryWritable.java
@@ -1,5 +1,21 @@
 package org.apache.blur.lucene.serializer;
 
+/**
+ * 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.DataInput;
 import java.io.DataOutput;
 import java.io.IOException;

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/334a3af7/src/blur-store/src/main/java/org/apache/blur/lucene/serializer/SerializerUtil.java
----------------------------------------------------------------------
diff --git a/src/blur-store/src/main/java/org/apache/blur/lucene/serializer/SerializerUtil.java
b/src/blur-store/src/main/java/org/apache/blur/lucene/serializer/SerializerUtil.java
index ac8e39b..a43ac0e 100644
--- a/src/blur-store/src/main/java/org/apache/blur/lucene/serializer/SerializerUtil.java
+++ b/src/blur-store/src/main/java/org/apache/blur/lucene/serializer/SerializerUtil.java
@@ -1,5 +1,21 @@
 package org.apache.blur.lucene.serializer;
 
+/**
+ * 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.DataInput;
 import java.io.DataOutput;
 import java.io.IOException;

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/334a3af7/src/blur-store/src/main/java/org/apache/blur/lucene/serializer/TermQueryWritable.java
----------------------------------------------------------------------
diff --git a/src/blur-store/src/main/java/org/apache/blur/lucene/serializer/TermQueryWritable.java
b/src/blur-store/src/main/java/org/apache/blur/lucene/serializer/TermQueryWritable.java
index 7a05a23..4173ac2 100644
--- a/src/blur-store/src/main/java/org/apache/blur/lucene/serializer/TermQueryWritable.java
+++ b/src/blur-store/src/main/java/org/apache/blur/lucene/serializer/TermQueryWritable.java
@@ -1,5 +1,21 @@
 package org.apache.blur.lucene.serializer;
 
+/**
+ * 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.DataInput;
 import java.io.DataOutput;
 import java.io.IOException;

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/334a3af7/src/blur-store/src/main/java/org/apache/blur/lucene/serializer/TermWritable.java
----------------------------------------------------------------------
diff --git a/src/blur-store/src/main/java/org/apache/blur/lucene/serializer/TermWritable.java
b/src/blur-store/src/main/java/org/apache/blur/lucene/serializer/TermWritable.java
index 32f2790..9c008b5 100644
--- a/src/blur-store/src/main/java/org/apache/blur/lucene/serializer/TermWritable.java
+++ b/src/blur-store/src/main/java/org/apache/blur/lucene/serializer/TermWritable.java
@@ -1,5 +1,21 @@
 package org.apache.blur.lucene.serializer;
 
+/**
+ * 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.DataInput;
 import java.io.DataOutput;
 import java.io.IOException;


Mime
View raw message