incubator-blur-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amccu...@apache.org
Subject [5/29] Added the distribution project to allow for automatically creating build artifacts during a maven build.
Date Fri, 04 Jan 2013 22:42:52 GMT
http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/70b69ecb/src/distribution/src/main/scripts/interface/gen-java/org/apache/blur/thrift/generated/TableStats.java
----------------------------------------------------------------------
diff --git a/src/distribution/src/main/scripts/interface/gen-java/org/apache/blur/thrift/generated/TableStats.java b/src/distribution/src/main/scripts/interface/gen-java/org/apache/blur/thrift/generated/TableStats.java
new file mode 100644
index 0000000..d21538a
--- /dev/null
+++ b/src/distribution/src/main/scripts/interface/gen-java/org/apache/blur/thrift/generated/TableStats.java
@@ -0,0 +1,630 @@
+/**
+ * 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 TableStats implements org.apache.thrift.TBase<TableStats, TableStats._Fields>, java.io.Serializable, Cloneable {
+  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TableStats");
+
+  private static final org.apache.thrift.protocol.TField BYTES_FIELD_DESC = new org.apache.thrift.protocol.TField("bytes", org.apache.thrift.protocol.TType.I64, (short)1);
+  private static final org.apache.thrift.protocol.TField DOCUMENT_COUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("documentCount", org.apache.thrift.protocol.TType.I64, (short)2);
+  private static final org.apache.thrift.protocol.TField QUERIES_FIELD_DESC = new org.apache.thrift.protocol.TField("queries", org.apache.thrift.protocol.TType.I64, (short)3);
+
+  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+  static {
+    schemes.put(StandardScheme.class, new TableStatsStandardSchemeFactory());
+    schemes.put(TupleScheme.class, new TableStatsTupleSchemeFactory());
+  }
+
+  /**
+   * 
+   */
+  public long bytes; // required
+  /**
+   * 
+   */
+  public long documentCount; // required
+  /**
+   * 
+   */
+  public long queries; // 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 {
+    /**
+     * 
+     */
+    BYTES((short)1, "bytes"),
+    /**
+     * 
+     */
+    DOCUMENT_COUNT((short)2, "documentCount"),
+    /**
+     * 
+     */
+    QUERIES((short)3, "queries");
+
+    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: // BYTES
+          return BYTES;
+        case 2: // DOCUMENT_COUNT
+          return DOCUMENT_COUNT;
+        case 3: // QUERIES
+          return QUERIES;
+        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 __BYTES_ISSET_ID = 0;
+  private static final int __DOCUMENTCOUNT_ISSET_ID = 1;
+  private static final int __QUERIES_ISSET_ID = 2;
+  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.BYTES, new org.apache.thrift.meta_data.FieldMetaData("bytes", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
+    tmpMap.put(_Fields.DOCUMENT_COUNT, new org.apache.thrift.meta_data.FieldMetaData("documentCount", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
+    tmpMap.put(_Fields.QUERIES, new org.apache.thrift.meta_data.FieldMetaData("queries", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
+    metaDataMap = Collections.unmodifiableMap(tmpMap);
+    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TableStats.class, metaDataMap);
+  }
+
+  public TableStats() {
+  }
+
+  public TableStats(
+    long bytes,
+    long documentCount,
+    long queries)
+  {
+    this();
+    this.bytes = bytes;
+    setBytesIsSet(true);
+    this.documentCount = documentCount;
+    setDocumentCountIsSet(true);
+    this.queries = queries;
+    setQueriesIsSet(true);
+  }
+
+  /**
+   * Performs a deep copy on <i>other</i>.
+   */
+  public TableStats(TableStats other) {
+    __isset_bitfield = other.__isset_bitfield;
+    this.bytes = other.bytes;
+    this.documentCount = other.documentCount;
+    this.queries = other.queries;
+  }
+
+  public TableStats deepCopy() {
+    return new TableStats(this);
+  }
+
+  @Override
+  public void clear() {
+    setBytesIsSet(false);
+    this.bytes = 0;
+    setDocumentCountIsSet(false);
+    this.documentCount = 0;
+    setQueriesIsSet(false);
+    this.queries = 0;
+  }
+
+  /**
+   * 
+   */
+  public long getBytes() {
+    return this.bytes;
+  }
+
+  /**
+   * 
+   */
+  public TableStats setBytes(long bytes) {
+    this.bytes = bytes;
+    setBytesIsSet(true);
+    return this;
+  }
+
+  public void unsetBytes() {
+    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __BYTES_ISSET_ID);
+  }
+
+  /** Returns true if field bytes is set (has been assigned a value) and false otherwise */
+  public boolean isSetBytes() {
+    return EncodingUtils.testBit(__isset_bitfield, __BYTES_ISSET_ID);
+  }
+
+  public void setBytesIsSet(boolean value) {
+    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __BYTES_ISSET_ID, value);
+  }
+
+  /**
+   * 
+   */
+  public long getDocumentCount() {
+    return this.documentCount;
+  }
+
+  /**
+   * 
+   */
+  public TableStats setDocumentCount(long documentCount) {
+    this.documentCount = documentCount;
+    setDocumentCountIsSet(true);
+    return this;
+  }
+
+  public void unsetDocumentCount() {
+    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __DOCUMENTCOUNT_ISSET_ID);
+  }
+
+  /** Returns true if field documentCount is set (has been assigned a value) and false otherwise */
+  public boolean isSetDocumentCount() {
+    return EncodingUtils.testBit(__isset_bitfield, __DOCUMENTCOUNT_ISSET_ID);
+  }
+
+  public void setDocumentCountIsSet(boolean value) {
+    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __DOCUMENTCOUNT_ISSET_ID, value);
+  }
+
+  /**
+   * 
+   */
+  public long getQueries() {
+    return this.queries;
+  }
+
+  /**
+   * 
+   */
+  public TableStats setQueries(long queries) {
+    this.queries = queries;
+    setQueriesIsSet(true);
+    return this;
+  }
+
+  public void unsetQueries() {
+    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __QUERIES_ISSET_ID);
+  }
+
+  /** Returns true if field queries is set (has been assigned a value) and false otherwise */
+  public boolean isSetQueries() {
+    return EncodingUtils.testBit(__isset_bitfield, __QUERIES_ISSET_ID);
+  }
+
+  public void setQueriesIsSet(boolean value) {
+    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __QUERIES_ISSET_ID, value);
+  }
+
+  public void setFieldValue(_Fields field, Object value) {
+    switch (field) {
+    case BYTES:
+      if (value == null) {
+        unsetBytes();
+      } else {
+        setBytes((Long)value);
+      }
+      break;
+
+    case DOCUMENT_COUNT:
+      if (value == null) {
+        unsetDocumentCount();
+      } else {
+        setDocumentCount((Long)value);
+      }
+      break;
+
+    case QUERIES:
+      if (value == null) {
+        unsetQueries();
+      } else {
+        setQueries((Long)value);
+      }
+      break;
+
+    }
+  }
+
+  public Object getFieldValue(_Fields field) {
+    switch (field) {
+    case BYTES:
+      return Long.valueOf(getBytes());
+
+    case DOCUMENT_COUNT:
+      return Long.valueOf(getDocumentCount());
+
+    case QUERIES:
+      return Long.valueOf(getQueries());
+
+    }
+    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 BYTES:
+      return isSetBytes();
+    case DOCUMENT_COUNT:
+      return isSetDocumentCount();
+    case QUERIES:
+      return isSetQueries();
+    }
+    throw new IllegalStateException();
+  }
+
+  @Override
+  public boolean equals(Object that) {
+    if (that == null)
+      return false;
+    if (that instanceof TableStats)
+      return this.equals((TableStats)that);
+    return false;
+  }
+
+  public boolean equals(TableStats that) {
+    if (that == null)
+      return false;
+
+    boolean this_present_bytes = true;
+    boolean that_present_bytes = true;
+    if (this_present_bytes || that_present_bytes) {
+      if (!(this_present_bytes && that_present_bytes))
+        return false;
+      if (this.bytes != that.bytes)
+        return false;
+    }
+
+    boolean this_present_documentCount = true;
+    boolean that_present_documentCount = true;
+    if (this_present_documentCount || that_present_documentCount) {
+      if (!(this_present_documentCount && that_present_documentCount))
+        return false;
+      if (this.documentCount != that.documentCount)
+        return false;
+    }
+
+    boolean this_present_queries = true;
+    boolean that_present_queries = true;
+    if (this_present_queries || that_present_queries) {
+      if (!(this_present_queries && that_present_queries))
+        return false;
+      if (this.queries != that.queries)
+        return false;
+    }
+
+    return true;
+  }
+
+  @Override
+  public int hashCode() {
+    return 0;
+  }
+
+  public int compareTo(TableStats other) {
+    if (!getClass().equals(other.getClass())) {
+      return getClass().getName().compareTo(other.getClass().getName());
+    }
+
+    int lastComparison = 0;
+    TableStats typedOther = (TableStats)other;
+
+    lastComparison = Boolean.valueOf(isSetBytes()).compareTo(typedOther.isSetBytes());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetBytes()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.bytes, typedOther.bytes);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetDocumentCount()).compareTo(typedOther.isSetDocumentCount());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetDocumentCount()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.documentCount, typedOther.documentCount);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetQueries()).compareTo(typedOther.isSetQueries());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetQueries()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.queries, typedOther.queries);
+      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("TableStats(");
+    boolean first = true;
+
+    sb.append("bytes:");
+    sb.append(this.bytes);
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("documentCount:");
+    sb.append(this.documentCount);
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("queries:");
+    sb.append(this.queries);
+    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 {
+      // 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 TableStatsStandardSchemeFactory implements SchemeFactory {
+    public TableStatsStandardScheme getScheme() {
+      return new TableStatsStandardScheme();
+    }
+  }
+
+  private static class TableStatsStandardScheme extends StandardScheme<TableStats> {
+
+    public void read(org.apache.thrift.protocol.TProtocol iprot, TableStats 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: // BYTES
+            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+              struct.bytes = iprot.readI64();
+              struct.setBytesIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 2: // DOCUMENT_COUNT
+            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+              struct.documentCount = iprot.readI64();
+              struct.setDocumentCountIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 3: // QUERIES
+            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+              struct.queries = iprot.readI64();
+              struct.setQueriesIsSet(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, TableStats struct) throws org.apache.thrift.TException {
+      struct.validate();
+
+      oprot.writeStructBegin(STRUCT_DESC);
+      oprot.writeFieldBegin(BYTES_FIELD_DESC);
+      oprot.writeI64(struct.bytes);
+      oprot.writeFieldEnd();
+      oprot.writeFieldBegin(DOCUMENT_COUNT_FIELD_DESC);
+      oprot.writeI64(struct.documentCount);
+      oprot.writeFieldEnd();
+      oprot.writeFieldBegin(QUERIES_FIELD_DESC);
+      oprot.writeI64(struct.queries);
+      oprot.writeFieldEnd();
+      oprot.writeFieldStop();
+      oprot.writeStructEnd();
+    }
+
+  }
+
+  private static class TableStatsTupleSchemeFactory implements SchemeFactory {
+    public TableStatsTupleScheme getScheme() {
+      return new TableStatsTupleScheme();
+    }
+  }
+
+  private static class TableStatsTupleScheme extends TupleScheme<TableStats> {
+
+    @Override
+    public void write(org.apache.thrift.protocol.TProtocol prot, TableStats struct) throws org.apache.thrift.TException {
+      TTupleProtocol oprot = (TTupleProtocol) prot;
+      BitSet optionals = new BitSet();
+      if (struct.isSetBytes()) {
+        optionals.set(0);
+      }
+      if (struct.isSetDocumentCount()) {
+        optionals.set(1);
+      }
+      if (struct.isSetQueries()) {
+        optionals.set(2);
+      }
+      oprot.writeBitSet(optionals, 3);
+      if (struct.isSetBytes()) {
+        oprot.writeI64(struct.bytes);
+      }
+      if (struct.isSetDocumentCount()) {
+        oprot.writeI64(struct.documentCount);
+      }
+      if (struct.isSetQueries()) {
+        oprot.writeI64(struct.queries);
+      }
+    }
+
+    @Override
+    public void read(org.apache.thrift.protocol.TProtocol prot, TableStats struct) throws org.apache.thrift.TException {
+      TTupleProtocol iprot = (TTupleProtocol) prot;
+      BitSet incoming = iprot.readBitSet(3);
+      if (incoming.get(0)) {
+        struct.bytes = iprot.readI64();
+        struct.setBytesIsSet(true);
+      }
+      if (incoming.get(1)) {
+        struct.documentCount = iprot.readI64();
+        struct.setDocumentCountIsSet(true);
+      }
+      if (incoming.get(2)) {
+        struct.queries = iprot.readI64();
+        struct.setQueriesIsSet(true);
+      }
+    }
+  }
+
+}
+

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/70b69ecb/src/distribution/src/main/scripts/interface/gen-java/org/apache/blur/thrift/generated/Term.java
----------------------------------------------------------------------
diff --git a/src/distribution/src/main/scripts/interface/gen-java/org/apache/blur/thrift/generated/Term.java b/src/distribution/src/main/scripts/interface/gen-java/org/apache/blur/thrift/generated/Term.java
new file mode 100644
index 0000000..357a107
--- /dev/null
+++ b/src/distribution/src/main/scripts/interface/gen-java/org/apache/blur/thrift/generated/Term.java
@@ -0,0 +1,540 @@
+/**
+ * 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 Term implements org.apache.thrift.TBase<Term, Term._Fields>, java.io.Serializable, Cloneable {
+  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Term");
+
+  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 BYTES_FIELD_DESC = new org.apache.thrift.protocol.TField("bytes", org.apache.thrift.protocol.TType.STRING, (short)2);
+
+  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+  static {
+    schemes.put(StandardScheme.class, new TermStandardSchemeFactory());
+    schemes.put(TupleScheme.class, new TermTupleSchemeFactory());
+  }
+
+  /**
+   * Field name.
+   */
+  public String field; // required
+  /**
+   * Field values.
+   */
+  public ByteBuffer bytes; // 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 name.
+     */
+    FIELD((short)1, "field"),
+    /**
+     * Field values.
+     */
+    BYTES((short)2, "bytes");
+
+    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: // BYTES
+          return BYTES;
+        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.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.BYTES, new org.apache.thrift.meta_data.FieldMetaData("bytes", 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(Term.class, metaDataMap);
+  }
+
+  public Term() {
+  }
+
+  public Term(
+    String field,
+    ByteBuffer bytes)
+  {
+    this();
+    this.field = field;
+    this.bytes = bytes;
+  }
+
+  /**
+   * Performs a deep copy on <i>other</i>.
+   */
+  public Term(Term other) {
+    if (other.isSetField()) {
+      this.field = other.field;
+    }
+    if (other.isSetBytes()) {
+      this.bytes = org.apache.thrift.TBaseHelper.copyBinary(other.bytes);
+;
+    }
+  }
+
+  public Term deepCopy() {
+    return new Term(this);
+  }
+
+  @Override
+  public void clear() {
+    this.field = null;
+    this.bytes = null;
+  }
+
+  /**
+   * Field name.
+   */
+  public String getField() {
+    return this.field;
+  }
+
+  /**
+   * Field name.
+   */
+  public Term 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;
+    }
+  }
+
+  /**
+   * Field values.
+   */
+  public byte[] getBytes() {
+    setBytes(org.apache.thrift.TBaseHelper.rightSize(bytes));
+    return bytes == null ? null : bytes.array();
+  }
+
+  public ByteBuffer bufferForBytes() {
+    return bytes;
+  }
+
+  /**
+   * Field values.
+   */
+  public Term setBytes(byte[] bytes) {
+    setBytes(bytes == null ? (ByteBuffer)null : ByteBuffer.wrap(bytes));
+    return this;
+  }
+
+  public Term setBytes(ByteBuffer bytes) {
+    this.bytes = bytes;
+    return this;
+  }
+
+  public void unsetBytes() {
+    this.bytes = null;
+  }
+
+  /** Returns true if field bytes is set (has been assigned a value) and false otherwise */
+  public boolean isSetBytes() {
+    return this.bytes != null;
+  }
+
+  public void setBytesIsSet(boolean value) {
+    if (!value) {
+      this.bytes = null;
+    }
+  }
+
+  public void setFieldValue(_Fields field, Object value) {
+    switch (field) {
+    case FIELD:
+      if (value == null) {
+        unsetField();
+      } else {
+        setField((String)value);
+      }
+      break;
+
+    case BYTES:
+      if (value == null) {
+        unsetBytes();
+      } else {
+        setBytes((ByteBuffer)value);
+      }
+      break;
+
+    }
+  }
+
+  public Object getFieldValue(_Fields field) {
+    switch (field) {
+    case FIELD:
+      return getField();
+
+    case BYTES:
+      return getBytes();
+
+    }
+    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 BYTES:
+      return isSetBytes();
+    }
+    throw new IllegalStateException();
+  }
+
+  @Override
+  public boolean equals(Object that) {
+    if (that == null)
+      return false;
+    if (that instanceof Term)
+      return this.equals((Term)that);
+    return false;
+  }
+
+  public boolean equals(Term 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_bytes = true && this.isSetBytes();
+    boolean that_present_bytes = true && that.isSetBytes();
+    if (this_present_bytes || that_present_bytes) {
+      if (!(this_present_bytes && that_present_bytes))
+        return false;
+      if (!this.bytes.equals(that.bytes))
+        return false;
+    }
+
+    return true;
+  }
+
+  @Override
+  public int hashCode() {
+    return 0;
+  }
+
+  public int compareTo(Term other) {
+    if (!getClass().equals(other.getClass())) {
+      return getClass().getName().compareTo(other.getClass().getName());
+    }
+
+    int lastComparison = 0;
+    Term typedOther = (Term)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(isSetBytes()).compareTo(typedOther.isSetBytes());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetBytes()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.bytes, typedOther.bytes);
+      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("Term(");
+    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("bytes:");
+    if (this.bytes == null) {
+      sb.append("null");
+    } else {
+      org.apache.thrift.TBaseHelper.toString(this.bytes, 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 TermStandardSchemeFactory implements SchemeFactory {
+    public TermStandardScheme getScheme() {
+      return new TermStandardScheme();
+    }
+  }
+
+  private static class TermStandardScheme extends StandardScheme<Term> {
+
+    public void read(org.apache.thrift.protocol.TProtocol iprot, Term 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: // FIELD
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.field = iprot.readString();
+              struct.setFieldIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 2: // BYTES
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.bytes = iprot.readBinary();
+              struct.setBytesIsSet(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, Term struct) throws org.apache.thrift.TException {
+      struct.validate();
+
+      oprot.writeStructBegin(STRUCT_DESC);
+      if (struct.field != null) {
+        oprot.writeFieldBegin(FIELD_FIELD_DESC);
+        oprot.writeString(struct.field);
+        oprot.writeFieldEnd();
+      }
+      if (struct.bytes != null) {
+        oprot.writeFieldBegin(BYTES_FIELD_DESC);
+        oprot.writeBinary(struct.bytes);
+        oprot.writeFieldEnd();
+      }
+      oprot.writeFieldStop();
+      oprot.writeStructEnd();
+    }
+
+  }
+
+  private static class TermTupleSchemeFactory implements SchemeFactory {
+    public TermTupleScheme getScheme() {
+      return new TermTupleScheme();
+    }
+  }
+
+  private static class TermTupleScheme extends TupleScheme<Term> {
+
+    @Override
+    public void write(org.apache.thrift.protocol.TProtocol prot, Term struct) throws org.apache.thrift.TException {
+      TTupleProtocol oprot = (TTupleProtocol) prot;
+      BitSet optionals = new BitSet();
+      if (struct.isSetField()) {
+        optionals.set(0);
+      }
+      if (struct.isSetBytes()) {
+        optionals.set(1);
+      }
+      oprot.writeBitSet(optionals, 2);
+      if (struct.isSetField()) {
+        oprot.writeString(struct.field);
+      }
+      if (struct.isSetBytes()) {
+        oprot.writeBinary(struct.bytes);
+      }
+    }
+
+    @Override
+    public void read(org.apache.thrift.protocol.TProtocol prot, Term struct) throws org.apache.thrift.TException {
+      TTupleProtocol iprot = (TTupleProtocol) prot;
+      BitSet incoming = iprot.readBitSet(2);
+      if (incoming.get(0)) {
+        struct.field = iprot.readString();
+        struct.setFieldIsSet(true);
+      }
+      if (incoming.get(1)) {
+        struct.bytes = iprot.readBinary();
+        struct.setBytesIsSet(true);
+      }
+    }
+  }
+
+}
+

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/70b69ecb/src/distribution/src/main/scripts/interface/gen-java/org/apache/blur/thrift/generated/TopFieldDocs.java
----------------------------------------------------------------------
diff --git a/src/distribution/src/main/scripts/interface/gen-java/org/apache/blur/thrift/generated/TopFieldDocs.java b/src/distribution/src/main/scripts/interface/gen-java/org/apache/blur/thrift/generated/TopFieldDocs.java
new file mode 100644
index 0000000..8fa57e0
--- /dev/null
+++ b/src/distribution/src/main/scripts/interface/gen-java/org/apache/blur/thrift/generated/TopFieldDocs.java
@@ -0,0 +1,899 @@
+/**
+ * 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 TopFieldDocs implements org.apache.thrift.TBase<TopFieldDocs, TopFieldDocs._Fields>, java.io.Serializable, Cloneable {
+  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TopFieldDocs");
+
+  private static final org.apache.thrift.protocol.TField SHARD_INDEX_FIELD_DESC = new org.apache.thrift.protocol.TField("shardIndex", org.apache.thrift.protocol.TType.I32, (short)1);
+  private static final org.apache.thrift.protocol.TField TOTAL_HITS_FIELD_DESC = new org.apache.thrift.protocol.TField("totalHits", org.apache.thrift.protocol.TType.I64, (short)2);
+  private static final org.apache.thrift.protocol.TField SCORE_DOCS_FIELD_DESC = new org.apache.thrift.protocol.TField("scoreDocs", org.apache.thrift.protocol.TType.LIST, (short)3);
+  private static final org.apache.thrift.protocol.TField MAX_SCORE_FIELD_DESC = new org.apache.thrift.protocol.TField("maxScore", org.apache.thrift.protocol.TType.DOUBLE, (short)4);
+  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)5);
+
+  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+  static {
+    schemes.put(StandardScheme.class, new TopFieldDocsStandardSchemeFactory());
+    schemes.put(TupleScheme.class, new TopFieldDocsTupleSchemeFactory());
+  }
+
+  public int shardIndex; // required
+  public long totalHits; // required
+  public List<ScoreDoc> scoreDocs; // required
+  public double maxScore; // required
+  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 {
+    SHARD_INDEX((short)1, "shardIndex"),
+    TOTAL_HITS((short)2, "totalHits"),
+    SCORE_DOCS((short)3, "scoreDocs"),
+    MAX_SCORE((short)4, "maxScore"),
+    FIELDS((short)5, "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: // SHARD_INDEX
+          return SHARD_INDEX;
+        case 2: // TOTAL_HITS
+          return TOTAL_HITS;
+        case 3: // SCORE_DOCS
+          return SCORE_DOCS;
+        case 4: // MAX_SCORE
+          return MAX_SCORE;
+        case 5: // 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 __SHARDINDEX_ISSET_ID = 0;
+  private static final int __TOTALHITS_ISSET_ID = 1;
+  private static final int __MAXSCORE_ISSET_ID = 2;
+  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.SHARD_INDEX, new org.apache.thrift.meta_data.FieldMetaData("shardIndex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
+    tmpMap.put(_Fields.TOTAL_HITS, new org.apache.thrift.meta_data.FieldMetaData("totalHits", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
+    tmpMap.put(_Fields.SCORE_DOCS, new org.apache.thrift.meta_data.FieldMetaData("scoreDocs", 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, ScoreDoc.class))));
+    tmpMap.put(_Fields.MAX_SCORE, new org.apache.thrift.meta_data.FieldMetaData("maxScore", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
+    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(TopFieldDocs.class, metaDataMap);
+  }
+
+  public TopFieldDocs() {
+  }
+
+  public TopFieldDocs(
+    int shardIndex,
+    long totalHits,
+    List<ScoreDoc> scoreDocs,
+    double maxScore,
+    List<SortField> fields)
+  {
+    this();
+    this.shardIndex = shardIndex;
+    setShardIndexIsSet(true);
+    this.totalHits = totalHits;
+    setTotalHitsIsSet(true);
+    this.scoreDocs = scoreDocs;
+    this.maxScore = maxScore;
+    setMaxScoreIsSet(true);
+    this.fields = fields;
+  }
+
+  /**
+   * Performs a deep copy on <i>other</i>.
+   */
+  public TopFieldDocs(TopFieldDocs other) {
+    __isset_bitfield = other.__isset_bitfield;
+    this.shardIndex = other.shardIndex;
+    this.totalHits = other.totalHits;
+    if (other.isSetScoreDocs()) {
+      List<ScoreDoc> __this__scoreDocs = new ArrayList<ScoreDoc>();
+      for (ScoreDoc other_element : other.scoreDocs) {
+        __this__scoreDocs.add(new ScoreDoc(other_element));
+      }
+      this.scoreDocs = __this__scoreDocs;
+    }
+    this.maxScore = other.maxScore;
+    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 TopFieldDocs deepCopy() {
+    return new TopFieldDocs(this);
+  }
+
+  @Override
+  public void clear() {
+    setShardIndexIsSet(false);
+    this.shardIndex = 0;
+    setTotalHitsIsSet(false);
+    this.totalHits = 0;
+    this.scoreDocs = null;
+    setMaxScoreIsSet(false);
+    this.maxScore = 0.0;
+    this.fields = null;
+  }
+
+  public int getShardIndex() {
+    return this.shardIndex;
+  }
+
+  public TopFieldDocs setShardIndex(int shardIndex) {
+    this.shardIndex = shardIndex;
+    setShardIndexIsSet(true);
+    return this;
+  }
+
+  public void unsetShardIndex() {
+    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SHARDINDEX_ISSET_ID);
+  }
+
+  /** Returns true if field shardIndex is set (has been assigned a value) and false otherwise */
+  public boolean isSetShardIndex() {
+    return EncodingUtils.testBit(__isset_bitfield, __SHARDINDEX_ISSET_ID);
+  }
+
+  public void setShardIndexIsSet(boolean value) {
+    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SHARDINDEX_ISSET_ID, value);
+  }
+
+  public long getTotalHits() {
+    return this.totalHits;
+  }
+
+  public TopFieldDocs setTotalHits(long totalHits) {
+    this.totalHits = totalHits;
+    setTotalHitsIsSet(true);
+    return this;
+  }
+
+  public void unsetTotalHits() {
+    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TOTALHITS_ISSET_ID);
+  }
+
+  /** Returns true if field totalHits is set (has been assigned a value) and false otherwise */
+  public boolean isSetTotalHits() {
+    return EncodingUtils.testBit(__isset_bitfield, __TOTALHITS_ISSET_ID);
+  }
+
+  public void setTotalHitsIsSet(boolean value) {
+    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TOTALHITS_ISSET_ID, value);
+  }
+
+  public int getScoreDocsSize() {
+    return (this.scoreDocs == null) ? 0 : this.scoreDocs.size();
+  }
+
+  public java.util.Iterator<ScoreDoc> getScoreDocsIterator() {
+    return (this.scoreDocs == null) ? null : this.scoreDocs.iterator();
+  }
+
+  public void addToScoreDocs(ScoreDoc elem) {
+    if (this.scoreDocs == null) {
+      this.scoreDocs = new ArrayList<ScoreDoc>();
+    }
+    this.scoreDocs.add(elem);
+  }
+
+  public List<ScoreDoc> getScoreDocs() {
+    return this.scoreDocs;
+  }
+
+  public TopFieldDocs setScoreDocs(List<ScoreDoc> scoreDocs) {
+    this.scoreDocs = scoreDocs;
+    return this;
+  }
+
+  public void unsetScoreDocs() {
+    this.scoreDocs = null;
+  }
+
+  /** Returns true if field scoreDocs is set (has been assigned a value) and false otherwise */
+  public boolean isSetScoreDocs() {
+    return this.scoreDocs != null;
+  }
+
+  public void setScoreDocsIsSet(boolean value) {
+    if (!value) {
+      this.scoreDocs = null;
+    }
+  }
+
+  public double getMaxScore() {
+    return this.maxScore;
+  }
+
+  public TopFieldDocs setMaxScore(double maxScore) {
+    this.maxScore = maxScore;
+    setMaxScoreIsSet(true);
+    return this;
+  }
+
+  public void unsetMaxScore() {
+    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MAXSCORE_ISSET_ID);
+  }
+
+  /** Returns true if field maxScore is set (has been assigned a value) and false otherwise */
+  public boolean isSetMaxScore() {
+    return EncodingUtils.testBit(__isset_bitfield, __MAXSCORE_ISSET_ID);
+  }
+
+  public void setMaxScoreIsSet(boolean value) {
+    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MAXSCORE_ISSET_ID, value);
+  }
+
+  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 TopFieldDocs 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 SHARD_INDEX:
+      if (value == null) {
+        unsetShardIndex();
+      } else {
+        setShardIndex((Integer)value);
+      }
+      break;
+
+    case TOTAL_HITS:
+      if (value == null) {
+        unsetTotalHits();
+      } else {
+        setTotalHits((Long)value);
+      }
+      break;
+
+    case SCORE_DOCS:
+      if (value == null) {
+        unsetScoreDocs();
+      } else {
+        setScoreDocs((List<ScoreDoc>)value);
+      }
+      break;
+
+    case MAX_SCORE:
+      if (value == null) {
+        unsetMaxScore();
+      } else {
+        setMaxScore((Double)value);
+      }
+      break;
+
+    case FIELDS:
+      if (value == null) {
+        unsetFields();
+      } else {
+        setFields((List<SortField>)value);
+      }
+      break;
+
+    }
+  }
+
+  public Object getFieldValue(_Fields field) {
+    switch (field) {
+    case SHARD_INDEX:
+      return Integer.valueOf(getShardIndex());
+
+    case TOTAL_HITS:
+      return Long.valueOf(getTotalHits());
+
+    case SCORE_DOCS:
+      return getScoreDocs();
+
+    case MAX_SCORE:
+      return Double.valueOf(getMaxScore());
+
+    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 SHARD_INDEX:
+      return isSetShardIndex();
+    case TOTAL_HITS:
+      return isSetTotalHits();
+    case SCORE_DOCS:
+      return isSetScoreDocs();
+    case MAX_SCORE:
+      return isSetMaxScore();
+    case FIELDS:
+      return isSetFields();
+    }
+    throw new IllegalStateException();
+  }
+
+  @Override
+  public boolean equals(Object that) {
+    if (that == null)
+      return false;
+    if (that instanceof TopFieldDocs)
+      return this.equals((TopFieldDocs)that);
+    return false;
+  }
+
+  public boolean equals(TopFieldDocs that) {
+    if (that == null)
+      return false;
+
+    boolean this_present_shardIndex = true;
+    boolean that_present_shardIndex = true;
+    if (this_present_shardIndex || that_present_shardIndex) {
+      if (!(this_present_shardIndex && that_present_shardIndex))
+        return false;
+      if (this.shardIndex != that.shardIndex)
+        return false;
+    }
+
+    boolean this_present_totalHits = true;
+    boolean that_present_totalHits = true;
+    if (this_present_totalHits || that_present_totalHits) {
+      if (!(this_present_totalHits && that_present_totalHits))
+        return false;
+      if (this.totalHits != that.totalHits)
+        return false;
+    }
+
+    boolean this_present_scoreDocs = true && this.isSetScoreDocs();
+    boolean that_present_scoreDocs = true && that.isSetScoreDocs();
+    if (this_present_scoreDocs || that_present_scoreDocs) {
+      if (!(this_present_scoreDocs && that_present_scoreDocs))
+        return false;
+      if (!this.scoreDocs.equals(that.scoreDocs))
+        return false;
+    }
+
+    boolean this_present_maxScore = true;
+    boolean that_present_maxScore = true;
+    if (this_present_maxScore || that_present_maxScore) {
+      if (!(this_present_maxScore && that_present_maxScore))
+        return false;
+      if (this.maxScore != that.maxScore)
+        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(TopFieldDocs other) {
+    if (!getClass().equals(other.getClass())) {
+      return getClass().getName().compareTo(other.getClass().getName());
+    }
+
+    int lastComparison = 0;
+    TopFieldDocs typedOther = (TopFieldDocs)other;
+
+    lastComparison = Boolean.valueOf(isSetShardIndex()).compareTo(typedOther.isSetShardIndex());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetShardIndex()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.shardIndex, typedOther.shardIndex);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetTotalHits()).compareTo(typedOther.isSetTotalHits());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetTotalHits()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.totalHits, typedOther.totalHits);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetScoreDocs()).compareTo(typedOther.isSetScoreDocs());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetScoreDocs()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.scoreDocs, typedOther.scoreDocs);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetMaxScore()).compareTo(typedOther.isSetMaxScore());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetMaxScore()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.maxScore, typedOther.maxScore);
+      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 {
+    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("TopFieldDocs(");
+    boolean first = true;
+
+    sb.append("shardIndex:");
+    sb.append(this.shardIndex);
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("totalHits:");
+    sb.append(this.totalHits);
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("scoreDocs:");
+    if (this.scoreDocs == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.scoreDocs);
+    }
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("maxScore:");
+    sb.append(this.maxScore);
+    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
+    // 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 {
+      // 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 TopFieldDocsStandardSchemeFactory implements SchemeFactory {
+    public TopFieldDocsStandardScheme getScheme() {
+      return new TopFieldDocsStandardScheme();
+    }
+  }
+
+  private static class TopFieldDocsStandardScheme extends StandardScheme<TopFieldDocs> {
+
+    public void read(org.apache.thrift.protocol.TProtocol iprot, TopFieldDocs 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: // SHARD_INDEX
+            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+              struct.shardIndex = iprot.readI32();
+              struct.setShardIndexIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 2: // TOTAL_HITS
+            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+              struct.totalHits = iprot.readI64();
+              struct.setTotalHitsIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 3: // SCORE_DOCS
+            if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
+              {
+                org.apache.thrift.protocol.TList _list88 = iprot.readListBegin();
+                struct.scoreDocs = new ArrayList<ScoreDoc>(_list88.size);
+                for (int _i89 = 0; _i89 < _list88.size; ++_i89)
+                {
+                  ScoreDoc _elem90; // required
+                  _elem90 = new ScoreDoc();
+                  _elem90.read(iprot);
+                  struct.scoreDocs.add(_elem90);
+                }
+                iprot.readListEnd();
+              }
+              struct.setScoreDocsIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 4: // MAX_SCORE
+            if (schemeField.type == org.apache.thrift.protocol.TType.DOUBLE) {
+              struct.maxScore = iprot.readDouble();
+              struct.setMaxScoreIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 5: // FIELDS
+            if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
+              {
+                org.apache.thrift.protocol.TList _list91 = iprot.readListBegin();
+                struct.fields = new ArrayList<SortField>(_list91.size);
+                for (int _i92 = 0; _i92 < _list91.size; ++_i92)
+                {
+                  SortField _elem93; // required
+                  _elem93 = new SortField();
+                  _elem93.read(iprot);
+                  struct.fields.add(_elem93);
+                }
+                iprot.readListEnd();
+              }
+              struct.setFieldsIsSet(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, TopFieldDocs struct) throws org.apache.thrift.TException {
+      struct.validate();
+
+      oprot.writeStructBegin(STRUCT_DESC);
+      oprot.writeFieldBegin(SHARD_INDEX_FIELD_DESC);
+      oprot.writeI32(struct.shardIndex);
+      oprot.writeFieldEnd();
+      oprot.writeFieldBegin(TOTAL_HITS_FIELD_DESC);
+      oprot.writeI64(struct.totalHits);
+      oprot.writeFieldEnd();
+      if (struct.scoreDocs != null) {
+        oprot.writeFieldBegin(SCORE_DOCS_FIELD_DESC);
+        {
+          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.scoreDocs.size()));
+          for (ScoreDoc _iter94 : struct.scoreDocs)
+          {
+            _iter94.write(oprot);
+          }
+          oprot.writeListEnd();
+        }
+        oprot.writeFieldEnd();
+      }
+      oprot.writeFieldBegin(MAX_SCORE_FIELD_DESC);
+      oprot.writeDouble(struct.maxScore);
+      oprot.writeFieldEnd();
+      if (struct.fields != null) {
+        oprot.writeFieldBegin(FIELDS_FIELD_DESC);
+        {
+          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.fields.size()));
+          for (SortField _iter95 : struct.fields)
+          {
+            _iter95.write(oprot);
+          }
+          oprot.writeListEnd();
+        }
+        oprot.writeFieldEnd();
+      }
+      oprot.writeFieldStop();
+      oprot.writeStructEnd();
+    }
+
+  }
+
+  private static class TopFieldDocsTupleSchemeFactory implements SchemeFactory {
+    public TopFieldDocsTupleScheme getScheme() {
+      return new TopFieldDocsTupleScheme();
+    }
+  }
+
+  private static class TopFieldDocsTupleScheme extends TupleScheme<TopFieldDocs> {
+
+    @Override
+    public void write(org.apache.thrift.protocol.TProtocol prot, TopFieldDocs struct) throws org.apache.thrift.TException {
+      TTupleProtocol oprot = (TTupleProtocol) prot;
+      BitSet optionals = new BitSet();
+      if (struct.isSetShardIndex()) {
+        optionals.set(0);
+      }
+      if (struct.isSetTotalHits()) {
+        optionals.set(1);
+      }
+      if (struct.isSetScoreDocs()) {
+        optionals.set(2);
+      }
+      if (struct.isSetMaxScore()) {
+        optionals.set(3);
+      }
+      if (struct.isSetFields()) {
+        optionals.set(4);
+      }
+      oprot.writeBitSet(optionals, 5);
+      if (struct.isSetShardIndex()) {
+        oprot.writeI32(struct.shardIndex);
+      }
+      if (struct.isSetTotalHits()) {
+        oprot.writeI64(struct.totalHits);
+      }
+      if (struct.isSetScoreDocs()) {
+        {
+          oprot.writeI32(struct.scoreDocs.size());
+          for (ScoreDoc _iter96 : struct.scoreDocs)
+          {
+            _iter96.write(oprot);
+          }
+        }
+      }
+      if (struct.isSetMaxScore()) {
+        oprot.writeDouble(struct.maxScore);
+      }
+      if (struct.isSetFields()) {
+        {
+          oprot.writeI32(struct.fields.size());
+          for (SortField _iter97 : struct.fields)
+          {
+            _iter97.write(oprot);
+          }
+        }
+      }
+    }
+
+    @Override
+    public void read(org.apache.thrift.protocol.TProtocol prot, TopFieldDocs struct) throws org.apache.thrift.TException {
+      TTupleProtocol iprot = (TTupleProtocol) prot;
+      BitSet incoming = iprot.readBitSet(5);
+      if (incoming.get(0)) {
+        struct.shardIndex = iprot.readI32();
+        struct.setShardIndexIsSet(true);
+      }
+      if (incoming.get(1)) {
+        struct.totalHits = iprot.readI64();
+        struct.setTotalHitsIsSet(true);
+      }
+      if (incoming.get(2)) {
+        {
+          org.apache.thrift.protocol.TList _list98 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+          struct.scoreDocs = new ArrayList<ScoreDoc>(_list98.size);
+          for (int _i99 = 0; _i99 < _list98.size; ++_i99)
+          {
+            ScoreDoc _elem100; // required
+            _elem100 = new ScoreDoc();
+            _elem100.read(iprot);
+            struct.scoreDocs.add(_elem100);
+          }
+        }
+        struct.setScoreDocsIsSet(true);
+      }
+      if (incoming.get(3)) {
+        struct.maxScore = iprot.readDouble();
+        struct.setMaxScoreIsSet(true);
+      }
+      if (incoming.get(4)) {
+        {
+          org.apache.thrift.protocol.TList _list101 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+          struct.fields = new ArrayList<SortField>(_list101.size);
+          for (int _i102 = 0; _i102 < _list101.size; ++_i102)
+          {
+            SortField _elem103; // required
+            _elem103 = new SortField();
+            _elem103.read(iprot);
+            struct.fields.add(_elem103);
+          }
+        }
+        struct.setFieldsIsSet(true);
+      }
+    }
+  }
+
+}
+

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/70b69ecb/src/distribution/src/main/scripts/interface/gen-java/org/apache/blur/thrift/generated/UpdatePackage.java
----------------------------------------------------------------------
diff --git a/src/distribution/src/main/scripts/interface/gen-java/org/apache/blur/thrift/generated/UpdatePackage.java b/src/distribution/src/main/scripts/interface/gen-java/org/apache/blur/thrift/generated/UpdatePackage.java
new file mode 100644
index 0000000..350bf5d
--- /dev/null
+++ b/src/distribution/src/main/scripts/interface/gen-java/org/apache/blur/thrift/generated/UpdatePackage.java
@@ -0,0 +1,591 @@
+/**
+ * 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;
+
+/**
+ * Contains a the delete term as well as the documents that will be added to the index shard.
+ */
+public class UpdatePackage implements org.apache.thrift.TBase<UpdatePackage, UpdatePackage._Fields>, java.io.Serializable, Cloneable {
+  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("UpdatePackage");
+
+  private static final org.apache.thrift.protocol.TField TERM_FIELD_DESC = new org.apache.thrift.protocol.TField("term", org.apache.thrift.protocol.TType.STRUCT, (short)1);
+  private static final org.apache.thrift.protocol.TField DOCUMENTS_FIELD_DESC = new org.apache.thrift.protocol.TField("documents", org.apache.thrift.protocol.TType.LIST, (short)2);
+
+  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+  static {
+    schemes.put(StandardScheme.class, new UpdatePackageStandardSchemeFactory());
+    schemes.put(TupleScheme.class, new UpdatePackageTupleSchemeFactory());
+  }
+
+  /**
+   * The term that will mark old Documents as deleted before adding the documents.
+   */
+  public Term term; // required
+  /**
+   * The documents to be updated.
+   */
+  public List<Document> documents; // 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 term that will mark old Documents as deleted before adding the documents.
+     */
+    TERM((short)1, "term"),
+    /**
+     * The documents to be updated.
+     */
+    DOCUMENTS((short)2, "documents");
+
+    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: // TERM
+          return TERM;
+        case 2: // DOCUMENTS
+          return DOCUMENTS;
+        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.TERM, new org.apache.thrift.meta_data.FieldMetaData("term", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Term.class)));
+    tmpMap.put(_Fields.DOCUMENTS, new org.apache.thrift.meta_data.FieldMetaData("documents", 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, Document.class))));
+    metaDataMap = Collections.unmodifiableMap(tmpMap);
+    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(UpdatePackage.class, metaDataMap);
+  }
+
+  public UpdatePackage() {
+  }
+
+  public UpdatePackage(
+    Term term,
+    List<Document> documents)
+  {
+    this();
+    this.term = term;
+    this.documents = documents;
+  }
+
+  /**
+   * Performs a deep copy on <i>other</i>.
+   */
+  public UpdatePackage(UpdatePackage other) {
+    if (other.isSetTerm()) {
+      this.term = new Term(other.term);
+    }
+    if (other.isSetDocuments()) {
+      List<Document> __this__documents = new ArrayList<Document>();
+      for (Document other_element : other.documents) {
+        __this__documents.add(new Document(other_element));
+      }
+      this.documents = __this__documents;
+    }
+  }
+
+  public UpdatePackage deepCopy() {
+    return new UpdatePackage(this);
+  }
+
+  @Override
+  public void clear() {
+    this.term = null;
+    this.documents = null;
+  }
+
+  /**
+   * The term that will mark old Documents as deleted before adding the documents.
+   */
+  public Term getTerm() {
+    return this.term;
+  }
+
+  /**
+   * The term that will mark old Documents as deleted before adding the documents.
+   */
+  public UpdatePackage setTerm(Term term) {
+    this.term = term;
+    return this;
+  }
+
+  public void unsetTerm() {
+    this.term = null;
+  }
+
+  /** Returns true if field term is set (has been assigned a value) and false otherwise */
+  public boolean isSetTerm() {
+    return this.term != null;
+  }
+
+  public void setTermIsSet(boolean value) {
+    if (!value) {
+      this.term = null;
+    }
+  }
+
+  public int getDocumentsSize() {
+    return (this.documents == null) ? 0 : this.documents.size();
+  }
+
+  public java.util.Iterator<Document> getDocumentsIterator() {
+    return (this.documents == null) ? null : this.documents.iterator();
+  }
+
+  public void addToDocuments(Document elem) {
+    if (this.documents == null) {
+      this.documents = new ArrayList<Document>();
+    }
+    this.documents.add(elem);
+  }
+
+  /**
+   * The documents to be updated.
+   */
+  public List<Document> getDocuments() {
+    return this.documents;
+  }
+
+  /**
+   * The documents to be updated.
+   */
+  public UpdatePackage setDocuments(List<Document> documents) {
+    this.documents = documents;
+    return this;
+  }
+
+  public void unsetDocuments() {
+    this.documents = null;
+  }
+
+  /** Returns true if field documents is set (has been assigned a value) and false otherwise */
+  public boolean isSetDocuments() {
+    return this.documents != null;
+  }
+
+  public void setDocumentsIsSet(boolean value) {
+    if (!value) {
+      this.documents = null;
+    }
+  }
+
+  public void setFieldValue(_Fields field, Object value) {
+    switch (field) {
+    case TERM:
+      if (value == null) {
+        unsetTerm();
+      } else {
+        setTerm((Term)value);
+      }
+      break;
+
+    case DOCUMENTS:
+      if (value == null) {
+        unsetDocuments();
+      } else {
+        setDocuments((List<Document>)value);
+      }
+      break;
+
+    }
+  }
+
+  public Object getFieldValue(_Fields field) {
+    switch (field) {
+    case TERM:
+      return getTerm();
+
+    case DOCUMENTS:
+      return getDocuments();
+
+    }
+    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 TERM:
+      return isSetTerm();
+    case DOCUMENTS:
+      return isSetDocuments();
+    }
+    throw new IllegalStateException();
+  }
+
+  @Override
+  public boolean equals(Object that) {
+    if (that == null)
+      return false;
+    if (that instanceof UpdatePackage)
+      return this.equals((UpdatePackage)that);
+    return false;
+  }
+
+  public boolean equals(UpdatePackage that) {
+    if (that == null)
+      return false;
+
+    boolean this_present_term = true && this.isSetTerm();
+    boolean that_present_term = true && that.isSetTerm();
+    if (this_present_term || that_present_term) {
+      if (!(this_present_term && that_present_term))
+        return false;
+      if (!this.term.equals(that.term))
+        return false;
+    }
+
+    boolean this_present_documents = true && this.isSetDocuments();
+    boolean that_present_documents = true && that.isSetDocuments();
+    if (this_present_documents || that_present_documents) {
+      if (!(this_present_documents && that_present_documents))
+        return false;
+      if (!this.documents.equals(that.documents))
+        return false;
+    }
+
+    return true;
+  }
+
+  @Override
+  public int hashCode() {
+    return 0;
+  }
+
+  public int compareTo(UpdatePackage other) {
+    if (!getClass().equals(other.getClass())) {
+      return getClass().getName().compareTo(other.getClass().getName());
+    }
+
+    int lastComparison = 0;
+    UpdatePackage typedOther = (UpdatePackage)other;
+
+    lastComparison = Boolean.valueOf(isSetTerm()).compareTo(typedOther.isSetTerm());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetTerm()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.term, typedOther.term);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetDocuments()).compareTo(typedOther.isSetDocuments());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetDocuments()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.documents, typedOther.documents);
+      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("UpdatePackage(");
+    boolean first = true;
+
+    sb.append("term:");
+    if (this.term == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.term);
+    }
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("documents:");
+    if (this.documents == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.documents);
+    }
+    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 (term != null) {
+      term.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 {
+      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 UpdatePackageStandardSchemeFactory implements SchemeFactory {
+    public UpdatePackageStandardScheme getScheme() {
+      return new UpdatePackageStandardScheme();
+    }
+  }
+
+  private static class UpdatePackageStandardScheme extends StandardScheme<UpdatePackage> {
+
+    public void read(org.apache.thrift.protocol.TProtocol iprot, UpdatePackage 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: // TERM
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+              struct.term = new Term();
+              struct.term.read(iprot);
+              struct.setTermIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 2: // DOCUMENTS
+            if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
+              {
+                org.apache.thrift.protocol.TList _list112 = iprot.readListBegin();
+                struct.documents = new ArrayList<Document>(_list112.size);
+                for (int _i113 = 0; _i113 < _list112.size; ++_i113)
+                {
+                  Document _elem114; // required
+                  _elem114 = new Document();
+                  _elem114.read(iprot);
+                  struct.documents.add(_elem114);
+                }
+                iprot.readListEnd();
+              }
+              struct.setDocumentsIsSet(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, UpdatePackage struct) throws org.apache.thrift.TException {
+      struct.validate();
+
+      oprot.writeStructBegin(STRUCT_DESC);
+      if (struct.term != null) {
+        oprot.writeFieldBegin(TERM_FIELD_DESC);
+        struct.term.write(oprot);
+        oprot.writeFieldEnd();
+      }
+      if (struct.documents != null) {
+        oprot.writeFieldBegin(DOCUMENTS_FIELD_DESC);
+        {
+          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.documents.size()));
+          for (Document _iter115 : struct.documents)
+          {
+            _iter115.write(oprot);
+          }
+          oprot.writeListEnd();
+        }
+        oprot.writeFieldEnd();
+      }
+      oprot.writeFieldStop();
+      oprot.writeStructEnd();
+    }
+
+  }
+
+  private static class UpdatePackageTupleSchemeFactory implements SchemeFactory {
+    public UpdatePackageTupleScheme getScheme() {
+      return new UpdatePackageTupleScheme();
+    }
+  }
+
+  private static class UpdatePackageTupleScheme extends TupleScheme<UpdatePackage> {
+
+    @Override
+    public void write(org.apache.thrift.protocol.TProtocol prot, UpdatePackage struct) throws org.apache.thrift.TException {
+      TTupleProtocol oprot = (TTupleProtocol) prot;
+      BitSet optionals = new BitSet();
+      if (struct.isSetTerm()) {
+        optionals.set(0);
+      }
+      if (struct.isSetDocuments()) {
+        optionals.set(1);
+      }
+      oprot.writeBitSet(optionals, 2);
+      if (struct.isSetTerm()) {
+        struct.term.write(oprot);
+      }
+      if (struct.isSetDocuments()) {
+        {
+          oprot.writeI32(struct.documents.size());
+          for (Document _iter116 : struct.documents)
+          {
+            _iter116.write(oprot);
+          }
+        }
+      }
+    }
+
+    @Override
+    public void read(org.apache.thrift.protocol.TProtocol prot, UpdatePackage struct) throws org.apache.thrift.TException {
+      TTupleProtocol iprot = (TTupleProtocol) prot;
+      BitSet incoming = iprot.readBitSet(2);
+      if (incoming.get(0)) {
+        struct.term = new Term();
+        struct.term.read(iprot);
+        struct.setTermIsSet(true);
+      }
+      if (incoming.get(1)) {
+        {
+          org.apache.thrift.protocol.TList _list117 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+          struct.documents = new ArrayList<Document>(_list117.size);
+          for (int _i118 = 0; _i118 < _list117.size; ++_i118)
+          {
+            Document _elem119; // required
+            _elem119 = new Document();
+            _elem119.read(iprot);
+            struct.documents.add(_elem119);
+          }
+        }
+        struct.setDocumentsIsSet(true);
+      }
+    }
+  }
+
+}
+


Mime
View raw message