incubator-blur-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amccu...@apache.org
Subject [22/39] Massive changes to the thrift RPC defs, see mail list for details subject (Rows, Records, Session oh my).
Date Thu, 28 Feb 2013 03:07:38 GMT
http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/11f5141c/src/distribution/src/main/scripts/interface/gen-java/org/apache/blur/thrift/generated/Query.java
----------------------------------------------------------------------
diff --git a/src/distribution/src/main/scripts/interface/gen-java/org/apache/blur/thrift/generated/Query.java b/src/distribution/src/main/scripts/interface/gen-java/org/apache/blur/thrift/generated/Query.java
new file mode 100644
index 0000000..afa8ba5
--- /dev/null
+++ b/src/distribution/src/main/scripts/interface/gen-java/org/apache/blur/thrift/generated/Query.java
@@ -0,0 +1,665 @@
+/**
+ * Autogenerated by Thrift Compiler (0.9.0)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ *  @generated
+ */
+package org.apache.blur.thrift.generated;
+
+/**
+ * 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.thrift.scheme.IScheme;
+import org.apache.thrift.scheme.SchemeFactory;
+import org.apache.thrift.scheme.StandardScheme;
+
+import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
+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;
+
+/**
+ * The Query object describes how the query is passed.  If the
+ * type is STRING or JSON the queryString field is used.  If
+ * the BINARY type is used the queryBinary should be used.
+ */
+public class Query implements org.apache.thrift.TBase<Query, Query._Fields>, java.io.Serializable, Cloneable {
+  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Query");
+
+  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)1);
+  private static final org.apache.thrift.protocol.TField QUERY_STRING_FIELD_DESC = new org.apache.thrift.protocol.TField("queryString", org.apache.thrift.protocol.TType.STRING, (short)2);
+  private static final org.apache.thrift.protocol.TField QUERY_BINARY_FIELD_DESC = new org.apache.thrift.protocol.TField("queryBinary", org.apache.thrift.protocol.TType.STRING, (short)3);
+
+  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+  static {
+    schemes.put(StandardScheme.class, new QueryStandardSchemeFactory());
+    schemes.put(TupleScheme.class, new QueryTupleSchemeFactory());
+  }
+
+  /**
+   * The query type.
+   * 
+   * @see QueryType
+   */
+  public QueryType type; // required
+  /**
+   * The query to be executed.
+   */
+  public String queryString; // required
+  /**
+   * The query to be executed.
+   */
+  public ByteBuffer queryBinary; // 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 {
+    /**
+     * The query type.
+     * 
+     * @see QueryType
+     */
+    TYPE((short)1, "type"),
+    /**
+     * The query to be executed.
+     */
+    QUERY_STRING((short)2, "queryString"),
+    /**
+     * The query to be executed.
+     */
+    QUERY_BINARY((short)3, "queryBinary");
+
+    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: // TYPE
+          return TYPE;
+        case 2: // QUERY_STRING
+          return QUERY_STRING;
+        case 3: // QUERY_BINARY
+          return QUERY_BINARY;
+        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.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, QueryType.class)));
+    tmpMap.put(_Fields.QUERY_STRING, new org.apache.thrift.meta_data.FieldMetaData("queryString", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+    tmpMap.put(_Fields.QUERY_BINARY, new org.apache.thrift.meta_data.FieldMetaData("queryBinary", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        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(Query.class, metaDataMap);
+  }
+
+  public Query() {
+  }
+
+  public Query(
+    QueryType type,
+    String queryString,
+    ByteBuffer queryBinary)
+  {
+    this();
+    this.type = type;
+    this.queryString = queryString;
+    this.queryBinary = queryBinary;
+  }
+
+  /**
+   * Performs a deep copy on <i>other</i>.
+   */
+  public Query(Query other) {
+    if (other.isSetType()) {
+      this.type = other.type;
+    }
+    if (other.isSetQueryString()) {
+      this.queryString = other.queryString;
+    }
+    if (other.isSetQueryBinary()) {
+      this.queryBinary = org.apache.thrift.TBaseHelper.copyBinary(other.queryBinary);
+;
+    }
+  }
+
+  public Query deepCopy() {
+    return new Query(this);
+  }
+
+  @Override
+  public void clear() {
+    this.type = null;
+    this.queryString = null;
+    this.queryBinary = null;
+  }
+
+  /**
+   * The query type.
+   * 
+   * @see QueryType
+   */
+  public QueryType getType() {
+    return this.type;
+  }
+
+  /**
+   * The query type.
+   * 
+   * @see QueryType
+   */
+  public Query setType(QueryType 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;
+    }
+  }
+
+  /**
+   * The query to be executed.
+   */
+  public String getQueryString() {
+    return this.queryString;
+  }
+
+  /**
+   * The query to be executed.
+   */
+  public Query setQueryString(String queryString) {
+    this.queryString = queryString;
+    return this;
+  }
+
+  public void unsetQueryString() {
+    this.queryString = null;
+  }
+
+  /** Returns true if field queryString is set (has been assigned a value) and false otherwise */
+  public boolean isSetQueryString() {
+    return this.queryString != null;
+  }
+
+  public void setQueryStringIsSet(boolean value) {
+    if (!value) {
+      this.queryString = null;
+    }
+  }
+
+  /**
+   * The query to be executed.
+   */
+  public byte[] getQueryBinary() {
+    setQueryBinary(org.apache.thrift.TBaseHelper.rightSize(queryBinary));
+    return queryBinary == null ? null : queryBinary.array();
+  }
+
+  public ByteBuffer bufferForQueryBinary() {
+    return queryBinary;
+  }
+
+  /**
+   * The query to be executed.
+   */
+  public Query setQueryBinary(byte[] queryBinary) {
+    setQueryBinary(queryBinary == null ? (ByteBuffer)null : ByteBuffer.wrap(queryBinary));
+    return this;
+  }
+
+  public Query setQueryBinary(ByteBuffer queryBinary) {
+    this.queryBinary = queryBinary;
+    return this;
+  }
+
+  public void unsetQueryBinary() {
+    this.queryBinary = null;
+  }
+
+  /** Returns true if field queryBinary is set (has been assigned a value) and false otherwise */
+  public boolean isSetQueryBinary() {
+    return this.queryBinary != null;
+  }
+
+  public void setQueryBinaryIsSet(boolean value) {
+    if (!value) {
+      this.queryBinary = null;
+    }
+  }
+
+  public void setFieldValue(_Fields field, Object value) {
+    switch (field) {
+    case TYPE:
+      if (value == null) {
+        unsetType();
+      } else {
+        setType((QueryType)value);
+      }
+      break;
+
+    case QUERY_STRING:
+      if (value == null) {
+        unsetQueryString();
+      } else {
+        setQueryString((String)value);
+      }
+      break;
+
+    case QUERY_BINARY:
+      if (value == null) {
+        unsetQueryBinary();
+      } else {
+        setQueryBinary((ByteBuffer)value);
+      }
+      break;
+
+    }
+  }
+
+  public Object getFieldValue(_Fields field) {
+    switch (field) {
+    case TYPE:
+      return getType();
+
+    case QUERY_STRING:
+      return getQueryString();
+
+    case QUERY_BINARY:
+      return getQueryBinary();
+
+    }
+    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 TYPE:
+      return isSetType();
+    case QUERY_STRING:
+      return isSetQueryString();
+    case QUERY_BINARY:
+      return isSetQueryBinary();
+    }
+    throw new IllegalStateException();
+  }
+
+  @Override
+  public boolean equals(Object that) {
+    if (that == null)
+      return false;
+    if (that instanceof Query)
+      return this.equals((Query)that);
+    return false;
+  }
+
+  public boolean equals(Query that) {
+    if (that == null)
+      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_queryString = true && this.isSetQueryString();
+    boolean that_present_queryString = true && that.isSetQueryString();
+    if (this_present_queryString || that_present_queryString) {
+      if (!(this_present_queryString && that_present_queryString))
+        return false;
+      if (!this.queryString.equals(that.queryString))
+        return false;
+    }
+
+    boolean this_present_queryBinary = true && this.isSetQueryBinary();
+    boolean that_present_queryBinary = true && that.isSetQueryBinary();
+    if (this_present_queryBinary || that_present_queryBinary) {
+      if (!(this_present_queryBinary && that_present_queryBinary))
+        return false;
+      if (!this.queryBinary.equals(that.queryBinary))
+        return false;
+    }
+
+    return true;
+  }
+
+  @Override
+  public int hashCode() {
+    return 0;
+  }
+
+  public int compareTo(Query other) {
+    if (!getClass().equals(other.getClass())) {
+      return getClass().getName().compareTo(other.getClass().getName());
+    }
+
+    int lastComparison = 0;
+    Query typedOther = (Query)other;
+
+    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(isSetQueryString()).compareTo(typedOther.isSetQueryString());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetQueryString()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.queryString, typedOther.queryString);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetQueryBinary()).compareTo(typedOther.isSetQueryBinary());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetQueryBinary()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.queryBinary, typedOther.queryBinary);
+      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 {
+    schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+  }
+
+  public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+    schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+  }
+
+  @Override
+  public String toString() {
+    StringBuilder sb = new StringBuilder("Query(");
+    boolean first = true;
+
+    sb.append("type:");
+    if (this.type == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.type);
+    }
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("queryString:");
+    if (this.queryString == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.queryString);
+    }
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("queryBinary:");
+    if (this.queryBinary == null) {
+      sb.append("null");
+    } else {
+      org.apache.thrift.TBaseHelper.toString(this.queryBinary, sb);
+    }
+    first = false;
+    sb.append(")");
+    return sb.toString();
+  }
+
+  public void validate() throws org.apache.thrift.TException {
+    // check for required fields
+    // check for sub-struct validity
+  }
+
+  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);
+    }
+  }
+
+  private static class QueryStandardSchemeFactory implements SchemeFactory {
+    public QueryStandardScheme getScheme() {
+      return new QueryStandardScheme();
+    }
+  }
+
+  private static class QueryStandardScheme extends StandardScheme<Query> {
+
+    public void read(org.apache.thrift.protocol.TProtocol iprot, Query struct) throws org.apache.thrift.TException {
+      org.apache.thrift.protocol.TField schemeField;
+      iprot.readStructBegin();
+      while (true)
+      {
+        schemeField = iprot.readFieldBegin();
+        if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
+          break;
+        }
+        switch (schemeField.id) {
+          case 1: // TYPE
+            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+              struct.type = QueryType.findByValue(iprot.readI32());
+              struct.setTypeIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 2: // QUERY_STRING
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.queryString = iprot.readString();
+              struct.setQueryStringIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 3: // QUERY_BINARY
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.queryBinary = iprot.readBinary();
+              struct.setQueryBinaryIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          default:
+            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+        }
+        iprot.readFieldEnd();
+      }
+      iprot.readStructEnd();
+
+      // check for required fields of primitive type, which can't be checked in the validate method
+      struct.validate();
+    }
+
+    public void write(org.apache.thrift.protocol.TProtocol oprot, Query struct) throws org.apache.thrift.TException {
+      struct.validate();
+
+      oprot.writeStructBegin(STRUCT_DESC);
+      if (struct.type != null) {
+        oprot.writeFieldBegin(TYPE_FIELD_DESC);
+        oprot.writeI32(struct.type.getValue());
+        oprot.writeFieldEnd();
+      }
+      if (struct.queryString != null) {
+        oprot.writeFieldBegin(QUERY_STRING_FIELD_DESC);
+        oprot.writeString(struct.queryString);
+        oprot.writeFieldEnd();
+      }
+      if (struct.queryBinary != null) {
+        oprot.writeFieldBegin(QUERY_BINARY_FIELD_DESC);
+        oprot.writeBinary(struct.queryBinary);
+        oprot.writeFieldEnd();
+      }
+      oprot.writeFieldStop();
+      oprot.writeStructEnd();
+    }
+
+  }
+
+  private static class QueryTupleSchemeFactory implements SchemeFactory {
+    public QueryTupleScheme getScheme() {
+      return new QueryTupleScheme();
+    }
+  }
+
+  private static class QueryTupleScheme extends TupleScheme<Query> {
+
+    @Override
+    public void write(org.apache.thrift.protocol.TProtocol prot, Query struct) throws org.apache.thrift.TException {
+      TTupleProtocol oprot = (TTupleProtocol) prot;
+      BitSet optionals = new BitSet();
+      if (struct.isSetType()) {
+        optionals.set(0);
+      }
+      if (struct.isSetQueryString()) {
+        optionals.set(1);
+      }
+      if (struct.isSetQueryBinary()) {
+        optionals.set(2);
+      }
+      oprot.writeBitSet(optionals, 3);
+      if (struct.isSetType()) {
+        oprot.writeI32(struct.type.getValue());
+      }
+      if (struct.isSetQueryString()) {
+        oprot.writeString(struct.queryString);
+      }
+      if (struct.isSetQueryBinary()) {
+        oprot.writeBinary(struct.queryBinary);
+      }
+    }
+
+    @Override
+    public void read(org.apache.thrift.protocol.TProtocol prot, Query struct) throws org.apache.thrift.TException {
+      TTupleProtocol iprot = (TTupleProtocol) prot;
+      BitSet incoming = iprot.readBitSet(3);
+      if (incoming.get(0)) {
+        struct.type = QueryType.findByValue(iprot.readI32());
+        struct.setTypeIsSet(true);
+      }
+      if (incoming.get(1)) {
+        struct.queryString = iprot.readString();
+        struct.setQueryStringIsSet(true);
+      }
+      if (incoming.get(2)) {
+        struct.queryBinary = iprot.readBinary();
+        struct.setQueryBinaryIsSet(true);
+      }
+    }
+  }
+
+}
+

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/11f5141c/src/distribution/src/main/scripts/interface/gen-java/org/apache/blur/thrift/generated/QueryArgs.java
----------------------------------------------------------------------
diff --git a/src/distribution/src/main/scripts/interface/gen-java/org/apache/blur/thrift/generated/QueryArgs.java b/src/distribution/src/main/scripts/interface/gen-java/org/apache/blur/thrift/generated/QueryArgs.java
new file mode 100644
index 0000000..e68046b
--- /dev/null
+++ b/src/distribution/src/main/scripts/interface/gen-java/org/apache/blur/thrift/generated/QueryArgs.java
@@ -0,0 +1,1515 @@
+/**
+ * Autogenerated by Thrift Compiler (0.9.0)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ *  @generated
+ */
+package org.apache.blur.thrift.generated;
+
+/**
+ * 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.thrift.scheme.IScheme;
+import org.apache.thrift.scheme.SchemeFactory;
+import org.apache.thrift.scheme.StandardScheme;
+
+import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
+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 ID_FIELD_DESC = new org.apache.thrift.protocol.TField("id", org.apache.thrift.protocol.TType.STRING, (short)1);
+  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)2);
+  private static final org.apache.thrift.protocol.TField QUERY_FIELD_DESC = new org.apache.thrift.protocol.TField("query", org.apache.thrift.protocol.TType.STRUCT, (short)3);
+  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)4);
+  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)5);
+  private static final org.apache.thrift.protocol.TField AGGREGATE_RESULTS_FIELD_DESC = new org.apache.thrift.protocol.TField("aggregateResults", org.apache.thrift.protocol.TType.BOOL, (short)6);
+  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)7);
+  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)8);
+  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)9);
+  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)10);
+
+  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+  static {
+    schemes.put(StandardScheme.class, new QueryArgsStandardSchemeFactory());
+    schemes.put(TupleScheme.class, new QueryArgsTupleSchemeFactory());
+  }
+
+  /**
+   * Unique id for controlling the given query, leave null for server side assignment.
+   */
+  public String id; // required
+  /**
+   * If after is left null then the first N (where N is numberToFetch)
+   * ScoreDocs are fetched.  If after is not null then the first N
+   * ScoreDocs are fetched that occur after the given ScoreDoc.
+   */
+  public ScoreDoc after; // required
+  /**
+   * The query to be executed.
+   */
+  public Query query; // required
+  /**
+   * Filter to be executed.
+   */
+  public ByteBuffer filter; // required
+  /**
+   * The number of document locations to fetch.
+   */
+  public int numberToFetch; // required
+  /**
+   * If aggregate results is left true then only a single TopFieldDocs
+   * object will be returned from the search method.  It will contain
+   * only the best documents from the given search with all of the
+   * shards being sorted and aggregated together.
+   */
+  public boolean aggregateResults; // required
+  /**
+   * NOT YET IMPLEMENTED.
+   */
+  public Sort sort; // required
+  /**
+   * NOT YET IMPLEMENTED.  Related to sort.
+   */
+  public boolean doDocScores; // required
+  /**
+   * Calculate the max score of the search.
+   */
+  public boolean doMaxScore; // required
+  /**
+   * Shard indexes allows the user to specify which shards of the table to execute
+   * the query against.  If left null, all the shards of the table are used.
+   */
+  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 {
+    /**
+     * Unique id for controlling the given query, leave null for server side assignment.
+     */
+    ID((short)1, "id"),
+    /**
+     * If after is left null then the first N (where N is numberToFetch)
+     * ScoreDocs are fetched.  If after is not null then the first N
+     * ScoreDocs are fetched that occur after the given ScoreDoc.
+     */
+    AFTER((short)2, "after"),
+    /**
+     * The query to be executed.
+     */
+    QUERY((short)3, "query"),
+    /**
+     * Filter to be executed.
+     */
+    FILTER((short)4, "filter"),
+    /**
+     * The number of document locations to fetch.
+     */
+    NUMBER_TO_FETCH((short)5, "numberToFetch"),
+    /**
+     * If aggregate results is left true then only a single TopFieldDocs
+     * object will be returned from the search method.  It will contain
+     * only the best documents from the given search with all of the
+     * shards being sorted and aggregated together.
+     */
+    AGGREGATE_RESULTS((short)6, "aggregateResults"),
+    /**
+     * NOT YET IMPLEMENTED.
+     */
+    SORT((short)7, "sort"),
+    /**
+     * NOT YET IMPLEMENTED.  Related to sort.
+     */
+    DO_DOC_SCORES((short)8, "doDocScores"),
+    /**
+     * Calculate the max score of the search.
+     */
+    DO_MAX_SCORE((short)9, "doMaxScore"),
+    /**
+     * Shard indexes allows the user to specify which shards of the table to execute
+     * the query against.  If left null, all the shards of the table are used.
+     */
+    SHARD_INDEXES((short)10, "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: // ID
+          return ID;
+        case 2: // AFTER
+          return AFTER;
+        case 3: // QUERY
+          return QUERY;
+        case 4: // FILTER
+          return FILTER;
+        case 5: // NUMBER_TO_FETCH
+          return NUMBER_TO_FETCH;
+        case 6: // AGGREGATE_RESULTS
+          return AGGREGATE_RESULTS;
+        case 7: // SORT
+          return SORT;
+        case 8: // DO_DOC_SCORES
+          return DO_DOC_SCORES;
+        case 9: // DO_MAX_SCORE
+          return DO_MAX_SCORE;
+        case 10: // 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 __AGGREGATERESULTS_ISSET_ID = 1;
+  private static final int __DODOCSCORES_ISSET_ID = 2;
+  private static final int __DOMAXSCORE_ISSET_ID = 3;
+  private byte __isset_bitfield = 0;
+  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.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+    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.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Query.class)));
+    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.AGGREGATE_RESULTS, new org.apache.thrift.meta_data.FieldMetaData("aggregateResults", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
+    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() {
+    this.numberToFetch = 100;
+
+    this.aggregateResults = true;
+
+    this.doDocScores = true;
+
+    this.doMaxScore = false;
+
+  }
+
+  public QueryArgs(
+    String id,
+    ScoreDoc after,
+    Query query,
+    ByteBuffer filter,
+    int numberToFetch,
+    boolean aggregateResults,
+    Sort sort,
+    boolean doDocScores,
+    boolean doMaxScore,
+    List<Integer> shardIndexes)
+  {
+    this();
+    this.id = id;
+    this.after = after;
+    this.query = query;
+    this.filter = filter;
+    this.numberToFetch = numberToFetch;
+    setNumberToFetchIsSet(true);
+    this.aggregateResults = aggregateResults;
+    setAggregateResultsIsSet(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_bitfield = other.__isset_bitfield;
+    if (other.isSetId()) {
+      this.id = other.id;
+    }
+    if (other.isSetAfter()) {
+      this.after = new ScoreDoc(other.after);
+    }
+    if (other.isSetQuery()) {
+      this.query = new Query(other.query);
+    }
+    if (other.isSetFilter()) {
+      this.filter = org.apache.thrift.TBaseHelper.copyBinary(other.filter);
+;
+    }
+    this.numberToFetch = other.numberToFetch;
+    this.aggregateResults = other.aggregateResults;
+    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.id = null;
+    this.after = null;
+    this.query = null;
+    this.filter = null;
+    this.numberToFetch = 100;
+
+    this.aggregateResults = true;
+
+    this.sort = null;
+    this.doDocScores = true;
+
+    this.doMaxScore = false;
+
+    this.shardIndexes = null;
+  }
+
+  /**
+   * Unique id for controlling the given query, leave null for server side assignment.
+   */
+  public String getId() {
+    return this.id;
+  }
+
+  /**
+   * Unique id for controlling the given query, leave null for server side assignment.
+   */
+  public QueryArgs setId(String id) {
+    this.id = id;
+    return this;
+  }
+
+  public void unsetId() {
+    this.id = null;
+  }
+
+  /** Returns true if field id is set (has been assigned a value) and false otherwise */
+  public boolean isSetId() {
+    return this.id != null;
+  }
+
+  public void setIdIsSet(boolean value) {
+    if (!value) {
+      this.id = null;
+    }
+  }
+
+  /**
+   * If after is left null then the first N (where N is numberToFetch)
+   * ScoreDocs are fetched.  If after is not null then the first N
+   * ScoreDocs are fetched that occur after the given ScoreDoc.
+   */
+  public ScoreDoc getAfter() {
+    return this.after;
+  }
+
+  /**
+   * If after is left null then the first N (where N is numberToFetch)
+   * ScoreDocs are fetched.  If after is not null then the first N
+   * ScoreDocs are fetched that occur after the given ScoreDoc.
+   */
+  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;
+    }
+  }
+
+  /**
+   * The query to be executed.
+   */
+  public Query getQuery() {
+    return this.query;
+  }
+
+  /**
+   * The query to be executed.
+   */
+  public QueryArgs setQuery(Query 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;
+    }
+  }
+
+  /**
+   * Filter to be executed.
+   */
+  public byte[] getFilter() {
+    setFilter(org.apache.thrift.TBaseHelper.rightSize(filter));
+    return filter == null ? null : filter.array();
+  }
+
+  public ByteBuffer bufferForFilter() {
+    return filter;
+  }
+
+  /**
+   * Filter to be executed.
+   */
+  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;
+    }
+  }
+
+  /**
+   * The number of document locations to fetch.
+   */
+  public int getNumberToFetch() {
+    return this.numberToFetch;
+  }
+
+  /**
+   * The number of document locations to fetch.
+   */
+  public QueryArgs setNumberToFetch(int numberToFetch) {
+    this.numberToFetch = numberToFetch;
+    setNumberToFetchIsSet(true);
+    return this;
+  }
+
+  public void unsetNumberToFetch() {
+    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __NUMBERTOFETCH_ISSET_ID);
+  }
+
+  /** Returns true if field numberToFetch is set (has been assigned a value) and false otherwise */
+  public boolean isSetNumberToFetch() {
+    return EncodingUtils.testBit(__isset_bitfield, __NUMBERTOFETCH_ISSET_ID);
+  }
+
+  public void setNumberToFetchIsSet(boolean value) {
+    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __NUMBERTOFETCH_ISSET_ID, value);
+  }
+
+  /**
+   * If aggregate results is left true then only a single TopFieldDocs
+   * object will be returned from the search method.  It will contain
+   * only the best documents from the given search with all of the
+   * shards being sorted and aggregated together.
+   */
+  public boolean isAggregateResults() {
+    return this.aggregateResults;
+  }
+
+  /**
+   * If aggregate results is left true then only a single TopFieldDocs
+   * object will be returned from the search method.  It will contain
+   * only the best documents from the given search with all of the
+   * shards being sorted and aggregated together.
+   */
+  public QueryArgs setAggregateResults(boolean aggregateResults) {
+    this.aggregateResults = aggregateResults;
+    setAggregateResultsIsSet(true);
+    return this;
+  }
+
+  public void unsetAggregateResults() {
+    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __AGGREGATERESULTS_ISSET_ID);
+  }
+
+  /** Returns true if field aggregateResults is set (has been assigned a value) and false otherwise */
+  public boolean isSetAggregateResults() {
+    return EncodingUtils.testBit(__isset_bitfield, __AGGREGATERESULTS_ISSET_ID);
+  }
+
+  public void setAggregateResultsIsSet(boolean value) {
+    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __AGGREGATERESULTS_ISSET_ID, value);
+  }
+
+  /**
+   * NOT YET IMPLEMENTED.
+   */
+  public Sort getSort() {
+    return this.sort;
+  }
+
+  /**
+   * NOT YET IMPLEMENTED.
+   */
+  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;
+    }
+  }
+
+  /**
+   * NOT YET IMPLEMENTED.  Related to sort.
+   */
+  public boolean isDoDocScores() {
+    return this.doDocScores;
+  }
+
+  /**
+   * NOT YET IMPLEMENTED.  Related to sort.
+   */
+  public QueryArgs setDoDocScores(boolean doDocScores) {
+    this.doDocScores = doDocScores;
+    setDoDocScoresIsSet(true);
+    return this;
+  }
+
+  public void unsetDoDocScores() {
+    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __DODOCSCORES_ISSET_ID);
+  }
+
+  /** Returns true if field doDocScores is set (has been assigned a value) and false otherwise */
+  public boolean isSetDoDocScores() {
+    return EncodingUtils.testBit(__isset_bitfield, __DODOCSCORES_ISSET_ID);
+  }
+
+  public void setDoDocScoresIsSet(boolean value) {
+    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __DODOCSCORES_ISSET_ID, value);
+  }
+
+  /**
+   * Calculate the max score of the search.
+   */
+  public boolean isDoMaxScore() {
+    return this.doMaxScore;
+  }
+
+  /**
+   * Calculate the max score of the search.
+   */
+  public QueryArgs setDoMaxScore(boolean doMaxScore) {
+    this.doMaxScore = doMaxScore;
+    setDoMaxScoreIsSet(true);
+    return this;
+  }
+
+  public void unsetDoMaxScore() {
+    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __DOMAXSCORE_ISSET_ID);
+  }
+
+  /** Returns true if field doMaxScore is set (has been assigned a value) and false otherwise */
+  public boolean isSetDoMaxScore() {
+    return EncodingUtils.testBit(__isset_bitfield, __DOMAXSCORE_ISSET_ID);
+  }
+
+  public void setDoMaxScoreIsSet(boolean value) {
+    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __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);
+  }
+
+  /**
+   * Shard indexes allows the user to specify which shards of the table to execute
+   * the query against.  If left null, all the shards of the table are used.
+   */
+  public List<Integer> getShardIndexes() {
+    return this.shardIndexes;
+  }
+
+  /**
+   * Shard indexes allows the user to specify which shards of the table to execute
+   * the query against.  If left null, all the shards of the table are used.
+   */
+  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 ID:
+      if (value == null) {
+        unsetId();
+      } else {
+        setId((String)value);
+      }
+      break;
+
+    case AFTER:
+      if (value == null) {
+        unsetAfter();
+      } else {
+        setAfter((ScoreDoc)value);
+      }
+      break;
+
+    case QUERY:
+      if (value == null) {
+        unsetQuery();
+      } else {
+        setQuery((Query)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 AGGREGATE_RESULTS:
+      if (value == null) {
+        unsetAggregateResults();
+      } else {
+        setAggregateResults((Boolean)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 ID:
+      return getId();
+
+    case AFTER:
+      return getAfter();
+
+    case QUERY:
+      return getQuery();
+
+    case FILTER:
+      return getFilter();
+
+    case NUMBER_TO_FETCH:
+      return Integer.valueOf(getNumberToFetch());
+
+    case AGGREGATE_RESULTS:
+      return Boolean.valueOf(isAggregateResults());
+
+    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 ID:
+      return isSetId();
+    case AFTER:
+      return isSetAfter();
+    case QUERY:
+      return isSetQuery();
+    case FILTER:
+      return isSetFilter();
+    case NUMBER_TO_FETCH:
+      return isSetNumberToFetch();
+    case AGGREGATE_RESULTS:
+      return isSetAggregateResults();
+    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_id = true && this.isSetId();
+    boolean that_present_id = true && that.isSetId();
+    if (this_present_id || that_present_id) {
+      if (!(this_present_id && that_present_id))
+        return false;
+      if (!this.id.equals(that.id))
+        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_aggregateResults = true;
+    boolean that_present_aggregateResults = true;
+    if (this_present_aggregateResults || that_present_aggregateResults) {
+      if (!(this_present_aggregateResults && that_present_aggregateResults))
+        return false;
+      if (this.aggregateResults != that.aggregateResults)
+        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(isSetId()).compareTo(typedOther.isSetId());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetId()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, typedOther.id);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    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(isSetAggregateResults()).compareTo(typedOther.isSetAggregateResults());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetAggregateResults()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.aggregateResults, typedOther.aggregateResults);
+      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 {
+    schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+  }
+
+  public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+    schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+  }
+
+  @Override
+  public String toString() {
+    StringBuilder sb = new StringBuilder("QueryArgs(");
+    boolean first = true;
+
+    sb.append("id:");
+    if (this.id == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.id);
+    }
+    first = false;
+    if (!first) sb.append(", ");
+    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 {
+      sb.append(this.query);
+    }
+    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("aggregateResults:");
+    sb.append(this.aggregateResults);
+    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
+    // check for sub-struct validity
+    if (after != null) {
+      after.validate();
+    }
+    if (query != null) {
+      query.validate();
+    }
+    if (sort != null) {
+      sort.validate();
+    }
+  }
+
+  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_bitfield = 0;
+      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);
+    }
+  }
+
+  private static class QueryArgsStandardSchemeFactory implements SchemeFactory {
+    public QueryArgsStandardScheme getScheme() {
+      return new QueryArgsStandardScheme();
+    }
+  }
+
+  private static class QueryArgsStandardScheme extends StandardScheme<QueryArgs> {
+
+    public void read(org.apache.thrift.protocol.TProtocol iprot, QueryArgs struct) throws org.apache.thrift.TException {
+      org.apache.thrift.protocol.TField schemeField;
+      iprot.readStructBegin();
+      while (true)
+      {
+        schemeField = iprot.readFieldBegin();
+        if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
+          break;
+        }
+        switch (schemeField.id) {
+          case 1: // ID
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.id = iprot.readString();
+              struct.setIdIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 2: // AFTER
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+              struct.after = new ScoreDoc();
+              struct.after.read(iprot);
+              struct.setAfterIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 3: // QUERY
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+              struct.query = new Query();
+              struct.query.read(iprot);
+              struct.setQueryIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 4: // FILTER
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.filter = iprot.readBinary();
+              struct.setFilterIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 5: // NUMBER_TO_FETCH
+            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+              struct.numberToFetch = iprot.readI32();
+              struct.setNumberToFetchIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 6: // AGGREGATE_RESULTS
+            if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
+              struct.aggregateResults = iprot.readBool();
+              struct.setAggregateResultsIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 7: // SORT
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+              struct.sort = new Sort();
+              struct.sort.read(iprot);
+              struct.setSortIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 8: // DO_DOC_SCORES
+            if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
+              struct.doDocScores = iprot.readBool();
+              struct.setDoDocScoresIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 9: // DO_MAX_SCORE
+            if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
+              struct.doMaxScore = iprot.readBool();
+              struct.setDoMaxScoreIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 10: // SHARD_INDEXES
+            if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
+              {
+                org.apache.thrift.protocol.TList _list60 = iprot.readListBegin();
+                struct.shardIndexes = new ArrayList<Integer>(_list60.size);
+                for (int _i61 = 0; _i61 < _list60.size; ++_i61)
+                {
+                  int _elem62; // required
+                  _elem62 = iprot.readI32();
+                  struct.shardIndexes.add(_elem62);
+                }
+                iprot.readListEnd();
+              }
+              struct.setShardIndexesIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          default:
+            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+        }
+        iprot.readFieldEnd();
+      }
+      iprot.readStructEnd();
+
+      // check for required fields of primitive type, which can't be checked in the validate method
+      struct.validate();
+    }
+
+    public void write(org.apache.thrift.protocol.TProtocol oprot, QueryArgs struct) throws org.apache.thrift.TException {
+      struct.validate();
+
+      oprot.writeStructBegin(STRUCT_DESC);
+      if (struct.id != null) {
+        oprot.writeFieldBegin(ID_FIELD_DESC);
+        oprot.writeString(struct.id);
+        oprot.writeFieldEnd();
+      }
+      if (struct.after != null) {
+        oprot.writeFieldBegin(AFTER_FIELD_DESC);
+        struct.after.write(oprot);
+        oprot.writeFieldEnd();
+      }
+      if (struct.query != null) {
+        oprot.writeFieldBegin(QUERY_FIELD_DESC);
+        struct.query.write(oprot);
+        oprot.writeFieldEnd();
+      }
+      if (struct.filter != null) {
+        oprot.writeFieldBegin(FILTER_FIELD_DESC);
+        oprot.writeBinary(struct.filter);
+        oprot.writeFieldEnd();
+      }
+      oprot.writeFieldBegin(NUMBER_TO_FETCH_FIELD_DESC);
+      oprot.writeI32(struct.numberToFetch);
+      oprot.writeFieldEnd();
+      oprot.writeFieldBegin(AGGREGATE_RESULTS_FIELD_DESC);
+      oprot.writeBool(struct.aggregateResults);
+      oprot.writeFieldEnd();
+      if (struct.sort != null) {
+        oprot.writeFieldBegin(SORT_FIELD_DESC);
+        struct.sort.write(oprot);
+        oprot.writeFieldEnd();
+      }
+      oprot.writeFieldBegin(DO_DOC_SCORES_FIELD_DESC);
+      oprot.writeBool(struct.doDocScores);
+      oprot.writeFieldEnd();
+      oprot.writeFieldBegin(DO_MAX_SCORE_FIELD_DESC);
+      oprot.writeBool(struct.doMaxScore);
+      oprot.writeFieldEnd();
+      if (struct.shardIndexes != null) {
+        oprot.writeFieldBegin(SHARD_INDEXES_FIELD_DESC);
+        {
+          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, struct.shardIndexes.size()));
+          for (int _iter63 : struct.shardIndexes)
+          {
+            oprot.writeI32(_iter63);
+          }
+          oprot.writeListEnd();
+        }
+        oprot.writeFieldEnd();
+      }
+      oprot.writeFieldStop();
+      oprot.writeStructEnd();
+    }
+
+  }
+
+  private static class QueryArgsTupleSchemeFactory implements SchemeFactory {
+    public QueryArgsTupleScheme getScheme() {
+      return new QueryArgsTupleScheme();
+    }
+  }
+
+  private static class QueryArgsTupleScheme extends TupleScheme<QueryArgs> {
+
+    @Override
+    public void write(org.apache.thrift.protocol.TProtocol prot, QueryArgs struct) throws org.apache.thrift.TException {
+      TTupleProtocol oprot = (TTupleProtocol) prot;
+      BitSet optionals = new BitSet();
+      if (struct.isSetId()) {
+        optionals.set(0);
+      }
+      if (struct.isSetAfter()) {
+        optionals.set(1);
+      }
+      if (struct.isSetQuery()) {
+        optionals.set(2);
+      }
+      if (struct.isSetFilter()) {
+        optionals.set(3);
+      }
+      if (struct.isSetNumberToFetch()) {
+        optionals.set(4);
+      }
+      if (struct.isSetAggregateResults()) {
+        optionals.set(5);
+      }
+      if (struct.isSetSort()) {
+        optionals.set(6);
+      }
+      if (struct.isSetDoDocScores()) {
+        optionals.set(7);
+      }
+      if (struct.isSetDoMaxScore()) {
+        optionals.set(8);
+      }
+      if (struct.isSetShardIndexes()) {
+        optionals.set(9);
+      }
+      oprot.writeBitSet(optionals, 10);
+      if (struct.isSetId()) {
+        oprot.writeString(struct.id);
+      }
+      if (struct.isSetAfter()) {
+        struct.after.write(oprot);
+      }
+      if (struct.isSetQuery()) {
+        struct.query.write(oprot);
+      }
+      if (struct.isSetFilter()) {
+        oprot.writeBinary(struct.filter);
+      }
+      if (struct.isSetNumberToFetch()) {
+        oprot.writeI32(struct.numberToFetch);
+      }
+      if (struct.isSetAggregateResults()) {
+        oprot.writeBool(struct.aggregateResults);
+      }
+      if (struct.isSetSort()) {
+        struct.sort.write(oprot);
+      }
+      if (struct.isSetDoDocScores()) {
+        oprot.writeBool(struct.doDocScores);
+      }
+      if (struct.isSetDoMaxScore()) {
+        oprot.writeBool(struct.doMaxScore);
+      }
+      if (struct.isSetShardIndexes()) {
+        {
+          oprot.writeI32(struct.shardIndexes.size());
+          for (int _iter64 : struct.shardIndexes)
+          {
+            oprot.writeI32(_iter64);
+          }
+        }
+      }
+    }
+
+    @Override
+    public void read(org.apache.thrift.protocol.TProtocol prot, QueryArgs struct) throws org.apache.thrift.TException {
+      TTupleProtocol iprot = (TTupleProtocol) prot;
+      BitSet incoming = iprot.readBitSet(10);
+      if (incoming.get(0)) {
+        struct.id = iprot.readString();
+        struct.setIdIsSet(true);
+      }
+      if (incoming.get(1)) {
+        struct.after = new ScoreDoc();
+        struct.after.read(iprot);
+        struct.setAfterIsSet(true);
+      }
+      if (incoming.get(2)) {
+        struct.query = new Query();
+        struct.query.read(iprot);
+        struct.setQueryIsSet(true);
+      }
+      if (incoming.get(3)) {
+        struct.filter = iprot.readBinary();
+        struct.setFilterIsSet(true);
+      }
+      if (incoming.get(4)) {
+        struct.numberToFetch = iprot.readI32();
+        struct.setNumberToFetchIsSet(true);
+      }
+      if (incoming.get(5)) {
+        struct.aggregateResults = iprot.readBool();
+        struct.setAggregateResultsIsSet(true);
+      }
+      if (incoming.get(6)) {
+        struct.sort = new Sort();
+        struct.sort.read(iprot);
+        struct.setSortIsSet(true);
+      }
+      if (incoming.get(7)) {
+        struct.doDocScores = iprot.readBool();
+        struct.setDoDocScoresIsSet(true);
+      }
+      if (incoming.get(8)) {
+        struct.doMaxScore = iprot.readBool();
+        struct.setDoMaxScoreIsSet(true);
+      }
+      if (incoming.get(9)) {
+        {
+          org.apache.thrift.protocol.TList _list65 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, iprot.readI32());
+          struct.shardIndexes = new ArrayList<Integer>(_list65.size);
+          for (int _i66 = 0; _i66 < _list65.size; ++_i66)
+          {
+            int _elem67; // required
+            _elem67 = iprot.readI32();
+            struct.shardIndexes.add(_elem67);
+          }
+        }
+        struct.setShardIndexesIsSet(true);
+      }
+    }
+  }
+
+}
+

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/11f5141c/src/distribution/src/main/scripts/interface/gen-java/org/apache/blur/thrift/generated/QueryState.java
----------------------------------------------------------------------
diff --git a/src/distribution/src/main/scripts/interface/gen-java/org/apache/blur/thrift/generated/QueryState.java b/src/distribution/src/main/scripts/interface/gen-java/org/apache/blur/thrift/generated/QueryState.java
new file mode 100644
index 0000000..8e1dc2b
--- /dev/null
+++ b/src/distribution/src/main/scripts/interface/gen-java/org/apache/blur/thrift/generated/QueryState.java
@@ -0,0 +1,73 @@
+/**
+ * Autogenerated by Thrift Compiler (0.9.0)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ *  @generated
+ */
+package org.apache.blur.thrift.generated;
+
+/**
+ * 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.util.Map;
+import java.util.HashMap;
+import org.apache.thrift.TEnum;
+
+/**
+ * The state of a query.<br/><br/>
+ * RUNNING - Query is running.<br/><br/>
+ * INTERRUPTED - Query has been interrupted.<br/><br/>
+ * COMPLETE - Query is complete.<br/>
+ */
+public enum QueryState implements org.apache.thrift.TEnum {
+  RUNNING(0),
+  INTERRUPTED(1),
+  COMPLETE(2);
+
+  private final int value;
+
+  private QueryState(int value) {
+    this.value = value;
+  }
+
+  /**
+   * Get the integer value of this enum value, as defined in the Thrift IDL.
+   */
+  public int getValue() {
+    return value;
+  }
+
+  /**
+   * Find a the enum type by its integer value, as defined in the Thrift IDL.
+   * @return null if the value is not found.
+   */
+  public static QueryState findByValue(int value) { 
+    switch (value) {
+      case 0:
+        return RUNNING;
+      case 1:
+        return INTERRUPTED;
+      case 2:
+        return COMPLETE;
+      default:
+        return null;
+    }
+  }
+}


Mime
View raw message