incubator-blur-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amccu...@apache.org
Subject [41/46] First commit of api changes.
Date Tue, 30 Oct 2012 02:53:19 GMT
http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/1e930bbc/src/blur-new-api-prototype/src/main/java/org/apache/blur/thrift/generated/QueryArgs.java
----------------------------------------------------------------------
diff --git a/src/blur-new-api-prototype/src/main/java/org/apache/blur/thrift/generated/QueryArgs.java b/src/blur-new-api-prototype/src/main/java/org/apache/blur/thrift/generated/QueryArgs.java
new file mode 100644
index 0000000..75b9e3d
--- /dev/null
+++ b/src/blur-new-api-prototype/src/main/java/org/apache/blur/thrift/generated/QueryArgs.java
@@ -0,0 +1,993 @@
+/**
+ * Autogenerated by Thrift Compiler (0.7.0)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ */
+package org.apache.blur.thrift.generated;
+
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.EnumMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.EnumSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class QueryArgs implements org.apache.thrift.TBase<QueryArgs, QueryArgs._Fields>, java.io.Serializable, Cloneable {
+  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("QueryArgs");
+
+  private static final org.apache.thrift.protocol.TField AFTER_FIELD_DESC = new org.apache.thrift.protocol.TField("after", org.apache.thrift.protocol.TType.STRUCT, (short)1);
+  private static final org.apache.thrift.protocol.TField QUERY_FIELD_DESC = new org.apache.thrift.protocol.TField("query", org.apache.thrift.protocol.TType.STRING, (short)2);
+  private static final org.apache.thrift.protocol.TField FILTER_FIELD_DESC = new org.apache.thrift.protocol.TField("filter", org.apache.thrift.protocol.TType.STRING, (short)3);
+  private static final org.apache.thrift.protocol.TField NUMBER_TO_FETCH_FIELD_DESC = new org.apache.thrift.protocol.TField("numberToFetch", org.apache.thrift.protocol.TType.I32, (short)4);
+  private static final org.apache.thrift.protocol.TField SORT_FIELD_DESC = new org.apache.thrift.protocol.TField("sort", org.apache.thrift.protocol.TType.STRUCT, (short)5);
+  private static final org.apache.thrift.protocol.TField DO_DOC_SCORES_FIELD_DESC = new org.apache.thrift.protocol.TField("doDocScores", org.apache.thrift.protocol.TType.BOOL, (short)6);
+  private static final org.apache.thrift.protocol.TField DO_MAX_SCORE_FIELD_DESC = new org.apache.thrift.protocol.TField("doMaxScore", org.apache.thrift.protocol.TType.BOOL, (short)7);
+  private static final org.apache.thrift.protocol.TField SHARD_INDEXES_FIELD_DESC = new org.apache.thrift.protocol.TField("shardIndexes", org.apache.thrift.protocol.TType.LIST, (short)8);
+
+  public ScoreDoc after; // required
+  public ByteBuffer query; // required
+  public ByteBuffer filter; // required
+  public int numberToFetch; // required
+  public Sort sort; // required
+  public boolean doDocScores; // required
+  public boolean doMaxScore; // required
+  public List<Integer> shardIndexes; // required
+
+  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+    AFTER((short)1, "after"),
+    QUERY((short)2, "query"),
+    FILTER((short)3, "filter"),
+    NUMBER_TO_FETCH((short)4, "numberToFetch"),
+    SORT((short)5, "sort"),
+    DO_DOC_SCORES((short)6, "doDocScores"),
+    DO_MAX_SCORE((short)7, "doMaxScore"),
+    SHARD_INDEXES((short)8, "shardIndexes");
+
+    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+    static {
+      for (_Fields field : EnumSet.allOf(_Fields.class)) {
+        byName.put(field.getFieldName(), field);
+      }
+    }
+
+    /**
+     * Find the _Fields constant that matches fieldId, or null if its not found.
+     */
+    public static _Fields findByThriftId(int fieldId) {
+      switch(fieldId) {
+        case 1: // AFTER
+          return AFTER;
+        case 2: // QUERY
+          return QUERY;
+        case 3: // FILTER
+          return FILTER;
+        case 4: // NUMBER_TO_FETCH
+          return NUMBER_TO_FETCH;
+        case 5: // SORT
+          return SORT;
+        case 6: // DO_DOC_SCORES
+          return DO_DOC_SCORES;
+        case 7: // DO_MAX_SCORE
+          return DO_MAX_SCORE;
+        case 8: // SHARD_INDEXES
+          return SHARD_INDEXES;
+        default:
+          return null;
+      }
+    }
+
+    /**
+     * Find the _Fields constant that matches fieldId, throwing an exception
+     * if it is not found.
+     */
+    public static _Fields findByThriftIdOrThrow(int fieldId) {
+      _Fields fields = findByThriftId(fieldId);
+      if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+      return fields;
+    }
+
+    /**
+     * Find the _Fields constant that matches name, or null if its not found.
+     */
+    public static _Fields findByName(String name) {
+      return byName.get(name);
+    }
+
+    private final short _thriftId;
+    private final String _fieldName;
+
+    _Fields(short thriftId, String fieldName) {
+      _thriftId = thriftId;
+      _fieldName = fieldName;
+    }
+
+    public short getThriftFieldId() {
+      return _thriftId;
+    }
+
+    public String getFieldName() {
+      return _fieldName;
+    }
+  }
+
+  // isset id assignments
+  private static final int __NUMBERTOFETCH_ISSET_ID = 0;
+  private static final int __DODOCSCORES_ISSET_ID = 1;
+  private static final int __DOMAXSCORE_ISSET_ID = 2;
+  private BitSet __isset_bit_vector = new BitSet(3);
+
+  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+  static {
+    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+    tmpMap.put(_Fields.AFTER, new org.apache.thrift.meta_data.FieldMetaData("after", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ScoreDoc.class)));
+    tmpMap.put(_Fields.QUERY, new org.apache.thrift.meta_data.FieldMetaData("query", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING        , true)));
+    tmpMap.put(_Fields.FILTER, new org.apache.thrift.meta_data.FieldMetaData("filter", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING        , true)));
+    tmpMap.put(_Fields.NUMBER_TO_FETCH, new org.apache.thrift.meta_data.FieldMetaData("numberToFetch", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
+    tmpMap.put(_Fields.SORT, new org.apache.thrift.meta_data.FieldMetaData("sort", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Sort.class)));
+    tmpMap.put(_Fields.DO_DOC_SCORES, new org.apache.thrift.meta_data.FieldMetaData("doDocScores", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
+    tmpMap.put(_Fields.DO_MAX_SCORE, new org.apache.thrift.meta_data.FieldMetaData("doMaxScore", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
+    tmpMap.put(_Fields.SHARD_INDEXES, new org.apache.thrift.meta_data.FieldMetaData("shardIndexes", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
+            new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))));
+    metaDataMap = Collections.unmodifiableMap(tmpMap);
+    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(QueryArgs.class, metaDataMap);
+  }
+
+  public QueryArgs() {
+  }
+
+  public QueryArgs(
+    ScoreDoc after,
+    ByteBuffer query,
+    ByteBuffer filter,
+    int numberToFetch,
+    Sort sort,
+    boolean doDocScores,
+    boolean doMaxScore,
+    List<Integer> shardIndexes)
+  {
+    this();
+    this.after = after;
+    this.query = query;
+    this.filter = filter;
+    this.numberToFetch = numberToFetch;
+    setNumberToFetchIsSet(true);
+    this.sort = sort;
+    this.doDocScores = doDocScores;
+    setDoDocScoresIsSet(true);
+    this.doMaxScore = doMaxScore;
+    setDoMaxScoreIsSet(true);
+    this.shardIndexes = shardIndexes;
+  }
+
+  /**
+   * Performs a deep copy on <i>other</i>.
+   */
+  public QueryArgs(QueryArgs other) {
+    __isset_bit_vector.clear();
+    __isset_bit_vector.or(other.__isset_bit_vector);
+    if (other.isSetAfter()) {
+      this.after = new ScoreDoc(other.after);
+    }
+    if (other.isSetQuery()) {
+      this.query = org.apache.thrift.TBaseHelper.copyBinary(other.query);
+;
+    }
+    if (other.isSetFilter()) {
+      this.filter = org.apache.thrift.TBaseHelper.copyBinary(other.filter);
+;
+    }
+    this.numberToFetch = other.numberToFetch;
+    if (other.isSetSort()) {
+      this.sort = new Sort(other.sort);
+    }
+    this.doDocScores = other.doDocScores;
+    this.doMaxScore = other.doMaxScore;
+    if (other.isSetShardIndexes()) {
+      List<Integer> __this__shardIndexes = new ArrayList<Integer>();
+      for (Integer other_element : other.shardIndexes) {
+        __this__shardIndexes.add(other_element);
+      }
+      this.shardIndexes = __this__shardIndexes;
+    }
+  }
+
+  public QueryArgs deepCopy() {
+    return new QueryArgs(this);
+  }
+
+  @Override
+  public void clear() {
+    this.after = null;
+    this.query = null;
+    this.filter = null;
+    setNumberToFetchIsSet(false);
+    this.numberToFetch = 0;
+    this.sort = null;
+    setDoDocScoresIsSet(false);
+    this.doDocScores = false;
+    setDoMaxScoreIsSet(false);
+    this.doMaxScore = false;
+    this.shardIndexes = null;
+  }
+
+  public ScoreDoc getAfter() {
+    return this.after;
+  }
+
+  public QueryArgs setAfter(ScoreDoc after) {
+    this.after = after;
+    return this;
+  }
+
+  public void unsetAfter() {
+    this.after = null;
+  }
+
+  /** Returns true if field after is set (has been assigned a value) and false otherwise */
+  public boolean isSetAfter() {
+    return this.after != null;
+  }
+
+  public void setAfterIsSet(boolean value) {
+    if (!value) {
+      this.after = null;
+    }
+  }
+
+  public byte[] getQuery() {
+    setQuery(org.apache.thrift.TBaseHelper.rightSize(query));
+    return query == null ? null : query.array();
+  }
+
+  public ByteBuffer bufferForQuery() {
+    return query;
+  }
+
+  public QueryArgs setQuery(byte[] query) {
+    setQuery(query == null ? (ByteBuffer)null : ByteBuffer.wrap(query));
+    return this;
+  }
+
+  public QueryArgs setQuery(ByteBuffer query) {
+    this.query = query;
+    return this;
+  }
+
+  public void unsetQuery() {
+    this.query = null;
+  }
+
+  /** Returns true if field query is set (has been assigned a value) and false otherwise */
+  public boolean isSetQuery() {
+    return this.query != null;
+  }
+
+  public void setQueryIsSet(boolean value) {
+    if (!value) {
+      this.query = null;
+    }
+  }
+
+  public byte[] getFilter() {
+    setFilter(org.apache.thrift.TBaseHelper.rightSize(filter));
+    return filter == null ? null : filter.array();
+  }
+
+  public ByteBuffer bufferForFilter() {
+    return filter;
+  }
+
+  public QueryArgs setFilter(byte[] filter) {
+    setFilter(filter == null ? (ByteBuffer)null : ByteBuffer.wrap(filter));
+    return this;
+  }
+
+  public QueryArgs setFilter(ByteBuffer filter) {
+    this.filter = filter;
+    return this;
+  }
+
+  public void unsetFilter() {
+    this.filter = null;
+  }
+
+  /** Returns true if field filter is set (has been assigned a value) and false otherwise */
+  public boolean isSetFilter() {
+    return this.filter != null;
+  }
+
+  public void setFilterIsSet(boolean value) {
+    if (!value) {
+      this.filter = null;
+    }
+  }
+
+  public int getNumberToFetch() {
+    return this.numberToFetch;
+  }
+
+  public QueryArgs setNumberToFetch(int numberToFetch) {
+    this.numberToFetch = numberToFetch;
+    setNumberToFetchIsSet(true);
+    return this;
+  }
+
+  public void unsetNumberToFetch() {
+    __isset_bit_vector.clear(__NUMBERTOFETCH_ISSET_ID);
+  }
+
+  /** Returns true if field numberToFetch is set (has been assigned a value) and false otherwise */
+  public boolean isSetNumberToFetch() {
+    return __isset_bit_vector.get(__NUMBERTOFETCH_ISSET_ID);
+  }
+
+  public void setNumberToFetchIsSet(boolean value) {
+    __isset_bit_vector.set(__NUMBERTOFETCH_ISSET_ID, value);
+  }
+
+  public Sort getSort() {
+    return this.sort;
+  }
+
+  public QueryArgs setSort(Sort sort) {
+    this.sort = sort;
+    return this;
+  }
+
+  public void unsetSort() {
+    this.sort = null;
+  }
+
+  /** Returns true if field sort is set (has been assigned a value) and false otherwise */
+  public boolean isSetSort() {
+    return this.sort != null;
+  }
+
+  public void setSortIsSet(boolean value) {
+    if (!value) {
+      this.sort = null;
+    }
+  }
+
+  public boolean isDoDocScores() {
+    return this.doDocScores;
+  }
+
+  public QueryArgs setDoDocScores(boolean doDocScores) {
+    this.doDocScores = doDocScores;
+    setDoDocScoresIsSet(true);
+    return this;
+  }
+
+  public void unsetDoDocScores() {
+    __isset_bit_vector.clear(__DODOCSCORES_ISSET_ID);
+  }
+
+  /** Returns true if field doDocScores is set (has been assigned a value) and false otherwise */
+  public boolean isSetDoDocScores() {
+    return __isset_bit_vector.get(__DODOCSCORES_ISSET_ID);
+  }
+
+  public void setDoDocScoresIsSet(boolean value) {
+    __isset_bit_vector.set(__DODOCSCORES_ISSET_ID, value);
+  }
+
+  public boolean isDoMaxScore() {
+    return this.doMaxScore;
+  }
+
+  public QueryArgs setDoMaxScore(boolean doMaxScore) {
+    this.doMaxScore = doMaxScore;
+    setDoMaxScoreIsSet(true);
+    return this;
+  }
+
+  public void unsetDoMaxScore() {
+    __isset_bit_vector.clear(__DOMAXSCORE_ISSET_ID);
+  }
+
+  /** Returns true if field doMaxScore is set (has been assigned a value) and false otherwise */
+  public boolean isSetDoMaxScore() {
+    return __isset_bit_vector.get(__DOMAXSCORE_ISSET_ID);
+  }
+
+  public void setDoMaxScoreIsSet(boolean value) {
+    __isset_bit_vector.set(__DOMAXSCORE_ISSET_ID, value);
+  }
+
+  public int getShardIndexesSize() {
+    return (this.shardIndexes == null) ? 0 : this.shardIndexes.size();
+  }
+
+  public java.util.Iterator<Integer> getShardIndexesIterator() {
+    return (this.shardIndexes == null) ? null : this.shardIndexes.iterator();
+  }
+
+  public void addToShardIndexes(int elem) {
+    if (this.shardIndexes == null) {
+      this.shardIndexes = new ArrayList<Integer>();
+    }
+    this.shardIndexes.add(elem);
+  }
+
+  public List<Integer> getShardIndexes() {
+    return this.shardIndexes;
+  }
+
+  public QueryArgs setShardIndexes(List<Integer> shardIndexes) {
+    this.shardIndexes = shardIndexes;
+    return this;
+  }
+
+  public void unsetShardIndexes() {
+    this.shardIndexes = null;
+  }
+
+  /** Returns true if field shardIndexes is set (has been assigned a value) and false otherwise */
+  public boolean isSetShardIndexes() {
+    return this.shardIndexes != null;
+  }
+
+  public void setShardIndexesIsSet(boolean value) {
+    if (!value) {
+      this.shardIndexes = null;
+    }
+  }
+
+  public void setFieldValue(_Fields field, Object value) {
+    switch (field) {
+    case AFTER:
+      if (value == null) {
+        unsetAfter();
+      } else {
+        setAfter((ScoreDoc)value);
+      }
+      break;
+
+    case QUERY:
+      if (value == null) {
+        unsetQuery();
+      } else {
+        setQuery((ByteBuffer)value);
+      }
+      break;
+
+    case FILTER:
+      if (value == null) {
+        unsetFilter();
+      } else {
+        setFilter((ByteBuffer)value);
+      }
+      break;
+
+    case NUMBER_TO_FETCH:
+      if (value == null) {
+        unsetNumberToFetch();
+      } else {
+        setNumberToFetch((Integer)value);
+      }
+      break;
+
+    case SORT:
+      if (value == null) {
+        unsetSort();
+      } else {
+        setSort((Sort)value);
+      }
+      break;
+
+    case DO_DOC_SCORES:
+      if (value == null) {
+        unsetDoDocScores();
+      } else {
+        setDoDocScores((Boolean)value);
+      }
+      break;
+
+    case DO_MAX_SCORE:
+      if (value == null) {
+        unsetDoMaxScore();
+      } else {
+        setDoMaxScore((Boolean)value);
+      }
+      break;
+
+    case SHARD_INDEXES:
+      if (value == null) {
+        unsetShardIndexes();
+      } else {
+        setShardIndexes((List<Integer>)value);
+      }
+      break;
+
+    }
+  }
+
+  public Object getFieldValue(_Fields field) {
+    switch (field) {
+    case AFTER:
+      return getAfter();
+
+    case QUERY:
+      return getQuery();
+
+    case FILTER:
+      return getFilter();
+
+    case NUMBER_TO_FETCH:
+      return Integer.valueOf(getNumberToFetch());
+
+    case SORT:
+      return getSort();
+
+    case DO_DOC_SCORES:
+      return Boolean.valueOf(isDoDocScores());
+
+    case DO_MAX_SCORE:
+      return Boolean.valueOf(isDoMaxScore());
+
+    case SHARD_INDEXES:
+      return getShardIndexes();
+
+    }
+    throw new IllegalStateException();
+  }
+
+  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+  public boolean isSet(_Fields field) {
+    if (field == null) {
+      throw new IllegalArgumentException();
+    }
+
+    switch (field) {
+    case AFTER:
+      return isSetAfter();
+    case QUERY:
+      return isSetQuery();
+    case FILTER:
+      return isSetFilter();
+    case NUMBER_TO_FETCH:
+      return isSetNumberToFetch();
+    case SORT:
+      return isSetSort();
+    case DO_DOC_SCORES:
+      return isSetDoDocScores();
+    case DO_MAX_SCORE:
+      return isSetDoMaxScore();
+    case SHARD_INDEXES:
+      return isSetShardIndexes();
+    }
+    throw new IllegalStateException();
+  }
+
+  @Override
+  public boolean equals(Object that) {
+    if (that == null)
+      return false;
+    if (that instanceof QueryArgs)
+      return this.equals((QueryArgs)that);
+    return false;
+  }
+
+  public boolean equals(QueryArgs that) {
+    if (that == null)
+      return false;
+
+    boolean this_present_after = true && this.isSetAfter();
+    boolean that_present_after = true && that.isSetAfter();
+    if (this_present_after || that_present_after) {
+      if (!(this_present_after && that_present_after))
+        return false;
+      if (!this.after.equals(that.after))
+        return false;
+    }
+
+    boolean this_present_query = true && this.isSetQuery();
+    boolean that_present_query = true && that.isSetQuery();
+    if (this_present_query || that_present_query) {
+      if (!(this_present_query && that_present_query))
+        return false;
+      if (!this.query.equals(that.query))
+        return false;
+    }
+
+    boolean this_present_filter = true && this.isSetFilter();
+    boolean that_present_filter = true && that.isSetFilter();
+    if (this_present_filter || that_present_filter) {
+      if (!(this_present_filter && that_present_filter))
+        return false;
+      if (!this.filter.equals(that.filter))
+        return false;
+    }
+
+    boolean this_present_numberToFetch = true;
+    boolean that_present_numberToFetch = true;
+    if (this_present_numberToFetch || that_present_numberToFetch) {
+      if (!(this_present_numberToFetch && that_present_numberToFetch))
+        return false;
+      if (this.numberToFetch != that.numberToFetch)
+        return false;
+    }
+
+    boolean this_present_sort = true && this.isSetSort();
+    boolean that_present_sort = true && that.isSetSort();
+    if (this_present_sort || that_present_sort) {
+      if (!(this_present_sort && that_present_sort))
+        return false;
+      if (!this.sort.equals(that.sort))
+        return false;
+    }
+
+    boolean this_present_doDocScores = true;
+    boolean that_present_doDocScores = true;
+    if (this_present_doDocScores || that_present_doDocScores) {
+      if (!(this_present_doDocScores && that_present_doDocScores))
+        return false;
+      if (this.doDocScores != that.doDocScores)
+        return false;
+    }
+
+    boolean this_present_doMaxScore = true;
+    boolean that_present_doMaxScore = true;
+    if (this_present_doMaxScore || that_present_doMaxScore) {
+      if (!(this_present_doMaxScore && that_present_doMaxScore))
+        return false;
+      if (this.doMaxScore != that.doMaxScore)
+        return false;
+    }
+
+    boolean this_present_shardIndexes = true && this.isSetShardIndexes();
+    boolean that_present_shardIndexes = true && that.isSetShardIndexes();
+    if (this_present_shardIndexes || that_present_shardIndexes) {
+      if (!(this_present_shardIndexes && that_present_shardIndexes))
+        return false;
+      if (!this.shardIndexes.equals(that.shardIndexes))
+        return false;
+    }
+
+    return true;
+  }
+
+  @Override
+  public int hashCode() {
+    return 0;
+  }
+
+  public int compareTo(QueryArgs other) {
+    if (!getClass().equals(other.getClass())) {
+      return getClass().getName().compareTo(other.getClass().getName());
+    }
+
+    int lastComparison = 0;
+    QueryArgs typedOther = (QueryArgs)other;
+
+    lastComparison = Boolean.valueOf(isSetAfter()).compareTo(typedOther.isSetAfter());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetAfter()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.after, typedOther.after);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetQuery()).compareTo(typedOther.isSetQuery());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetQuery()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.query, typedOther.query);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetFilter()).compareTo(typedOther.isSetFilter());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetFilter()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.filter, typedOther.filter);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetNumberToFetch()).compareTo(typedOther.isSetNumberToFetch());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetNumberToFetch()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.numberToFetch, typedOther.numberToFetch);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetSort()).compareTo(typedOther.isSetSort());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetSort()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sort, typedOther.sort);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetDoDocScores()).compareTo(typedOther.isSetDoDocScores());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetDoDocScores()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.doDocScores, typedOther.doDocScores);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetDoMaxScore()).compareTo(typedOther.isSetDoMaxScore());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetDoMaxScore()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.doMaxScore, typedOther.doMaxScore);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetShardIndexes()).compareTo(typedOther.isSetShardIndexes());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetShardIndexes()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.shardIndexes, typedOther.shardIndexes);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    return 0;
+  }
+
+  public _Fields fieldForId(int fieldId) {
+    return _Fields.findByThriftId(fieldId);
+  }
+
+  public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+    org.apache.thrift.protocol.TField field;
+    iprot.readStructBegin();
+    while (true)
+    {
+      field = iprot.readFieldBegin();
+      if (field.type == org.apache.thrift.protocol.TType.STOP) { 
+        break;
+      }
+      switch (field.id) {
+        case 1: // AFTER
+          if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
+            this.after = new ScoreDoc();
+            this.after.read(iprot);
+          } else { 
+            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
+          }
+          break;
+        case 2: // QUERY
+          if (field.type == org.apache.thrift.protocol.TType.STRING) {
+            this.query = iprot.readBinary();
+          } else { 
+            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
+          }
+          break;
+        case 3: // FILTER
+          if (field.type == org.apache.thrift.protocol.TType.STRING) {
+            this.filter = iprot.readBinary();
+          } else { 
+            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
+          }
+          break;
+        case 4: // NUMBER_TO_FETCH
+          if (field.type == org.apache.thrift.protocol.TType.I32) {
+            this.numberToFetch = iprot.readI32();
+            setNumberToFetchIsSet(true);
+          } else { 
+            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
+          }
+          break;
+        case 5: // SORT
+          if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
+            this.sort = new Sort();
+            this.sort.read(iprot);
+          } else { 
+            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
+          }
+          break;
+        case 6: // DO_DOC_SCORES
+          if (field.type == org.apache.thrift.protocol.TType.BOOL) {
+            this.doDocScores = iprot.readBool();
+            setDoDocScoresIsSet(true);
+          } else { 
+            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
+          }
+          break;
+        case 7: // DO_MAX_SCORE
+          if (field.type == org.apache.thrift.protocol.TType.BOOL) {
+            this.doMaxScore = iprot.readBool();
+            setDoMaxScoreIsSet(true);
+          } else { 
+            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
+          }
+          break;
+        case 8: // SHARD_INDEXES
+          if (field.type == org.apache.thrift.protocol.TType.LIST) {
+            {
+              org.apache.thrift.protocol.TList _list17 = iprot.readListBegin();
+              this.shardIndexes = new ArrayList<Integer>(_list17.size);
+              for (int _i18 = 0; _i18 < _list17.size; ++_i18)
+              {
+                int _elem19; // required
+                _elem19 = iprot.readI32();
+                this.shardIndexes.add(_elem19);
+              }
+              iprot.readListEnd();
+            }
+          } else { 
+            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
+          }
+          break;
+        default:
+          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
+      }
+      iprot.readFieldEnd();
+    }
+    iprot.readStructEnd();
+
+    // check for required fields of primitive type, which can't be checked in the validate method
+    validate();
+  }
+
+  public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+    validate();
+
+    oprot.writeStructBegin(STRUCT_DESC);
+    if (this.after != null) {
+      oprot.writeFieldBegin(AFTER_FIELD_DESC);
+      this.after.write(oprot);
+      oprot.writeFieldEnd();
+    }
+    if (this.query != null) {
+      oprot.writeFieldBegin(QUERY_FIELD_DESC);
+      oprot.writeBinary(this.query);
+      oprot.writeFieldEnd();
+    }
+    if (this.filter != null) {
+      oprot.writeFieldBegin(FILTER_FIELD_DESC);
+      oprot.writeBinary(this.filter);
+      oprot.writeFieldEnd();
+    }
+    oprot.writeFieldBegin(NUMBER_TO_FETCH_FIELD_DESC);
+    oprot.writeI32(this.numberToFetch);
+    oprot.writeFieldEnd();
+    if (this.sort != null) {
+      oprot.writeFieldBegin(SORT_FIELD_DESC);
+      this.sort.write(oprot);
+      oprot.writeFieldEnd();
+    }
+    oprot.writeFieldBegin(DO_DOC_SCORES_FIELD_DESC);
+    oprot.writeBool(this.doDocScores);
+    oprot.writeFieldEnd();
+    oprot.writeFieldBegin(DO_MAX_SCORE_FIELD_DESC);
+    oprot.writeBool(this.doMaxScore);
+    oprot.writeFieldEnd();
+    if (this.shardIndexes != null) {
+      oprot.writeFieldBegin(SHARD_INDEXES_FIELD_DESC);
+      {
+        oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, this.shardIndexes.size()));
+        for (int _iter20 : this.shardIndexes)
+        {
+          oprot.writeI32(_iter20);
+        }
+        oprot.writeListEnd();
+      }
+      oprot.writeFieldEnd();
+    }
+    oprot.writeFieldStop();
+    oprot.writeStructEnd();
+  }
+
+  @Override
+  public String toString() {
+    StringBuilder sb = new StringBuilder("QueryArgs(");
+    boolean first = true;
+
+    sb.append("after:");
+    if (this.after == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.after);
+    }
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("query:");
+    if (this.query == null) {
+      sb.append("null");
+    } else {
+      org.apache.thrift.TBaseHelper.toString(this.query, sb);
+    }
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("filter:");
+    if (this.filter == null) {
+      sb.append("null");
+    } else {
+      org.apache.thrift.TBaseHelper.toString(this.filter, sb);
+    }
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("numberToFetch:");
+    sb.append(this.numberToFetch);
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("sort:");
+    if (this.sort == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.sort);
+    }
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("doDocScores:");
+    sb.append(this.doDocScores);
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("doMaxScore:");
+    sb.append(this.doMaxScore);
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("shardIndexes:");
+    if (this.shardIndexes == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.shardIndexes);
+    }
+    first = false;
+    sb.append(")");
+    return sb.toString();
+  }
+
+  public void validate() throws org.apache.thrift.TException {
+    // check for required fields
+  }
+
+  private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+    try {
+      write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+    } catch (org.apache.thrift.TException te) {
+      throw new java.io.IOException(te);
+    }
+  }
+
+  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+    try {
+      // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
+      __isset_bit_vector = new BitSet(1);
+      read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+    } catch (org.apache.thrift.TException te) {
+      throw new java.io.IOException(te);
+    }
+  }
+
+}
+

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/1e930bbc/src/blur-new-api-prototype/src/main/java/org/apache/blur/thrift/generated/Record.java
----------------------------------------------------------------------
diff --git a/src/blur-new-api-prototype/src/main/java/org/apache/blur/thrift/generated/Record.java b/src/blur-new-api-prototype/src/main/java/org/apache/blur/thrift/generated/Record.java
new file mode 100644
index 0000000..d3a2d62
--- /dev/null
+++ b/src/blur-new-api-prototype/src/main/java/org/apache/blur/thrift/generated/Record.java
@@ -0,0 +1,357 @@
+/**
+ * Autogenerated by Thrift Compiler (0.7.0)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ */
+package org.apache.blur.thrift.generated;
+
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.EnumMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.EnumSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class Record implements org.apache.thrift.TBase<Record, Record._Fields>, java.io.Serializable, Cloneable {
+  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Record");
+
+  private static final org.apache.thrift.protocol.TField ATTRIBUTES_FIELD_DESC = new org.apache.thrift.protocol.TField("attributes", org.apache.thrift.protocol.TType.LIST, (short)1);
+
+  public List<Attribute> attributes; // required
+
+  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+    ATTRIBUTES((short)1, "attributes");
+
+    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+    static {
+      for (_Fields field : EnumSet.allOf(_Fields.class)) {
+        byName.put(field.getFieldName(), field);
+      }
+    }
+
+    /**
+     * Find the _Fields constant that matches fieldId, or null if its not found.
+     */
+    public static _Fields findByThriftId(int fieldId) {
+      switch(fieldId) {
+        case 1: // ATTRIBUTES
+          return ATTRIBUTES;
+        default:
+          return null;
+      }
+    }
+
+    /**
+     * Find the _Fields constant that matches fieldId, throwing an exception
+     * if it is not found.
+     */
+    public static _Fields findByThriftIdOrThrow(int fieldId) {
+      _Fields fields = findByThriftId(fieldId);
+      if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+      return fields;
+    }
+
+    /**
+     * Find the _Fields constant that matches name, or null if its not found.
+     */
+    public static _Fields findByName(String name) {
+      return byName.get(name);
+    }
+
+    private final short _thriftId;
+    private final String _fieldName;
+
+    _Fields(short thriftId, String fieldName) {
+      _thriftId = thriftId;
+      _fieldName = fieldName;
+    }
+
+    public short getThriftFieldId() {
+      return _thriftId;
+    }
+
+    public String getFieldName() {
+      return _fieldName;
+    }
+  }
+
+  // isset id assignments
+
+  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+  static {
+    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+    tmpMap.put(_Fields.ATTRIBUTES, new org.apache.thrift.meta_data.FieldMetaData("attributes", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
+            new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Attribute.class))));
+    metaDataMap = Collections.unmodifiableMap(tmpMap);
+    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Record.class, metaDataMap);
+  }
+
+  public Record() {
+  }
+
+  public Record(
+    List<Attribute> attributes)
+  {
+    this();
+    this.attributes = attributes;
+  }
+
+  /**
+   * Performs a deep copy on <i>other</i>.
+   */
+  public Record(Record other) {
+    if (other.isSetAttributes()) {
+      List<Attribute> __this__attributes = new ArrayList<Attribute>();
+      for (Attribute other_element : other.attributes) {
+        __this__attributes.add(new Attribute(other_element));
+      }
+      this.attributes = __this__attributes;
+    }
+  }
+
+  public Record deepCopy() {
+    return new Record(this);
+  }
+
+  @Override
+  public void clear() {
+    this.attributes = null;
+  }
+
+  public int getAttributesSize() {
+    return (this.attributes == null) ? 0 : this.attributes.size();
+  }
+
+  public java.util.Iterator<Attribute> getAttributesIterator() {
+    return (this.attributes == null) ? null : this.attributes.iterator();
+  }
+
+  public void addToAttributes(Attribute elem) {
+    if (this.attributes == null) {
+      this.attributes = new ArrayList<Attribute>();
+    }
+    this.attributes.add(elem);
+  }
+
+  public List<Attribute> getAttributes() {
+    return this.attributes;
+  }
+
+  public Record setAttributes(List<Attribute> attributes) {
+    this.attributes = attributes;
+    return this;
+  }
+
+  public void unsetAttributes() {
+    this.attributes = null;
+  }
+
+  /** Returns true if field attributes is set (has been assigned a value) and false otherwise */
+  public boolean isSetAttributes() {
+    return this.attributes != null;
+  }
+
+  public void setAttributesIsSet(boolean value) {
+    if (!value) {
+      this.attributes = null;
+    }
+  }
+
+  public void setFieldValue(_Fields field, Object value) {
+    switch (field) {
+    case ATTRIBUTES:
+      if (value == null) {
+        unsetAttributes();
+      } else {
+        setAttributes((List<Attribute>)value);
+      }
+      break;
+
+    }
+  }
+
+  public Object getFieldValue(_Fields field) {
+    switch (field) {
+    case ATTRIBUTES:
+      return getAttributes();
+
+    }
+    throw new IllegalStateException();
+  }
+
+  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+  public boolean isSet(_Fields field) {
+    if (field == null) {
+      throw new IllegalArgumentException();
+    }
+
+    switch (field) {
+    case ATTRIBUTES:
+      return isSetAttributes();
+    }
+    throw new IllegalStateException();
+  }
+
+  @Override
+  public boolean equals(Object that) {
+    if (that == null)
+      return false;
+    if (that instanceof Record)
+      return this.equals((Record)that);
+    return false;
+  }
+
+  public boolean equals(Record that) {
+    if (that == null)
+      return false;
+
+    boolean this_present_attributes = true && this.isSetAttributes();
+    boolean that_present_attributes = true && that.isSetAttributes();
+    if (this_present_attributes || that_present_attributes) {
+      if (!(this_present_attributes && that_present_attributes))
+        return false;
+      if (!this.attributes.equals(that.attributes))
+        return false;
+    }
+
+    return true;
+  }
+
+  @Override
+  public int hashCode() {
+    return 0;
+  }
+
+  public int compareTo(Record other) {
+    if (!getClass().equals(other.getClass())) {
+      return getClass().getName().compareTo(other.getClass().getName());
+    }
+
+    int lastComparison = 0;
+    Record typedOther = (Record)other;
+
+    lastComparison = Boolean.valueOf(isSetAttributes()).compareTo(typedOther.isSetAttributes());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetAttributes()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.attributes, typedOther.attributes);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    return 0;
+  }
+
+  public _Fields fieldForId(int fieldId) {
+    return _Fields.findByThriftId(fieldId);
+  }
+
+  public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+    org.apache.thrift.protocol.TField field;
+    iprot.readStructBegin();
+    while (true)
+    {
+      field = iprot.readFieldBegin();
+      if (field.type == org.apache.thrift.protocol.TType.STOP) { 
+        break;
+      }
+      switch (field.id) {
+        case 1: // ATTRIBUTES
+          if (field.type == org.apache.thrift.protocol.TType.LIST) {
+            {
+              org.apache.thrift.protocol.TList _list0 = iprot.readListBegin();
+              this.attributes = new ArrayList<Attribute>(_list0.size);
+              for (int _i1 = 0; _i1 < _list0.size; ++_i1)
+              {
+                Attribute _elem2; // required
+                _elem2 = new Attribute();
+                _elem2.read(iprot);
+                this.attributes.add(_elem2);
+              }
+              iprot.readListEnd();
+            }
+          } else { 
+            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
+          }
+          break;
+        default:
+          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
+      }
+      iprot.readFieldEnd();
+    }
+    iprot.readStructEnd();
+
+    // check for required fields of primitive type, which can't be checked in the validate method
+    validate();
+  }
+
+  public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+    validate();
+
+    oprot.writeStructBegin(STRUCT_DESC);
+    if (this.attributes != null) {
+      oprot.writeFieldBegin(ATTRIBUTES_FIELD_DESC);
+      {
+        oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.attributes.size()));
+        for (Attribute _iter3 : this.attributes)
+        {
+          _iter3.write(oprot);
+        }
+        oprot.writeListEnd();
+      }
+      oprot.writeFieldEnd();
+    }
+    oprot.writeFieldStop();
+    oprot.writeStructEnd();
+  }
+
+  @Override
+  public String toString() {
+    StringBuilder sb = new StringBuilder("Record(");
+    boolean first = true;
+
+    sb.append("attributes:");
+    if (this.attributes == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.attributes);
+    }
+    first = false;
+    sb.append(")");
+    return sb.toString();
+  }
+
+  public void validate() throws org.apache.thrift.TException {
+    // check for required fields
+  }
+
+  private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+    try {
+      write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+    } catch (org.apache.thrift.TException te) {
+      throw new java.io.IOException(te);
+    }
+  }
+
+  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+    try {
+      read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+    } catch (org.apache.thrift.TException te) {
+      throw new java.io.IOException(te);
+    }
+  }
+
+}
+

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/1e930bbc/src/blur-new-api-prototype/src/main/java/org/apache/blur/thrift/generated/ScoreDoc.java
----------------------------------------------------------------------
diff --git a/src/blur-new-api-prototype/src/main/java/org/apache/blur/thrift/generated/ScoreDoc.java b/src/blur-new-api-prototype/src/main/java/org/apache/blur/thrift/generated/ScoreDoc.java
new file mode 100644
index 0000000..14f16bb
--- /dev/null
+++ b/src/blur-new-api-prototype/src/main/java/org/apache/blur/thrift/generated/ScoreDoc.java
@@ -0,0 +1,537 @@
+/**
+ * Autogenerated by Thrift Compiler (0.7.0)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ */
+package org.apache.blur.thrift.generated;
+
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.EnumMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.EnumSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class ScoreDoc implements org.apache.thrift.TBase<ScoreDoc, ScoreDoc._Fields>, java.io.Serializable, Cloneable {
+  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ScoreDoc");
+
+  private static final org.apache.thrift.protocol.TField SCORE_FIELD_DESC = new org.apache.thrift.protocol.TField("score", org.apache.thrift.protocol.TType.DOUBLE, (short)1);
+  private static final org.apache.thrift.protocol.TField DOC_LOCATION_FIELD_DESC = new org.apache.thrift.protocol.TField("docLocation", org.apache.thrift.protocol.TType.STRUCT, (short)2);
+  private static final org.apache.thrift.protocol.TField FIELDS_FIELD_DESC = new org.apache.thrift.protocol.TField("fields", org.apache.thrift.protocol.TType.LIST, (short)4);
+
+  public double score; // required
+  public DocLocation docLocation; // required
+  public List<ByteBuffer> fields; // required
+
+  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+    SCORE((short)1, "score"),
+    DOC_LOCATION((short)2, "docLocation"),
+    FIELDS((short)4, "fields");
+
+    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+    static {
+      for (_Fields field : EnumSet.allOf(_Fields.class)) {
+        byName.put(field.getFieldName(), field);
+      }
+    }
+
+    /**
+     * Find the _Fields constant that matches fieldId, or null if its not found.
+     */
+    public static _Fields findByThriftId(int fieldId) {
+      switch(fieldId) {
+        case 1: // SCORE
+          return SCORE;
+        case 2: // DOC_LOCATION
+          return DOC_LOCATION;
+        case 4: // FIELDS
+          return FIELDS;
+        default:
+          return null;
+      }
+    }
+
+    /**
+     * Find the _Fields constant that matches fieldId, throwing an exception
+     * if it is not found.
+     */
+    public static _Fields findByThriftIdOrThrow(int fieldId) {
+      _Fields fields = findByThriftId(fieldId);
+      if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+      return fields;
+    }
+
+    /**
+     * Find the _Fields constant that matches name, or null if its not found.
+     */
+    public static _Fields findByName(String name) {
+      return byName.get(name);
+    }
+
+    private final short _thriftId;
+    private final String _fieldName;
+
+    _Fields(short thriftId, String fieldName) {
+      _thriftId = thriftId;
+      _fieldName = fieldName;
+    }
+
+    public short getThriftFieldId() {
+      return _thriftId;
+    }
+
+    public String getFieldName() {
+      return _fieldName;
+    }
+  }
+
+  // isset id assignments
+  private static final int __SCORE_ISSET_ID = 0;
+  private BitSet __isset_bit_vector = new BitSet(1);
+
+  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+  static {
+    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+    tmpMap.put(_Fields.SCORE, new org.apache.thrift.meta_data.FieldMetaData("score", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
+    tmpMap.put(_Fields.DOC_LOCATION, new org.apache.thrift.meta_data.FieldMetaData("docLocation", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, DocLocation.class)));
+    tmpMap.put(_Fields.FIELDS, new org.apache.thrift.meta_data.FieldMetaData("fields", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
+            new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING            , true))));
+    metaDataMap = Collections.unmodifiableMap(tmpMap);
+    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ScoreDoc.class, metaDataMap);
+  }
+
+  public ScoreDoc() {
+  }
+
+  public ScoreDoc(
+    double score,
+    DocLocation docLocation,
+    List<ByteBuffer> fields)
+  {
+    this();
+    this.score = score;
+    setScoreIsSet(true);
+    this.docLocation = docLocation;
+    this.fields = fields;
+  }
+
+  /**
+   * Performs a deep copy on <i>other</i>.
+   */
+  public ScoreDoc(ScoreDoc other) {
+    __isset_bit_vector.clear();
+    __isset_bit_vector.or(other.__isset_bit_vector);
+    this.score = other.score;
+    if (other.isSetDocLocation()) {
+      this.docLocation = new DocLocation(other.docLocation);
+    }
+    if (other.isSetFields()) {
+      List<ByteBuffer> __this__fields = new ArrayList<ByteBuffer>();
+      for (ByteBuffer other_element : other.fields) {
+        ByteBuffer temp_binary_element = org.apache.thrift.TBaseHelper.copyBinary(other_element);
+;
+        __this__fields.add(temp_binary_element);
+      }
+      this.fields = __this__fields;
+    }
+  }
+
+  public ScoreDoc deepCopy() {
+    return new ScoreDoc(this);
+  }
+
+  @Override
+  public void clear() {
+    setScoreIsSet(false);
+    this.score = 0.0;
+    this.docLocation = null;
+    this.fields = null;
+  }
+
+  public double getScore() {
+    return this.score;
+  }
+
+  public ScoreDoc setScore(double score) {
+    this.score = score;
+    setScoreIsSet(true);
+    return this;
+  }
+
+  public void unsetScore() {
+    __isset_bit_vector.clear(__SCORE_ISSET_ID);
+  }
+
+  /** Returns true if field score is set (has been assigned a value) and false otherwise */
+  public boolean isSetScore() {
+    return __isset_bit_vector.get(__SCORE_ISSET_ID);
+  }
+
+  public void setScoreIsSet(boolean value) {
+    __isset_bit_vector.set(__SCORE_ISSET_ID, value);
+  }
+
+  public DocLocation getDocLocation() {
+    return this.docLocation;
+  }
+
+  public ScoreDoc setDocLocation(DocLocation docLocation) {
+    this.docLocation = docLocation;
+    return this;
+  }
+
+  public void unsetDocLocation() {
+    this.docLocation = null;
+  }
+
+  /** Returns true if field docLocation is set (has been assigned a value) and false otherwise */
+  public boolean isSetDocLocation() {
+    return this.docLocation != null;
+  }
+
+  public void setDocLocationIsSet(boolean value) {
+    if (!value) {
+      this.docLocation = null;
+    }
+  }
+
+  public int getFieldsSize() {
+    return (this.fields == null) ? 0 : this.fields.size();
+  }
+
+  public java.util.Iterator<ByteBuffer> getFieldsIterator() {
+    return (this.fields == null) ? null : this.fields.iterator();
+  }
+
+  public void addToFields(ByteBuffer elem) {
+    if (this.fields == null) {
+      this.fields = new ArrayList<ByteBuffer>();
+    }
+    this.fields.add(elem);
+  }
+
+  public List<ByteBuffer> getFields() {
+    return this.fields;
+  }
+
+  public ScoreDoc setFields(List<ByteBuffer> fields) {
+    this.fields = fields;
+    return this;
+  }
+
+  public void unsetFields() {
+    this.fields = null;
+  }
+
+  /** Returns true if field fields is set (has been assigned a value) and false otherwise */
+  public boolean isSetFields() {
+    return this.fields != null;
+  }
+
+  public void setFieldsIsSet(boolean value) {
+    if (!value) {
+      this.fields = null;
+    }
+  }
+
+  public void setFieldValue(_Fields field, Object value) {
+    switch (field) {
+    case SCORE:
+      if (value == null) {
+        unsetScore();
+      } else {
+        setScore((Double)value);
+      }
+      break;
+
+    case DOC_LOCATION:
+      if (value == null) {
+        unsetDocLocation();
+      } else {
+        setDocLocation((DocLocation)value);
+      }
+      break;
+
+    case FIELDS:
+      if (value == null) {
+        unsetFields();
+      } else {
+        setFields((List<ByteBuffer>)value);
+      }
+      break;
+
+    }
+  }
+
+  public Object getFieldValue(_Fields field) {
+    switch (field) {
+    case SCORE:
+      return Double.valueOf(getScore());
+
+    case DOC_LOCATION:
+      return getDocLocation();
+
+    case FIELDS:
+      return getFields();
+
+    }
+    throw new IllegalStateException();
+  }
+
+  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+  public boolean isSet(_Fields field) {
+    if (field == null) {
+      throw new IllegalArgumentException();
+    }
+
+    switch (field) {
+    case SCORE:
+      return isSetScore();
+    case DOC_LOCATION:
+      return isSetDocLocation();
+    case FIELDS:
+      return isSetFields();
+    }
+    throw new IllegalStateException();
+  }
+
+  @Override
+  public boolean equals(Object that) {
+    if (that == null)
+      return false;
+    if (that instanceof ScoreDoc)
+      return this.equals((ScoreDoc)that);
+    return false;
+  }
+
+  public boolean equals(ScoreDoc that) {
+    if (that == null)
+      return false;
+
+    boolean this_present_score = true;
+    boolean that_present_score = true;
+    if (this_present_score || that_present_score) {
+      if (!(this_present_score && that_present_score))
+        return false;
+      if (this.score != that.score)
+        return false;
+    }
+
+    boolean this_present_docLocation = true && this.isSetDocLocation();
+    boolean that_present_docLocation = true && that.isSetDocLocation();
+    if (this_present_docLocation || that_present_docLocation) {
+      if (!(this_present_docLocation && that_present_docLocation))
+        return false;
+      if (!this.docLocation.equals(that.docLocation))
+        return false;
+    }
+
+    boolean this_present_fields = true && this.isSetFields();
+    boolean that_present_fields = true && that.isSetFields();
+    if (this_present_fields || that_present_fields) {
+      if (!(this_present_fields && that_present_fields))
+        return false;
+      if (!this.fields.equals(that.fields))
+        return false;
+    }
+
+    return true;
+  }
+
+  @Override
+  public int hashCode() {
+    return 0;
+  }
+
+  public int compareTo(ScoreDoc other) {
+    if (!getClass().equals(other.getClass())) {
+      return getClass().getName().compareTo(other.getClass().getName());
+    }
+
+    int lastComparison = 0;
+    ScoreDoc typedOther = (ScoreDoc)other;
+
+    lastComparison = Boolean.valueOf(isSetScore()).compareTo(typedOther.isSetScore());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetScore()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.score, typedOther.score);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetDocLocation()).compareTo(typedOther.isSetDocLocation());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetDocLocation()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.docLocation, typedOther.docLocation);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetFields()).compareTo(typedOther.isSetFields());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetFields()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fields, typedOther.fields);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    return 0;
+  }
+
+  public _Fields fieldForId(int fieldId) {
+    return _Fields.findByThriftId(fieldId);
+  }
+
+  public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+    org.apache.thrift.protocol.TField field;
+    iprot.readStructBegin();
+    while (true)
+    {
+      field = iprot.readFieldBegin();
+      if (field.type == org.apache.thrift.protocol.TType.STOP) { 
+        break;
+      }
+      switch (field.id) {
+        case 1: // SCORE
+          if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
+            this.score = iprot.readDouble();
+            setScoreIsSet(true);
+          } else { 
+            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
+          }
+          break;
+        case 2: // DOC_LOCATION
+          if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
+            this.docLocation = new DocLocation();
+            this.docLocation.read(iprot);
+          } else { 
+            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
+          }
+          break;
+        case 4: // FIELDS
+          if (field.type == org.apache.thrift.protocol.TType.LIST) {
+            {
+              org.apache.thrift.protocol.TList _list13 = iprot.readListBegin();
+              this.fields = new ArrayList<ByteBuffer>(_list13.size);
+              for (int _i14 = 0; _i14 < _list13.size; ++_i14)
+              {
+                ByteBuffer _elem15; // required
+                _elem15 = iprot.readBinary();
+                this.fields.add(_elem15);
+              }
+              iprot.readListEnd();
+            }
+          } else { 
+            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
+          }
+          break;
+        default:
+          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
+      }
+      iprot.readFieldEnd();
+    }
+    iprot.readStructEnd();
+
+    // check for required fields of primitive type, which can't be checked in the validate method
+    validate();
+  }
+
+  public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+    validate();
+
+    oprot.writeStructBegin(STRUCT_DESC);
+    oprot.writeFieldBegin(SCORE_FIELD_DESC);
+    oprot.writeDouble(this.score);
+    oprot.writeFieldEnd();
+    if (this.docLocation != null) {
+      oprot.writeFieldBegin(DOC_LOCATION_FIELD_DESC);
+      this.docLocation.write(oprot);
+      oprot.writeFieldEnd();
+    }
+    if (this.fields != null) {
+      oprot.writeFieldBegin(FIELDS_FIELD_DESC);
+      {
+        oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.fields.size()));
+        for (ByteBuffer _iter16 : this.fields)
+        {
+          oprot.writeBinary(_iter16);
+        }
+        oprot.writeListEnd();
+      }
+      oprot.writeFieldEnd();
+    }
+    oprot.writeFieldStop();
+    oprot.writeStructEnd();
+  }
+
+  @Override
+  public String toString() {
+    StringBuilder sb = new StringBuilder("ScoreDoc(");
+    boolean first = true;
+
+    sb.append("score:");
+    sb.append(this.score);
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("docLocation:");
+    if (this.docLocation == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.docLocation);
+    }
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("fields:");
+    if (this.fields == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.fields);
+    }
+    first = false;
+    sb.append(")");
+    return sb.toString();
+  }
+
+  public void validate() throws org.apache.thrift.TException {
+    // check for required fields
+  }
+
+  private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+    try {
+      write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+    } catch (org.apache.thrift.TException te) {
+      throw new java.io.IOException(te);
+    }
+  }
+
+  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+    try {
+      // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
+      __isset_bit_vector = new BitSet(1);
+      read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+    } catch (org.apache.thrift.TException te) {
+      throw new java.io.IOException(te);
+    }
+  }
+
+}
+

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/1e930bbc/src/blur-new-api-prototype/src/main/java/org/apache/blur/thrift/generated/Sort.java
----------------------------------------------------------------------
diff --git a/src/blur-new-api-prototype/src/main/java/org/apache/blur/thrift/generated/Sort.java b/src/blur-new-api-prototype/src/main/java/org/apache/blur/thrift/generated/Sort.java
new file mode 100644
index 0000000..89559e0
--- /dev/null
+++ b/src/blur-new-api-prototype/src/main/java/org/apache/blur/thrift/generated/Sort.java
@@ -0,0 +1,357 @@
+/**
+ * Autogenerated by Thrift Compiler (0.7.0)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ */
+package org.apache.blur.thrift.generated;
+
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.EnumMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.EnumSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class Sort implements org.apache.thrift.TBase<Sort, Sort._Fields>, java.io.Serializable, Cloneable {
+  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Sort");
+
+  private static final org.apache.thrift.protocol.TField FIELDS_FIELD_DESC = new org.apache.thrift.protocol.TField("fields", org.apache.thrift.protocol.TType.LIST, (short)1);
+
+  public List<SortField> fields; // required
+
+  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+    FIELDS((short)1, "fields");
+
+    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+    static {
+      for (_Fields field : EnumSet.allOf(_Fields.class)) {
+        byName.put(field.getFieldName(), field);
+      }
+    }
+
+    /**
+     * Find the _Fields constant that matches fieldId, or null if its not found.
+     */
+    public static _Fields findByThriftId(int fieldId) {
+      switch(fieldId) {
+        case 1: // FIELDS
+          return FIELDS;
+        default:
+          return null;
+      }
+    }
+
+    /**
+     * Find the _Fields constant that matches fieldId, throwing an exception
+     * if it is not found.
+     */
+    public static _Fields findByThriftIdOrThrow(int fieldId) {
+      _Fields fields = findByThriftId(fieldId);
+      if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+      return fields;
+    }
+
+    /**
+     * Find the _Fields constant that matches name, or null if its not found.
+     */
+    public static _Fields findByName(String name) {
+      return byName.get(name);
+    }
+
+    private final short _thriftId;
+    private final String _fieldName;
+
+    _Fields(short thriftId, String fieldName) {
+      _thriftId = thriftId;
+      _fieldName = fieldName;
+    }
+
+    public short getThriftFieldId() {
+      return _thriftId;
+    }
+
+    public String getFieldName() {
+      return _fieldName;
+    }
+  }
+
+  // isset id assignments
+
+  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+  static {
+    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+    tmpMap.put(_Fields.FIELDS, new org.apache.thrift.meta_data.FieldMetaData("fields", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
+            new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, SortField.class))));
+    metaDataMap = Collections.unmodifiableMap(tmpMap);
+    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Sort.class, metaDataMap);
+  }
+
+  public Sort() {
+  }
+
+  public Sort(
+    List<SortField> fields)
+  {
+    this();
+    this.fields = fields;
+  }
+
+  /**
+   * Performs a deep copy on <i>other</i>.
+   */
+  public Sort(Sort other) {
+    if (other.isSetFields()) {
+      List<SortField> __this__fields = new ArrayList<SortField>();
+      for (SortField other_element : other.fields) {
+        __this__fields.add(new SortField(other_element));
+      }
+      this.fields = __this__fields;
+    }
+  }
+
+  public Sort deepCopy() {
+    return new Sort(this);
+  }
+
+  @Override
+  public void clear() {
+    this.fields = null;
+  }
+
+  public int getFieldsSize() {
+    return (this.fields == null) ? 0 : this.fields.size();
+  }
+
+  public java.util.Iterator<SortField> getFieldsIterator() {
+    return (this.fields == null) ? null : this.fields.iterator();
+  }
+
+  public void addToFields(SortField elem) {
+    if (this.fields == null) {
+      this.fields = new ArrayList<SortField>();
+    }
+    this.fields.add(elem);
+  }
+
+  public List<SortField> getFields() {
+    return this.fields;
+  }
+
+  public Sort setFields(List<SortField> fields) {
+    this.fields = fields;
+    return this;
+  }
+
+  public void unsetFields() {
+    this.fields = null;
+  }
+
+  /** Returns true if field fields is set (has been assigned a value) and false otherwise */
+  public boolean isSetFields() {
+    return this.fields != null;
+  }
+
+  public void setFieldsIsSet(boolean value) {
+    if (!value) {
+      this.fields = null;
+    }
+  }
+
+  public void setFieldValue(_Fields field, Object value) {
+    switch (field) {
+    case FIELDS:
+      if (value == null) {
+        unsetFields();
+      } else {
+        setFields((List<SortField>)value);
+      }
+      break;
+
+    }
+  }
+
+  public Object getFieldValue(_Fields field) {
+    switch (field) {
+    case FIELDS:
+      return getFields();
+
+    }
+    throw new IllegalStateException();
+  }
+
+  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+  public boolean isSet(_Fields field) {
+    if (field == null) {
+      throw new IllegalArgumentException();
+    }
+
+    switch (field) {
+    case FIELDS:
+      return isSetFields();
+    }
+    throw new IllegalStateException();
+  }
+
+  @Override
+  public boolean equals(Object that) {
+    if (that == null)
+      return false;
+    if (that instanceof Sort)
+      return this.equals((Sort)that);
+    return false;
+  }
+
+  public boolean equals(Sort that) {
+    if (that == null)
+      return false;
+
+    boolean this_present_fields = true && this.isSetFields();
+    boolean that_present_fields = true && that.isSetFields();
+    if (this_present_fields || that_present_fields) {
+      if (!(this_present_fields && that_present_fields))
+        return false;
+      if (!this.fields.equals(that.fields))
+        return false;
+    }
+
+    return true;
+  }
+
+  @Override
+  public int hashCode() {
+    return 0;
+  }
+
+  public int compareTo(Sort other) {
+    if (!getClass().equals(other.getClass())) {
+      return getClass().getName().compareTo(other.getClass().getName());
+    }
+
+    int lastComparison = 0;
+    Sort typedOther = (Sort)other;
+
+    lastComparison = Boolean.valueOf(isSetFields()).compareTo(typedOther.isSetFields());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetFields()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fields, typedOther.fields);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    return 0;
+  }
+
+  public _Fields fieldForId(int fieldId) {
+    return _Fields.findByThriftId(fieldId);
+  }
+
+  public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+    org.apache.thrift.protocol.TField field;
+    iprot.readStructBegin();
+    while (true)
+    {
+      field = iprot.readFieldBegin();
+      if (field.type == org.apache.thrift.protocol.TType.STOP) { 
+        break;
+      }
+      switch (field.id) {
+        case 1: // FIELDS
+          if (field.type == org.apache.thrift.protocol.TType.LIST) {
+            {
+              org.apache.thrift.protocol.TList _list9 = iprot.readListBegin();
+              this.fields = new ArrayList<SortField>(_list9.size);
+              for (int _i10 = 0; _i10 < _list9.size; ++_i10)
+              {
+                SortField _elem11; // required
+                _elem11 = new SortField();
+                _elem11.read(iprot);
+                this.fields.add(_elem11);
+              }
+              iprot.readListEnd();
+            }
+          } else { 
+            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
+          }
+          break;
+        default:
+          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
+      }
+      iprot.readFieldEnd();
+    }
+    iprot.readStructEnd();
+
+    // check for required fields of primitive type, which can't be checked in the validate method
+    validate();
+  }
+
+  public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+    validate();
+
+    oprot.writeStructBegin(STRUCT_DESC);
+    if (this.fields != null) {
+      oprot.writeFieldBegin(FIELDS_FIELD_DESC);
+      {
+        oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.fields.size()));
+        for (SortField _iter12 : this.fields)
+        {
+          _iter12.write(oprot);
+        }
+        oprot.writeListEnd();
+      }
+      oprot.writeFieldEnd();
+    }
+    oprot.writeFieldStop();
+    oprot.writeStructEnd();
+  }
+
+  @Override
+  public String toString() {
+    StringBuilder sb = new StringBuilder("Sort(");
+    boolean first = true;
+
+    sb.append("fields:");
+    if (this.fields == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.fields);
+    }
+    first = false;
+    sb.append(")");
+    return sb.toString();
+  }
+
+  public void validate() throws org.apache.thrift.TException {
+    // check for required fields
+  }
+
+  private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+    try {
+      write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+    } catch (org.apache.thrift.TException te) {
+      throw new java.io.IOException(te);
+    }
+  }
+
+  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+    try {
+      read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+    } catch (org.apache.thrift.TException te) {
+      throw new java.io.IOException(te);
+    }
+  }
+
+}
+

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/1e930bbc/src/blur-new-api-prototype/src/main/java/org/apache/blur/thrift/generated/SortField.java
----------------------------------------------------------------------
diff --git a/src/blur-new-api-prototype/src/main/java/org/apache/blur/thrift/generated/SortField.java b/src/blur-new-api-prototype/src/main/java/org/apache/blur/thrift/generated/SortField.java
new file mode 100644
index 0000000..386a97d
--- /dev/null
+++ b/src/blur-new-api-prototype/src/main/java/org/apache/blur/thrift/generated/SortField.java
@@ -0,0 +1,513 @@
+/**
+ * Autogenerated by Thrift Compiler (0.7.0)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ */
+package org.apache.blur.thrift.generated;
+
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.EnumMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.EnumSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class SortField implements org.apache.thrift.TBase<SortField, SortField._Fields>, java.io.Serializable, Cloneable {
+  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("SortField");
+
+  private static final org.apache.thrift.protocol.TField FIELD_FIELD_DESC = new org.apache.thrift.protocol.TField("field", org.apache.thrift.protocol.TType.STRING, (short)1);
+  private static final org.apache.thrift.protocol.TField TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("type", org.apache.thrift.protocol.TType.I32, (short)2);
+  private static final org.apache.thrift.protocol.TField REVERSE_FIELD_DESC = new org.apache.thrift.protocol.TField("reverse", org.apache.thrift.protocol.TType.BOOL, (short)3);
+
+  public String field; // required
+  /**
+   * 
+   * @see SortType
+   */
+  public SortType type; // required
+  public boolean reverse; // required
+
+  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+    FIELD((short)1, "field"),
+    /**
+     * 
+     * @see SortType
+     */
+    TYPE((short)2, "type"),
+    REVERSE((short)3, "reverse");
+
+    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+    static {
+      for (_Fields field : EnumSet.allOf(_Fields.class)) {
+        byName.put(field.getFieldName(), field);
+      }
+    }
+
+    /**
+     * Find the _Fields constant that matches fieldId, or null if its not found.
+     */
+    public static _Fields findByThriftId(int fieldId) {
+      switch(fieldId) {
+        case 1: // FIELD
+          return FIELD;
+        case 2: // TYPE
+          return TYPE;
+        case 3: // REVERSE
+          return REVERSE;
+        default:
+          return null;
+      }
+    }
+
+    /**
+     * Find the _Fields constant that matches fieldId, throwing an exception
+     * if it is not found.
+     */
+    public static _Fields findByThriftIdOrThrow(int fieldId) {
+      _Fields fields = findByThriftId(fieldId);
+      if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+      return fields;
+    }
+
+    /**
+     * Find the _Fields constant that matches name, or null if its not found.
+     */
+    public static _Fields findByName(String name) {
+      return byName.get(name);
+    }
+
+    private final short _thriftId;
+    private final String _fieldName;
+
+    _Fields(short thriftId, String fieldName) {
+      _thriftId = thriftId;
+      _fieldName = fieldName;
+    }
+
+    public short getThriftFieldId() {
+      return _thriftId;
+    }
+
+    public String getFieldName() {
+      return _fieldName;
+    }
+  }
+
+  // isset id assignments
+  private static final int __REVERSE_ISSET_ID = 0;
+  private BitSet __isset_bit_vector = new BitSet(1);
+
+  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+  static {
+    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+    tmpMap.put(_Fields.FIELD, new org.apache.thrift.meta_data.FieldMetaData("field", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+    tmpMap.put(_Fields.TYPE, new org.apache.thrift.meta_data.FieldMetaData("type", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, SortType.class)));
+    tmpMap.put(_Fields.REVERSE, new org.apache.thrift.meta_data.FieldMetaData("reverse", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
+    metaDataMap = Collections.unmodifiableMap(tmpMap);
+    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(SortField.class, metaDataMap);
+  }
+
+  public SortField() {
+  }
+
+  public SortField(
+    String field,
+    SortType type,
+    boolean reverse)
+  {
+    this();
+    this.field = field;
+    this.type = type;
+    this.reverse = reverse;
+    setReverseIsSet(true);
+  }
+
+  /**
+   * Performs a deep copy on <i>other</i>.
+   */
+  public SortField(SortField other) {
+    __isset_bit_vector.clear();
+    __isset_bit_vector.or(other.__isset_bit_vector);
+    if (other.isSetField()) {
+      this.field = other.field;
+    }
+    if (other.isSetType()) {
+      this.type = other.type;
+    }
+    this.reverse = other.reverse;
+  }
+
+  public SortField deepCopy() {
+    return new SortField(this);
+  }
+
+  @Override
+  public void clear() {
+    this.field = null;
+    this.type = null;
+    setReverseIsSet(false);
+    this.reverse = false;
+  }
+
+  public String getField() {
+    return this.field;
+  }
+
+  public SortField setField(String field) {
+    this.field = field;
+    return this;
+  }
+
+  public void unsetField() {
+    this.field = null;
+  }
+
+  /** Returns true if field field is set (has been assigned a value) and false otherwise */
+  public boolean isSetField() {
+    return this.field != null;
+  }
+
+  public void setFieldIsSet(boolean value) {
+    if (!value) {
+      this.field = null;
+    }
+  }
+
+  /**
+   * 
+   * @see SortType
+   */
+  public SortType getType() {
+    return this.type;
+  }
+
+  /**
+   * 
+   * @see SortType
+   */
+  public SortField setType(SortType type) {
+    this.type = type;
+    return this;
+  }
+
+  public void unsetType() {
+    this.type = null;
+  }
+
+  /** Returns true if field type is set (has been assigned a value) and false otherwise */
+  public boolean isSetType() {
+    return this.type != null;
+  }
+
+  public void setTypeIsSet(boolean value) {
+    if (!value) {
+      this.type = null;
+    }
+  }
+
+  public boolean isReverse() {
+    return this.reverse;
+  }
+
+  public SortField setReverse(boolean reverse) {
+    this.reverse = reverse;
+    setReverseIsSet(true);
+    return this;
+  }
+
+  public void unsetReverse() {
+    __isset_bit_vector.clear(__REVERSE_ISSET_ID);
+  }
+
+  /** Returns true if field reverse is set (has been assigned a value) and false otherwise */
+  public boolean isSetReverse() {
+    return __isset_bit_vector.get(__REVERSE_ISSET_ID);
+  }
+
+  public void setReverseIsSet(boolean value) {
+    __isset_bit_vector.set(__REVERSE_ISSET_ID, value);
+  }
+
+  public void setFieldValue(_Fields field, Object value) {
+    switch (field) {
+    case FIELD:
+      if (value == null) {
+        unsetField();
+      } else {
+        setField((String)value);
+      }
+      break;
+
+    case TYPE:
+      if (value == null) {
+        unsetType();
+      } else {
+        setType((SortType)value);
+      }
+      break;
+
+    case REVERSE:
+      if (value == null) {
+        unsetReverse();
+      } else {
+        setReverse((Boolean)value);
+      }
+      break;
+
+    }
+  }
+
+  public Object getFieldValue(_Fields field) {
+    switch (field) {
+    case FIELD:
+      return getField();
+
+    case TYPE:
+      return getType();
+
+    case REVERSE:
+      return Boolean.valueOf(isReverse());
+
+    }
+    throw new IllegalStateException();
+  }
+
+  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+  public boolean isSet(_Fields field) {
+    if (field == null) {
+      throw new IllegalArgumentException();
+    }
+
+    switch (field) {
+    case FIELD:
+      return isSetField();
+    case TYPE:
+      return isSetType();
+    case REVERSE:
+      return isSetReverse();
+    }
+    throw new IllegalStateException();
+  }
+
+  @Override
+  public boolean equals(Object that) {
+    if (that == null)
+      return false;
+    if (that instanceof SortField)
+      return this.equals((SortField)that);
+    return false;
+  }
+
+  public boolean equals(SortField that) {
+    if (that == null)
+      return false;
+
+    boolean this_present_field = true && this.isSetField();
+    boolean that_present_field = true && that.isSetField();
+    if (this_present_field || that_present_field) {
+      if (!(this_present_field && that_present_field))
+        return false;
+      if (!this.field.equals(that.field))
+        return false;
+    }
+
+    boolean this_present_type = true && this.isSetType();
+    boolean that_present_type = true && that.isSetType();
+    if (this_present_type || that_present_type) {
+      if (!(this_present_type && that_present_type))
+        return false;
+      if (!this.type.equals(that.type))
+        return false;
+    }
+
+    boolean this_present_reverse = true;
+    boolean that_present_reverse = true;
+    if (this_present_reverse || that_present_reverse) {
+      if (!(this_present_reverse && that_present_reverse))
+        return false;
+      if (this.reverse != that.reverse)
+        return false;
+    }
+
+    return true;
+  }
+
+  @Override
+  public int hashCode() {
+    return 0;
+  }
+
+  public int compareTo(SortField other) {
+    if (!getClass().equals(other.getClass())) {
+      return getClass().getName().compareTo(other.getClass().getName());
+    }
+
+    int lastComparison = 0;
+    SortField typedOther = (SortField)other;
+
+    lastComparison = Boolean.valueOf(isSetField()).compareTo(typedOther.isSetField());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetField()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.field, typedOther.field);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetType()).compareTo(typedOther.isSetType());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetType()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.type, typedOther.type);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetReverse()).compareTo(typedOther.isSetReverse());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetReverse()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.reverse, typedOther.reverse);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    return 0;
+  }
+
+  public _Fields fieldForId(int fieldId) {
+    return _Fields.findByThriftId(fieldId);
+  }
+
+  public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+    org.apache.thrift.protocol.TField field;
+    iprot.readStructBegin();
+    while (true)
+    {
+      field = iprot.readFieldBegin();
+      if (field.type == org.apache.thrift.protocol.TType.STOP) { 
+        break;
+      }
+      switch (field.id) {
+        case 1: // FIELD
+          if (field.type == org.apache.thrift.protocol.TType.STRING) {
+            this.field = iprot.readString();
+          } else { 
+            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
+          }
+          break;
+        case 2: // TYPE
+          if (field.type == org.apache.thrift.protocol.TType.I32) {
+            this.type = SortType.findByValue(iprot.readI32());
+          } else { 
+            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
+          }
+          break;
+        case 3: // REVERSE
+          if (field.type == org.apache.thrift.protocol.TType.BOOL) {
+            this.reverse = iprot.readBool();
+            setReverseIsSet(true);
+          } else { 
+            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
+          }
+          break;
+        default:
+          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
+      }
+      iprot.readFieldEnd();
+    }
+    iprot.readStructEnd();
+
+    // check for required fields of primitive type, which can't be checked in the validate method
+    validate();
+  }
+
+  public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+    validate();
+
+    oprot.writeStructBegin(STRUCT_DESC);
+    if (this.field != null) {
+      oprot.writeFieldBegin(FIELD_FIELD_DESC);
+      oprot.writeString(this.field);
+      oprot.writeFieldEnd();
+    }
+    if (this.type != null) {
+      oprot.writeFieldBegin(TYPE_FIELD_DESC);
+      oprot.writeI32(this.type.getValue());
+      oprot.writeFieldEnd();
+    }
+    oprot.writeFieldBegin(REVERSE_FIELD_DESC);
+    oprot.writeBool(this.reverse);
+    oprot.writeFieldEnd();
+    oprot.writeFieldStop();
+    oprot.writeStructEnd();
+  }
+
+  @Override
+  public String toString() {
+    StringBuilder sb = new StringBuilder("SortField(");
+    boolean first = true;
+
+    sb.append("field:");
+    if (this.field == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.field);
+    }
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("type:");
+    if (this.type == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.type);
+    }
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("reverse:");
+    sb.append(this.reverse);
+    first = false;
+    sb.append(")");
+    return sb.toString();
+  }
+
+  public void validate() throws org.apache.thrift.TException {
+    // check for required fields
+  }
+
+  private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+    try {
+      write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+    } catch (org.apache.thrift.TException te) {
+      throw new java.io.IOException(te);
+    }
+  }
+
+  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+    try {
+      // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
+      __isset_bit_vector = new BitSet(1);
+      read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+    } catch (org.apache.thrift.TException te) {
+      throw new java.io.IOException(te);
+    }
+  }
+
+}
+


Mime
View raw message