incubator-blur-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amccu...@apache.org
Subject [9/25] Regenerated thrift code.
Date Tue, 30 Oct 2012 00:15:29 GMT
http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/1befa5f5/interface/gen-java/org/apache/blur/thrift/generated/Lucene.java
----------------------------------------------------------------------
diff --git a/interface/gen-java/org/apache/blur/thrift/generated/Lucene.java b/interface/gen-java/org/apache/blur/thrift/generated/Lucene.java
index f4d7e61..d1ac11c 100644
--- a/interface/gen-java/org/apache/blur/thrift/generated/Lucene.java
+++ b/interface/gen-java/org/apache/blur/thrift/generated/Lucene.java
@@ -1,7 +1,8 @@
 /**
- * Autogenerated by Thrift Compiler (0.7.0)
+ * 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;
 
@@ -24,6 +25,15 @@ package org.apache.blur.thrift.generated;
 
 
 
+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;
@@ -45,7 +55,7 @@ public class Lucene {
 
     public Session openReadSession(String table) throws BlurException, org.apache.thrift.TException;
 
-    public TopFieldDocs search(Session session, QueryArgs queryArgs) throws BlurException, org.apache.thrift.TException;
+    public List<TopFieldDocs> search(Session session, QueryArgs queryArgs) throws BlurException, org.apache.thrift.TException;
 
     public List<Document> doc(Session session, List<DocLocation> docLocations, Set<String> fields) throws BlurException, org.apache.thrift.TException;
 
@@ -139,7 +149,7 @@ public class Lucene {
       throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "openReadSession failed: unknown result");
     }
 
-    public TopFieldDocs search(Session session, QueryArgs queryArgs) throws BlurException, org.apache.thrift.TException
+    public List<TopFieldDocs> search(Session session, QueryArgs queryArgs) throws BlurException, org.apache.thrift.TException
     {
       send_search(session, queryArgs);
       return recv_search();
@@ -153,7 +163,7 @@ public class Lucene {
       sendBase("search", args);
     }
 
-    public TopFieldDocs recv_search() throws BlurException, org.apache.thrift.TException
+    public List<TopFieldDocs> recv_search() throws BlurException, org.apache.thrift.TException
     {
       search_result result = new search_result();
       receiveBase(result, "search");
@@ -465,7 +475,7 @@ public class Lucene {
         prot.writeMessageEnd();
       }
 
-      public TopFieldDocs getResult() throws BlurException, org.apache.thrift.TException {
+      public List<TopFieldDocs> getResult() throws BlurException, org.apache.thrift.TException {
         if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
           throw new IllegalStateException("Method call not finished!");
         }
@@ -798,7 +808,7 @@ public class Lucene {
 
   }
 
-  public static class Processor<I extends Iface> extends Blur.Processor implements org.apache.thrift.TProcessor {
+  public static class Processor<I extends Iface> extends Blur.Processor<I> implements org.apache.thrift.TProcessor {
     private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
     public Processor(I iface) {
       super(iface, getProcessMap(new HashMap<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>>()));
@@ -823,16 +833,20 @@ public class Lucene {
       return processMap;
     }
 
-    private static class openReadSession<I extends Iface> extends org.apache.thrift.ProcessFunction<I, openReadSession_args> {
+    public static class openReadSession<I extends Iface> extends org.apache.thrift.ProcessFunction<I, openReadSession_args> {
       public openReadSession() {
         super("openReadSession");
       }
 
-      protected openReadSession_args getEmptyArgsInstance() {
+      public openReadSession_args getEmptyArgsInstance() {
         return new openReadSession_args();
       }
 
-      protected openReadSession_result getResult(I iface, openReadSession_args args) throws org.apache.thrift.TException {
+      protected boolean isOneway() {
+        return false;
+      }
+
+      public openReadSession_result getResult(I iface, openReadSession_args args) throws org.apache.thrift.TException {
         openReadSession_result result = new openReadSession_result();
         try {
           result.success = iface.openReadSession(args.table);
@@ -843,16 +857,20 @@ public class Lucene {
       }
     }
 
-    private static class search<I extends Iface> extends org.apache.thrift.ProcessFunction<I, search_args> {
+    public static class search<I extends Iface> extends org.apache.thrift.ProcessFunction<I, search_args> {
       public search() {
         super("search");
       }
 
-      protected search_args getEmptyArgsInstance() {
+      public search_args getEmptyArgsInstance() {
         return new search_args();
       }
 
-      protected search_result getResult(I iface, search_args args) throws org.apache.thrift.TException {
+      protected boolean isOneway() {
+        return false;
+      }
+
+      public search_result getResult(I iface, search_args args) throws org.apache.thrift.TException {
         search_result result = new search_result();
         try {
           result.success = iface.search(args.session, args.queryArgs);
@@ -863,16 +881,20 @@ public class Lucene {
       }
     }
 
-    private static class doc<I extends Iface> extends org.apache.thrift.ProcessFunction<I, doc_args> {
+    public static class doc<I extends Iface> extends org.apache.thrift.ProcessFunction<I, doc_args> {
       public doc() {
         super("doc");
       }
 
-      protected doc_args getEmptyArgsInstance() {
+      public doc_args getEmptyArgsInstance() {
         return new doc_args();
       }
 
-      protected doc_result getResult(I iface, doc_args args) throws org.apache.thrift.TException {
+      protected boolean isOneway() {
+        return false;
+      }
+
+      public doc_result getResult(I iface, doc_args args) throws org.apache.thrift.TException {
         doc_result result = new doc_result();
         try {
           result.success = iface.doc(args.session, args.docLocations, args.fields);
@@ -883,16 +905,20 @@ public class Lucene {
       }
     }
 
-    private static class closeReadSession<I extends Iface> extends org.apache.thrift.ProcessFunction<I, closeReadSession_args> {
+    public static class closeReadSession<I extends Iface> extends org.apache.thrift.ProcessFunction<I, closeReadSession_args> {
       public closeReadSession() {
         super("closeReadSession");
       }
 
-      protected closeReadSession_args getEmptyArgsInstance() {
+      public closeReadSession_args getEmptyArgsInstance() {
         return new closeReadSession_args();
       }
 
-      protected closeReadSession_result getResult(I iface, closeReadSession_args args) throws org.apache.thrift.TException {
+      protected boolean isOneway() {
+        return false;
+      }
+
+      public closeReadSession_result getResult(I iface, closeReadSession_args args) throws org.apache.thrift.TException {
         closeReadSession_result result = new closeReadSession_result();
         try {
           iface.closeReadSession(args.session);
@@ -903,16 +929,20 @@ public class Lucene {
       }
     }
 
-    private static class openWriteSession<I extends Iface> extends org.apache.thrift.ProcessFunction<I, openWriteSession_args> {
+    public static class openWriteSession<I extends Iface> extends org.apache.thrift.ProcessFunction<I, openWriteSession_args> {
       public openWriteSession() {
         super("openWriteSession");
       }
 
-      protected openWriteSession_args getEmptyArgsInstance() {
+      public openWriteSession_args getEmptyArgsInstance() {
         return new openWriteSession_args();
       }
 
-      protected openWriteSession_result getResult(I iface, openWriteSession_args args) throws org.apache.thrift.TException {
+      protected boolean isOneway() {
+        return false;
+      }
+
+      public openWriteSession_result getResult(I iface, openWriteSession_args args) throws org.apache.thrift.TException {
         openWriteSession_result result = new openWriteSession_result();
         try {
           result.success = iface.openWriteSession(args.table);
@@ -923,16 +953,20 @@ public class Lucene {
       }
     }
 
-    private static class addDocuments<I extends Iface> extends org.apache.thrift.ProcessFunction<I, addDocuments_args> {
+    public static class addDocuments<I extends Iface> extends org.apache.thrift.ProcessFunction<I, addDocuments_args> {
       public addDocuments() {
         super("addDocuments");
       }
 
-      protected addDocuments_args getEmptyArgsInstance() {
+      public addDocuments_args getEmptyArgsInstance() {
         return new addDocuments_args();
       }
 
-      protected addDocuments_result getResult(I iface, addDocuments_args args) throws org.apache.thrift.TException {
+      protected boolean isOneway() {
+        return false;
+      }
+
+      public addDocuments_result getResult(I iface, addDocuments_args args) throws org.apache.thrift.TException {
         addDocuments_result result = new addDocuments_result();
         try {
           iface.addDocuments(args.session, args.shardIndex, args.document);
@@ -943,16 +977,20 @@ public class Lucene {
       }
     }
 
-    private static class deleteDocumentsByQueries<I extends Iface> extends org.apache.thrift.ProcessFunction<I, deleteDocumentsByQueries_args> {
+    public static class deleteDocumentsByQueries<I extends Iface> extends org.apache.thrift.ProcessFunction<I, deleteDocumentsByQueries_args> {
       public deleteDocumentsByQueries() {
         super("deleteDocumentsByQueries");
       }
 
-      protected deleteDocumentsByQueries_args getEmptyArgsInstance() {
+      public deleteDocumentsByQueries_args getEmptyArgsInstance() {
         return new deleteDocumentsByQueries_args();
       }
 
-      protected deleteDocumentsByQueries_result getResult(I iface, deleteDocumentsByQueries_args args) throws org.apache.thrift.TException {
+      protected boolean isOneway() {
+        return false;
+      }
+
+      public deleteDocumentsByQueries_result getResult(I iface, deleteDocumentsByQueries_args args) throws org.apache.thrift.TException {
         deleteDocumentsByQueries_result result = new deleteDocumentsByQueries_result();
         try {
           iface.deleteDocumentsByQueries(args.session, args.shardIndex, args.queries);
@@ -963,16 +1001,20 @@ public class Lucene {
       }
     }
 
-    private static class deleteDocuments<I extends Iface> extends org.apache.thrift.ProcessFunction<I, deleteDocuments_args> {
+    public static class deleteDocuments<I extends Iface> extends org.apache.thrift.ProcessFunction<I, deleteDocuments_args> {
       public deleteDocuments() {
         super("deleteDocuments");
       }
 
-      protected deleteDocuments_args getEmptyArgsInstance() {
+      public deleteDocuments_args getEmptyArgsInstance() {
         return new deleteDocuments_args();
       }
 
-      protected deleteDocuments_result getResult(I iface, deleteDocuments_args args) throws org.apache.thrift.TException {
+      protected boolean isOneway() {
+        return false;
+      }
+
+      public deleteDocuments_result getResult(I iface, deleteDocuments_args args) throws org.apache.thrift.TException {
         deleteDocuments_result result = new deleteDocuments_result();
         try {
           iface.deleteDocuments(args.session, args.shardIndex, args.terms);
@@ -983,16 +1025,20 @@ public class Lucene {
       }
     }
 
-    private static class updateDocuments<I extends Iface> extends org.apache.thrift.ProcessFunction<I, updateDocuments_args> {
+    public static class updateDocuments<I extends Iface> extends org.apache.thrift.ProcessFunction<I, updateDocuments_args> {
       public updateDocuments() {
         super("updateDocuments");
       }
 
-      protected updateDocuments_args getEmptyArgsInstance() {
+      public updateDocuments_args getEmptyArgsInstance() {
         return new updateDocuments_args();
       }
 
-      protected updateDocuments_result getResult(I iface, updateDocuments_args args) throws org.apache.thrift.TException {
+      protected boolean isOneway() {
+        return false;
+      }
+
+      public updateDocuments_result getResult(I iface, updateDocuments_args args) throws org.apache.thrift.TException {
         updateDocuments_result result = new updateDocuments_result();
         try {
           iface.updateDocuments(args.session, args.shardIndex, args.terms, args.document);
@@ -1003,16 +1049,20 @@ public class Lucene {
       }
     }
 
-    private static class commit<I extends Iface> extends org.apache.thrift.ProcessFunction<I, commit_args> {
+    public static class commit<I extends Iface> extends org.apache.thrift.ProcessFunction<I, commit_args> {
       public commit() {
         super("commit");
       }
 
-      protected commit_args getEmptyArgsInstance() {
+      public commit_args getEmptyArgsInstance() {
         return new commit_args();
       }
 
-      protected commit_result getResult(I iface, commit_args args) throws org.apache.thrift.TException {
+      protected boolean isOneway() {
+        return false;
+      }
+
+      public commit_result getResult(I iface, commit_args args) throws org.apache.thrift.TException {
         commit_result result = new commit_result();
         try {
           iface.commit(args.session);
@@ -1023,16 +1073,20 @@ public class Lucene {
       }
     }
 
-    private static class rollback<I extends Iface> extends org.apache.thrift.ProcessFunction<I, rollback_args> {
+    public static class rollback<I extends Iface> extends org.apache.thrift.ProcessFunction<I, rollback_args> {
       public rollback() {
         super("rollback");
       }
 
-      protected rollback_args getEmptyArgsInstance() {
+      public rollback_args getEmptyArgsInstance() {
         return new rollback_args();
       }
 
-      protected rollback_result getResult(I iface, rollback_args args) throws org.apache.thrift.TException {
+      protected boolean isOneway() {
+        return false;
+      }
+
+      public rollback_result getResult(I iface, rollback_args args) throws org.apache.thrift.TException {
         rollback_result result = new rollback_result();
         try {
           iface.rollback(args.session);
@@ -1050,6 +1104,12 @@ public class Lucene {
 
     private static final org.apache.thrift.protocol.TField TABLE_FIELD_DESC = new org.apache.thrift.protocol.TField("table", org.apache.thrift.protocol.TType.STRING, (short)1);
 
+    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+    static {
+      schemes.put(StandardScheme.class, new openReadSession_argsStandardSchemeFactory());
+      schemes.put(TupleScheme.class, new openReadSession_argsTupleSchemeFactory());
+    }
+
     public String table; // required
 
     /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
@@ -1111,7 +1171,6 @@ public class Lucene {
     }
 
     // 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);
@@ -1264,44 +1323,11 @@ public class Lucene {
     }
 
     public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
-      org.apache.thrift.protocol.TField field;
-      iprot.readStructBegin();
-      while (true)
-      {
-        field = iprot.readFieldBegin();
-        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
-          break;
-        }
-        switch (field.id) {
-          case 1: // TABLE
-            if (field.type == org.apache.thrift.protocol.TType.STRING) {
-              this.table = iprot.readString();
-            } else { 
-              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-            }
-            break;
-          default:
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-        }
-        iprot.readFieldEnd();
-      }
-      iprot.readStructEnd();
-
-      // check for required fields of primitive type, which can't be checked in the validate method
-      validate();
+      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
     }
 
     public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
-      validate();
-
-      oprot.writeStructBegin(STRUCT_DESC);
-      if (this.table != null) {
-        oprot.writeFieldBegin(TABLE_FIELD_DESC);
-        oprot.writeString(this.table);
-        oprot.writeFieldEnd();
-      }
-      oprot.writeFieldStop();
-      oprot.writeStructEnd();
+      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
     }
 
     @Override
@@ -1322,6 +1348,7 @@ public class Lucene {
 
     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 {
@@ -1340,6 +1367,90 @@ public class Lucene {
       }
     }
 
+    private static class openReadSession_argsStandardSchemeFactory implements SchemeFactory {
+      public openReadSession_argsStandardScheme getScheme() {
+        return new openReadSession_argsStandardScheme();
+      }
+    }
+
+    private static class openReadSession_argsStandardScheme extends StandardScheme<openReadSession_args> {
+
+      public void read(org.apache.thrift.protocol.TProtocol iprot, openReadSession_args 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: // TABLE
+              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+                struct.table = iprot.readString();
+                struct.setTableIsSet(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, openReadSession_args struct) throws org.apache.thrift.TException {
+        struct.validate();
+
+        oprot.writeStructBegin(STRUCT_DESC);
+        if (struct.table != null) {
+          oprot.writeFieldBegin(TABLE_FIELD_DESC);
+          oprot.writeString(struct.table);
+          oprot.writeFieldEnd();
+        }
+        oprot.writeFieldStop();
+        oprot.writeStructEnd();
+      }
+
+    }
+
+    private static class openReadSession_argsTupleSchemeFactory implements SchemeFactory {
+      public openReadSession_argsTupleScheme getScheme() {
+        return new openReadSession_argsTupleScheme();
+      }
+    }
+
+    private static class openReadSession_argsTupleScheme extends TupleScheme<openReadSession_args> {
+
+      @Override
+      public void write(org.apache.thrift.protocol.TProtocol prot, openReadSession_args struct) throws org.apache.thrift.TException {
+        TTupleProtocol oprot = (TTupleProtocol) prot;
+        BitSet optionals = new BitSet();
+        if (struct.isSetTable()) {
+          optionals.set(0);
+        }
+        oprot.writeBitSet(optionals, 1);
+        if (struct.isSetTable()) {
+          oprot.writeString(struct.table);
+        }
+      }
+
+      @Override
+      public void read(org.apache.thrift.protocol.TProtocol prot, openReadSession_args struct) throws org.apache.thrift.TException {
+        TTupleProtocol iprot = (TTupleProtocol) prot;
+        BitSet incoming = iprot.readBitSet(1);
+        if (incoming.get(0)) {
+          struct.table = iprot.readString();
+          struct.setTableIsSet(true);
+        }
+      }
+    }
+
   }
 
   public static class openReadSession_result implements org.apache.thrift.TBase<openReadSession_result, openReadSession_result._Fields>, java.io.Serializable, Cloneable   {
@@ -1348,6 +1459,12 @@ public class Lucene {
     private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0);
     private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1);
 
+    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+    static {
+      schemes.put(StandardScheme.class, new openReadSession_resultStandardSchemeFactory());
+      schemes.put(TupleScheme.class, new openReadSession_resultTupleSchemeFactory());
+    }
+
     public Session success; // required
     public BlurException e; // required
 
@@ -1413,7 +1530,6 @@ public class Lucene {
     }
 
     // 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);
@@ -1630,57 +1746,12 @@ public class Lucene {
     }
 
     public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
-      org.apache.thrift.protocol.TField field;
-      iprot.readStructBegin();
-      while (true)
-      {
-        field = iprot.readFieldBegin();
-        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
-          break;
-        }
-        switch (field.id) {
-          case 0: // SUCCESS
-            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
-              this.success = new Session();
-              this.success.read(iprot);
-            } else { 
-              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-            }
-            break;
-          case 1: // E
-            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
-              this.e = new BlurException();
-              this.e.read(iprot);
-            } else { 
-              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-            }
-            break;
-          default:
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-        }
-        iprot.readFieldEnd();
-      }
-      iprot.readStructEnd();
-
-      // check for required fields of primitive type, which can't be checked in the validate method
-      validate();
+      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
     }
 
     public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
-      oprot.writeStructBegin(STRUCT_DESC);
-
-      if (this.isSetSuccess()) {
-        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
-        this.success.write(oprot);
-        oprot.writeFieldEnd();
-      } else if (this.isSetE()) {
-        oprot.writeFieldBegin(E_FIELD_DESC);
-        this.e.write(oprot);
-        oprot.writeFieldEnd();
+      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
       }
-      oprot.writeFieldStop();
-      oprot.writeStructEnd();
-    }
 
     @Override
     public String toString() {
@@ -1708,6 +1779,10 @@ public class Lucene {
 
     public void validate() throws org.apache.thrift.TException {
       // check for required fields
+      // check for sub-struct validity
+      if (success != null) {
+        success.validate();
+      }
     }
 
     private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
@@ -1726,6 +1801,117 @@ public class Lucene {
       }
     }
 
+    private static class openReadSession_resultStandardSchemeFactory implements SchemeFactory {
+      public openReadSession_resultStandardScheme getScheme() {
+        return new openReadSession_resultStandardScheme();
+      }
+    }
+
+    private static class openReadSession_resultStandardScheme extends StandardScheme<openReadSession_result> {
+
+      public void read(org.apache.thrift.protocol.TProtocol iprot, openReadSession_result 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 0: // SUCCESS
+              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+                struct.success = new Session();
+                struct.success.read(iprot);
+                struct.setSuccessIsSet(true);
+              } else { 
+                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+              }
+              break;
+            case 1: // E
+              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+                struct.e = new BlurException();
+                struct.e.read(iprot);
+                struct.setEIsSet(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, openReadSession_result struct) throws org.apache.thrift.TException {
+        struct.validate();
+
+        oprot.writeStructBegin(STRUCT_DESC);
+        if (struct.success != null) {
+          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
+          struct.success.write(oprot);
+          oprot.writeFieldEnd();
+        }
+        if (struct.e != null) {
+          oprot.writeFieldBegin(E_FIELD_DESC);
+          struct.e.write(oprot);
+          oprot.writeFieldEnd();
+        }
+        oprot.writeFieldStop();
+        oprot.writeStructEnd();
+      }
+
+    }
+
+    private static class openReadSession_resultTupleSchemeFactory implements SchemeFactory {
+      public openReadSession_resultTupleScheme getScheme() {
+        return new openReadSession_resultTupleScheme();
+      }
+    }
+
+    private static class openReadSession_resultTupleScheme extends TupleScheme<openReadSession_result> {
+
+      @Override
+      public void write(org.apache.thrift.protocol.TProtocol prot, openReadSession_result struct) throws org.apache.thrift.TException {
+        TTupleProtocol oprot = (TTupleProtocol) prot;
+        BitSet optionals = new BitSet();
+        if (struct.isSetSuccess()) {
+          optionals.set(0);
+        }
+        if (struct.isSetE()) {
+          optionals.set(1);
+        }
+        oprot.writeBitSet(optionals, 2);
+        if (struct.isSetSuccess()) {
+          struct.success.write(oprot);
+        }
+        if (struct.isSetE()) {
+          struct.e.write(oprot);
+        }
+      }
+
+      @Override
+      public void read(org.apache.thrift.protocol.TProtocol prot, openReadSession_result struct) throws org.apache.thrift.TException {
+        TTupleProtocol iprot = (TTupleProtocol) prot;
+        BitSet incoming = iprot.readBitSet(2);
+        if (incoming.get(0)) {
+          struct.success = new Session();
+          struct.success.read(iprot);
+          struct.setSuccessIsSet(true);
+        }
+        if (incoming.get(1)) {
+          struct.e = new BlurException();
+          struct.e.read(iprot);
+          struct.setEIsSet(true);
+        }
+      }
+    }
+
   }
 
   public static class search_args implements org.apache.thrift.TBase<search_args, search_args._Fields>, java.io.Serializable, Cloneable   {
@@ -1734,6 +1920,12 @@ public class Lucene {
     private static final org.apache.thrift.protocol.TField SESSION_FIELD_DESC = new org.apache.thrift.protocol.TField("session", org.apache.thrift.protocol.TType.STRUCT, (short)1);
     private static final org.apache.thrift.protocol.TField QUERY_ARGS_FIELD_DESC = new org.apache.thrift.protocol.TField("queryArgs", org.apache.thrift.protocol.TType.STRUCT, (short)2);
 
+    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+    static {
+      schemes.put(StandardScheme.class, new search_argsStandardSchemeFactory());
+      schemes.put(TupleScheme.class, new search_argsTupleSchemeFactory());
+    }
+
     public Session session; // required
     public QueryArgs queryArgs; // required
 
@@ -1799,7 +1991,6 @@ public class Lucene {
     }
 
     // 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);
@@ -2016,58 +2207,11 @@ public class Lucene {
     }
 
     public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
-      org.apache.thrift.protocol.TField field;
-      iprot.readStructBegin();
-      while (true)
-      {
-        field = iprot.readFieldBegin();
-        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
-          break;
-        }
-        switch (field.id) {
-          case 1: // SESSION
-            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
-              this.session = new Session();
-              this.session.read(iprot);
-            } else { 
-              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-            }
-            break;
-          case 2: // QUERY_ARGS
-            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
-              this.queryArgs = new QueryArgs();
-              this.queryArgs.read(iprot);
-            } else { 
-              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-            }
-            break;
-          default:
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-        }
-        iprot.readFieldEnd();
-      }
-      iprot.readStructEnd();
-
-      // check for required fields of primitive type, which can't be checked in the validate method
-      validate();
+      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
     }
 
     public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
-      validate();
-
-      oprot.writeStructBegin(STRUCT_DESC);
-      if (this.session != null) {
-        oprot.writeFieldBegin(SESSION_FIELD_DESC);
-        this.session.write(oprot);
-        oprot.writeFieldEnd();
-      }
-      if (this.queryArgs != null) {
-        oprot.writeFieldBegin(QUERY_ARGS_FIELD_DESC);
-        this.queryArgs.write(oprot);
-        oprot.writeFieldEnd();
-      }
-      oprot.writeFieldStop();
-      oprot.writeStructEnd();
+      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
     }
 
     @Override
@@ -2096,6 +2240,13 @@ public class Lucene {
 
     public void validate() throws org.apache.thrift.TException {
       // check for required fields
+      // check for sub-struct validity
+      if (session != null) {
+        session.validate();
+      }
+      if (queryArgs != null) {
+        queryArgs.validate();
+      }
     }
 
     private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
@@ -2114,15 +2265,132 @@ public class Lucene {
       }
     }
 
+    private static class search_argsStandardSchemeFactory implements SchemeFactory {
+      public search_argsStandardScheme getScheme() {
+        return new search_argsStandardScheme();
+      }
+    }
+
+    private static class search_argsStandardScheme extends StandardScheme<search_args> {
+
+      public void read(org.apache.thrift.protocol.TProtocol iprot, search_args 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: // SESSION
+              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+                struct.session = new Session();
+                struct.session.read(iprot);
+                struct.setSessionIsSet(true);
+              } else { 
+                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+              }
+              break;
+            case 2: // QUERY_ARGS
+              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+                struct.queryArgs = new QueryArgs();
+                struct.queryArgs.read(iprot);
+                struct.setQueryArgsIsSet(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, search_args struct) throws org.apache.thrift.TException {
+        struct.validate();
+
+        oprot.writeStructBegin(STRUCT_DESC);
+        if (struct.session != null) {
+          oprot.writeFieldBegin(SESSION_FIELD_DESC);
+          struct.session.write(oprot);
+          oprot.writeFieldEnd();
+        }
+        if (struct.queryArgs != null) {
+          oprot.writeFieldBegin(QUERY_ARGS_FIELD_DESC);
+          struct.queryArgs.write(oprot);
+          oprot.writeFieldEnd();
+        }
+        oprot.writeFieldStop();
+        oprot.writeStructEnd();
+      }
+
+    }
+
+    private static class search_argsTupleSchemeFactory implements SchemeFactory {
+      public search_argsTupleScheme getScheme() {
+        return new search_argsTupleScheme();
+      }
+    }
+
+    private static class search_argsTupleScheme extends TupleScheme<search_args> {
+
+      @Override
+      public void write(org.apache.thrift.protocol.TProtocol prot, search_args struct) throws org.apache.thrift.TException {
+        TTupleProtocol oprot = (TTupleProtocol) prot;
+        BitSet optionals = new BitSet();
+        if (struct.isSetSession()) {
+          optionals.set(0);
+        }
+        if (struct.isSetQueryArgs()) {
+          optionals.set(1);
+        }
+        oprot.writeBitSet(optionals, 2);
+        if (struct.isSetSession()) {
+          struct.session.write(oprot);
+        }
+        if (struct.isSetQueryArgs()) {
+          struct.queryArgs.write(oprot);
+        }
+      }
+
+      @Override
+      public void read(org.apache.thrift.protocol.TProtocol prot, search_args struct) throws org.apache.thrift.TException {
+        TTupleProtocol iprot = (TTupleProtocol) prot;
+        BitSet incoming = iprot.readBitSet(2);
+        if (incoming.get(0)) {
+          struct.session = new Session();
+          struct.session.read(iprot);
+          struct.setSessionIsSet(true);
+        }
+        if (incoming.get(1)) {
+          struct.queryArgs = new QueryArgs();
+          struct.queryArgs.read(iprot);
+          struct.setQueryArgsIsSet(true);
+        }
+      }
+    }
+
   }
 
   public static class search_result implements org.apache.thrift.TBase<search_result, search_result._Fields>, java.io.Serializable, Cloneable   {
     private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("search_result");
 
-    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0);
+    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0);
     private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1);
 
-    public TopFieldDocs success; // required
+    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+    static {
+      schemes.put(StandardScheme.class, new search_resultStandardSchemeFactory());
+      schemes.put(TupleScheme.class, new search_resultTupleSchemeFactory());
+    }
+
+    public List<TopFieldDocs> success; // required
     public BlurException e; // required
 
     /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
@@ -2187,12 +2455,12 @@ public class Lucene {
     }
 
     // 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TopFieldDocs.class)));
+          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, TopFieldDocs.class))));
       tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
           new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
       metaDataMap = Collections.unmodifiableMap(tmpMap);
@@ -2203,7 +2471,7 @@ public class Lucene {
     }
 
     public search_result(
-      TopFieldDocs success,
+      List<TopFieldDocs> success,
       BlurException e)
     {
       this();
@@ -2216,7 +2484,11 @@ public class Lucene {
      */
     public search_result(search_result other) {
       if (other.isSetSuccess()) {
-        this.success = new TopFieldDocs(other.success);
+        List<TopFieldDocs> __this__success = new ArrayList<TopFieldDocs>();
+        for (TopFieldDocs other_element : other.success) {
+          __this__success.add(new TopFieldDocs(other_element));
+        }
+        this.success = __this__success;
       }
       if (other.isSetE()) {
         this.e = new BlurException(other.e);
@@ -2233,11 +2505,26 @@ public class Lucene {
       this.e = null;
     }
 
-    public TopFieldDocs getSuccess() {
+    public int getSuccessSize() {
+      return (this.success == null) ? 0 : this.success.size();
+    }
+
+    public java.util.Iterator<TopFieldDocs> getSuccessIterator() {
+      return (this.success == null) ? null : this.success.iterator();
+    }
+
+    public void addToSuccess(TopFieldDocs elem) {
+      if (this.success == null) {
+        this.success = new ArrayList<TopFieldDocs>();
+      }
+      this.success.add(elem);
+    }
+
+    public List<TopFieldDocs> getSuccess() {
       return this.success;
     }
 
-    public search_result setSuccess(TopFieldDocs success) {
+    public search_result setSuccess(List<TopFieldDocs> success) {
       this.success = success;
       return this;
     }
@@ -2287,7 +2574,7 @@ public class Lucene {
         if (value == null) {
           unsetSuccess();
         } else {
-          setSuccess((TopFieldDocs)value);
+          setSuccess((List<TopFieldDocs>)value);
         }
         break;
 
@@ -2404,57 +2691,12 @@ public class Lucene {
     }
 
     public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
-      org.apache.thrift.protocol.TField field;
-      iprot.readStructBegin();
-      while (true)
-      {
-        field = iprot.readFieldBegin();
-        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
-          break;
-        }
-        switch (field.id) {
-          case 0: // SUCCESS
-            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
-              this.success = new TopFieldDocs();
-              this.success.read(iprot);
-            } else { 
-              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-            }
-            break;
-          case 1: // E
-            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
-              this.e = new BlurException();
-              this.e.read(iprot);
-            } else { 
-              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-            }
-            break;
-          default:
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-        }
-        iprot.readFieldEnd();
-      }
-      iprot.readStructEnd();
-
-      // check for required fields of primitive type, which can't be checked in the validate method
-      validate();
+      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
     }
 
     public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
-      oprot.writeStructBegin(STRUCT_DESC);
-
-      if (this.isSetSuccess()) {
-        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
-        this.success.write(oprot);
-        oprot.writeFieldEnd();
-      } else if (this.isSetE()) {
-        oprot.writeFieldBegin(E_FIELD_DESC);
-        this.e.write(oprot);
-        oprot.writeFieldEnd();
+      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
       }
-      oprot.writeFieldStop();
-      oprot.writeStructEnd();
-    }
 
     @Override
     public String toString() {
@@ -2482,6 +2724,7 @@ public class Lucene {
 
     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 {
@@ -2500,29 +2743,178 @@ public class Lucene {
       }
     }
 
-  }
-
-  public static class doc_args implements org.apache.thrift.TBase<doc_args, doc_args._Fields>, java.io.Serializable, Cloneable   {
-    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("doc_args");
+    private static class search_resultStandardSchemeFactory implements SchemeFactory {
+      public search_resultStandardScheme getScheme() {
+        return new search_resultStandardScheme();
+      }
+    }
 
-    private static final org.apache.thrift.protocol.TField SESSION_FIELD_DESC = new org.apache.thrift.protocol.TField("session", org.apache.thrift.protocol.TType.STRUCT, (short)1);
-    private static final org.apache.thrift.protocol.TField DOC_LOCATIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("docLocations", org.apache.thrift.protocol.TType.LIST, (short)2);
-    private static final org.apache.thrift.protocol.TField FIELDS_FIELD_DESC = new org.apache.thrift.protocol.TField("fields", org.apache.thrift.protocol.TType.SET, (short)4);
+    private static class search_resultStandardScheme extends StandardScheme<search_result> {
 
-    public Session session; // required
-    public List<DocLocation> docLocations; // required
-    public Set<String> fields; // required
+      public void read(org.apache.thrift.protocol.TProtocol iprot, search_result 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 0: // SUCCESS
+              if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
+                {
+                  org.apache.thrift.protocol.TList _list316 = iprot.readListBegin();
+                  struct.success = new ArrayList<TopFieldDocs>(_list316.size);
+                  for (int _i317 = 0; _i317 < _list316.size; ++_i317)
+                  {
+                    TopFieldDocs _elem318; // required
+                    _elem318 = new TopFieldDocs();
+                    _elem318.read(iprot);
+                    struct.success.add(_elem318);
+                  }
+                  iprot.readListEnd();
+                }
+                struct.setSuccessIsSet(true);
+              } else { 
+                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+              }
+              break;
+            case 1: // E
+              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+                struct.e = new BlurException();
+                struct.e.read(iprot);
+                struct.setEIsSet(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();
 
-    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-      SESSION((short)1, "session"),
-      DOC_LOCATIONS((short)2, "docLocations"),
-      FIELDS((short)4, "fields");
+        // check for required fields of primitive type, which can't be checked in the validate method
+        struct.validate();
+      }
 
-      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+      public void write(org.apache.thrift.protocol.TProtocol oprot, search_result struct) throws org.apache.thrift.TException {
+        struct.validate();
 
-      static {
-        for (_Fields field : EnumSet.allOf(_Fields.class)) {
+        oprot.writeStructBegin(STRUCT_DESC);
+        if (struct.success != null) {
+          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
+          {
+            oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size()));
+            for (TopFieldDocs _iter319 : struct.success)
+            {
+              _iter319.write(oprot);
+            }
+            oprot.writeListEnd();
+          }
+          oprot.writeFieldEnd();
+        }
+        if (struct.e != null) {
+          oprot.writeFieldBegin(E_FIELD_DESC);
+          struct.e.write(oprot);
+          oprot.writeFieldEnd();
+        }
+        oprot.writeFieldStop();
+        oprot.writeStructEnd();
+      }
+
+    }
+
+    private static class search_resultTupleSchemeFactory implements SchemeFactory {
+      public search_resultTupleScheme getScheme() {
+        return new search_resultTupleScheme();
+      }
+    }
+
+    private static class search_resultTupleScheme extends TupleScheme<search_result> {
+
+      @Override
+      public void write(org.apache.thrift.protocol.TProtocol prot, search_result struct) throws org.apache.thrift.TException {
+        TTupleProtocol oprot = (TTupleProtocol) prot;
+        BitSet optionals = new BitSet();
+        if (struct.isSetSuccess()) {
+          optionals.set(0);
+        }
+        if (struct.isSetE()) {
+          optionals.set(1);
+        }
+        oprot.writeBitSet(optionals, 2);
+        if (struct.isSetSuccess()) {
+          {
+            oprot.writeI32(struct.success.size());
+            for (TopFieldDocs _iter320 : struct.success)
+            {
+              _iter320.write(oprot);
+            }
+          }
+        }
+        if (struct.isSetE()) {
+          struct.e.write(oprot);
+        }
+      }
+
+      @Override
+      public void read(org.apache.thrift.protocol.TProtocol prot, search_result struct) throws org.apache.thrift.TException {
+        TTupleProtocol iprot = (TTupleProtocol) prot;
+        BitSet incoming = iprot.readBitSet(2);
+        if (incoming.get(0)) {
+          {
+            org.apache.thrift.protocol.TList _list321 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+            struct.success = new ArrayList<TopFieldDocs>(_list321.size);
+            for (int _i322 = 0; _i322 < _list321.size; ++_i322)
+            {
+              TopFieldDocs _elem323; // required
+              _elem323 = new TopFieldDocs();
+              _elem323.read(iprot);
+              struct.success.add(_elem323);
+            }
+          }
+          struct.setSuccessIsSet(true);
+        }
+        if (incoming.get(1)) {
+          struct.e = new BlurException();
+          struct.e.read(iprot);
+          struct.setEIsSet(true);
+        }
+      }
+    }
+
+  }
+
+  public static class doc_args implements org.apache.thrift.TBase<doc_args, doc_args._Fields>, java.io.Serializable, Cloneable   {
+    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("doc_args");
+
+    private static final org.apache.thrift.protocol.TField SESSION_FIELD_DESC = new org.apache.thrift.protocol.TField("session", org.apache.thrift.protocol.TType.STRUCT, (short)1);
+    private static final org.apache.thrift.protocol.TField DOC_LOCATIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("docLocations", org.apache.thrift.protocol.TType.LIST, (short)2);
+    private static final org.apache.thrift.protocol.TField FIELDS_FIELD_DESC = new org.apache.thrift.protocol.TField("fields", org.apache.thrift.protocol.TType.SET, (short)4);
+
+    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+    static {
+      schemes.put(StandardScheme.class, new doc_argsStandardSchemeFactory());
+      schemes.put(TupleScheme.class, new doc_argsTupleSchemeFactory());
+    }
+
+    public Session session; // required
+    public List<DocLocation> docLocations; // required
+    public Set<String> 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 {
+      SESSION((short)1, "session"),
+      DOC_LOCATIONS((short)2, "docLocations"),
+      FIELDS((short)4, "fields");
+
+      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+      static {
+        for (_Fields field : EnumSet.allOf(_Fields.class)) {
           byName.put(field.getFieldName(), field);
         }
       }
@@ -2578,7 +2970,6 @@ public class Lucene {
     }
 
     // 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);
@@ -2899,104 +3290,11 @@ public class Lucene {
     }
 
     public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
-      org.apache.thrift.protocol.TField field;
-      iprot.readStructBegin();
-      while (true)
-      {
-        field = iprot.readFieldBegin();
-        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
-          break;
-        }
-        switch (field.id) {
-          case 1: // SESSION
-            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
-              this.session = new Session();
-              this.session.read(iprot);
-            } else { 
-              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-            }
-            break;
-          case 2: // DOC_LOCATIONS
-            if (field.type == org.apache.thrift.protocol.TType.LIST) {
-              {
-                org.apache.thrift.protocol.TList _list158 = iprot.readListBegin();
-                this.docLocations = new ArrayList<DocLocation>(_list158.size);
-                for (int _i159 = 0; _i159 < _list158.size; ++_i159)
-                {
-                  DocLocation _elem160; // required
-                  _elem160 = new DocLocation();
-                  _elem160.read(iprot);
-                  this.docLocations.add(_elem160);
-                }
-                iprot.readListEnd();
-              }
-            } else { 
-              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-            }
-            break;
-          case 4: // FIELDS
-            if (field.type == org.apache.thrift.protocol.TType.SET) {
-              {
-                org.apache.thrift.protocol.TSet _set161 = iprot.readSetBegin();
-                this.fields = new HashSet<String>(2*_set161.size);
-                for (int _i162 = 0; _i162 < _set161.size; ++_i162)
-                {
-                  String _elem163; // required
-                  _elem163 = iprot.readString();
-                  this.fields.add(_elem163);
-                }
-                iprot.readSetEnd();
-              }
-            } else { 
-              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-            }
-            break;
-          default:
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-        }
-        iprot.readFieldEnd();
-      }
-      iprot.readStructEnd();
-
-      // check for required fields of primitive type, which can't be checked in the validate method
-      validate();
+      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
     }
 
     public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
-      validate();
-
-      oprot.writeStructBegin(STRUCT_DESC);
-      if (this.session != null) {
-        oprot.writeFieldBegin(SESSION_FIELD_DESC);
-        this.session.write(oprot);
-        oprot.writeFieldEnd();
-      }
-      if (this.docLocations != null) {
-        oprot.writeFieldBegin(DOC_LOCATIONS_FIELD_DESC);
-        {
-          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.docLocations.size()));
-          for (DocLocation _iter164 : this.docLocations)
-          {
-            _iter164.write(oprot);
-          }
-          oprot.writeListEnd();
-        }
-        oprot.writeFieldEnd();
-      }
-      if (this.fields != null) {
-        oprot.writeFieldBegin(FIELDS_FIELD_DESC);
-        {
-          oprot.writeSetBegin(new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRING, this.fields.size()));
-          for (String _iter165 : this.fields)
-          {
-            oprot.writeString(_iter165);
-          }
-          oprot.writeSetEnd();
-        }
-        oprot.writeFieldEnd();
-      }
-      oprot.writeFieldStop();
-      oprot.writeStructEnd();
+      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
     }
 
     @Override
@@ -3033,6 +3331,10 @@ public class Lucene {
 
     public void validate() throws org.apache.thrift.TException {
       // check for required fields
+      // check for sub-struct validity
+      if (session != null) {
+        session.validate();
+      }
     }
 
     private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
@@ -3051,6 +3353,204 @@ public class Lucene {
       }
     }
 
+    private static class doc_argsStandardSchemeFactory implements SchemeFactory {
+      public doc_argsStandardScheme getScheme() {
+        return new doc_argsStandardScheme();
+      }
+    }
+
+    private static class doc_argsStandardScheme extends StandardScheme<doc_args> {
+
+      public void read(org.apache.thrift.protocol.TProtocol iprot, doc_args 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: // SESSION
+              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+                struct.session = new Session();
+                struct.session.read(iprot);
+                struct.setSessionIsSet(true);
+              } else { 
+                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+              }
+              break;
+            case 2: // DOC_LOCATIONS
+              if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
+                {
+                  org.apache.thrift.protocol.TList _list324 = iprot.readListBegin();
+                  struct.docLocations = new ArrayList<DocLocation>(_list324.size);
+                  for (int _i325 = 0; _i325 < _list324.size; ++_i325)
+                  {
+                    DocLocation _elem326; // required
+                    _elem326 = new DocLocation();
+                    _elem326.read(iprot);
+                    struct.docLocations.add(_elem326);
+                  }
+                  iprot.readListEnd();
+                }
+                struct.setDocLocationsIsSet(true);
+              } else { 
+                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+              }
+              break;
+            case 4: // FIELDS
+              if (schemeField.type == org.apache.thrift.protocol.TType.SET) {
+                {
+                  org.apache.thrift.protocol.TSet _set327 = iprot.readSetBegin();
+                  struct.fields = new HashSet<String>(2*_set327.size);
+                  for (int _i328 = 0; _i328 < _set327.size; ++_i328)
+                  {
+                    String _elem329; // required
+                    _elem329 = iprot.readString();
+                    struct.fields.add(_elem329);
+                  }
+                  iprot.readSetEnd();
+                }
+                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, doc_args struct) throws org.apache.thrift.TException {
+        struct.validate();
+
+        oprot.writeStructBegin(STRUCT_DESC);
+        if (struct.session != null) {
+          oprot.writeFieldBegin(SESSION_FIELD_DESC);
+          struct.session.write(oprot);
+          oprot.writeFieldEnd();
+        }
+        if (struct.docLocations != null) {
+          oprot.writeFieldBegin(DOC_LOCATIONS_FIELD_DESC);
+          {
+            oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.docLocations.size()));
+            for (DocLocation _iter330 : struct.docLocations)
+            {
+              _iter330.write(oprot);
+            }
+            oprot.writeListEnd();
+          }
+          oprot.writeFieldEnd();
+        }
+        if (struct.fields != null) {
+          oprot.writeFieldBegin(FIELDS_FIELD_DESC);
+          {
+            oprot.writeSetBegin(new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRING, struct.fields.size()));
+            for (String _iter331 : struct.fields)
+            {
+              oprot.writeString(_iter331);
+            }
+            oprot.writeSetEnd();
+          }
+          oprot.writeFieldEnd();
+        }
+        oprot.writeFieldStop();
+        oprot.writeStructEnd();
+      }
+
+    }
+
+    private static class doc_argsTupleSchemeFactory implements SchemeFactory {
+      public doc_argsTupleScheme getScheme() {
+        return new doc_argsTupleScheme();
+      }
+    }
+
+    private static class doc_argsTupleScheme extends TupleScheme<doc_args> {
+
+      @Override
+      public void write(org.apache.thrift.protocol.TProtocol prot, doc_args struct) throws org.apache.thrift.TException {
+        TTupleProtocol oprot = (TTupleProtocol) prot;
+        BitSet optionals = new BitSet();
+        if (struct.isSetSession()) {
+          optionals.set(0);
+        }
+        if (struct.isSetDocLocations()) {
+          optionals.set(1);
+        }
+        if (struct.isSetFields()) {
+          optionals.set(2);
+        }
+        oprot.writeBitSet(optionals, 3);
+        if (struct.isSetSession()) {
+          struct.session.write(oprot);
+        }
+        if (struct.isSetDocLocations()) {
+          {
+            oprot.writeI32(struct.docLocations.size());
+            for (DocLocation _iter332 : struct.docLocations)
+            {
+              _iter332.write(oprot);
+            }
+          }
+        }
+        if (struct.isSetFields()) {
+          {
+            oprot.writeI32(struct.fields.size());
+            for (String _iter333 : struct.fields)
+            {
+              oprot.writeString(_iter333);
+            }
+          }
+        }
+      }
+
+      @Override
+      public void read(org.apache.thrift.protocol.TProtocol prot, doc_args struct) throws org.apache.thrift.TException {
+        TTupleProtocol iprot = (TTupleProtocol) prot;
+        BitSet incoming = iprot.readBitSet(3);
+        if (incoming.get(0)) {
+          struct.session = new Session();
+          struct.session.read(iprot);
+          struct.setSessionIsSet(true);
+        }
+        if (incoming.get(1)) {
+          {
+            org.apache.thrift.protocol.TList _list334 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+            struct.docLocations = new ArrayList<DocLocation>(_list334.size);
+            for (int _i335 = 0; _i335 < _list334.size; ++_i335)
+            {
+              DocLocation _elem336; // required
+              _elem336 = new DocLocation();
+              _elem336.read(iprot);
+              struct.docLocations.add(_elem336);
+            }
+          }
+          struct.setDocLocationsIsSet(true);
+        }
+        if (incoming.get(2)) {
+          {
+            org.apache.thrift.protocol.TSet _set337 = new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+            struct.fields = new HashSet<String>(2*_set337.size);
+            for (int _i338 = 0; _i338 < _set337.size; ++_i338)
+            {
+              String _elem339; // required
+              _elem339 = iprot.readString();
+              struct.fields.add(_elem339);
+            }
+          }
+          struct.setFieldsIsSet(true);
+        }
+      }
+    }
+
   }
 
   public static class doc_result implements org.apache.thrift.TBase<doc_result, doc_result._Fields>, java.io.Serializable, Cloneable   {
@@ -3059,6 +3559,12 @@ public class Lucene {
     private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0);
     private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1);
 
+    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+    static {
+      schemes.put(StandardScheme.class, new doc_resultStandardSchemeFactory());
+      schemes.put(TupleScheme.class, new doc_resultTupleSchemeFactory());
+    }
+
     public List<Document> success; // required
     public BlurException e; // required
 
@@ -3124,7 +3630,6 @@ public class Lucene {
     }
 
     // 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);
@@ -3361,74 +3866,12 @@ public class Lucene {
     }
 
     public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
-      org.apache.thrift.protocol.TField field;
-      iprot.readStructBegin();
-      while (true)
-      {
-        field = iprot.readFieldBegin();
-        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
-          break;
-        }
-        switch (field.id) {
-          case 0: // SUCCESS
-            if (field.type == org.apache.thrift.protocol.TType.LIST) {
-              {
-                org.apache.thrift.protocol.TList _list166 = iprot.readListBegin();
-                this.success = new ArrayList<Document>(_list166.size);
-                for (int _i167 = 0; _i167 < _list166.size; ++_i167)
-                {
-                  Document _elem168; // required
-                  _elem168 = new Document();
-                  _elem168.read(iprot);
-                  this.success.add(_elem168);
-                }
-                iprot.readListEnd();
-              }
-            } else { 
-              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-            }
-            break;
-          case 1: // E
-            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
-              this.e = new BlurException();
-              this.e.read(iprot);
-            } else { 
-              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-            }
-            break;
-          default:
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-        }
-        iprot.readFieldEnd();
-      }
-      iprot.readStructEnd();
-
-      // check for required fields of primitive type, which can't be checked in the validate method
-      validate();
+      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
     }
 
     public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
-      oprot.writeStructBegin(STRUCT_DESC);
-
-      if (this.isSetSuccess()) {
-        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
-        {
-          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
-          for (Document _iter169 : this.success)
-          {
-            _iter169.write(oprot);
-          }
-          oprot.writeListEnd();
-        }
-        oprot.writeFieldEnd();
-      } else if (this.isSetE()) {
-        oprot.writeFieldBegin(E_FIELD_DESC);
-        this.e.write(oprot);
-        oprot.writeFieldEnd();
+      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
       }
-      oprot.writeFieldStop();
-      oprot.writeStructEnd();
-    }
 
     @Override
     public String toString() {
@@ -3456,6 +3899,7 @@ public class Lucene {
 
     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 {
@@ -3474,6 +3918,149 @@ public class Lucene {
       }
     }
 
+    private static class doc_resultStandardSchemeFactory implements SchemeFactory {
+      public doc_resultStandardScheme getScheme() {
+        return new doc_resultStandardScheme();
+      }
+    }
+
+    private static class doc_resultStandardScheme extends StandardScheme<doc_result> {
+
+      public void read(org.apache.thrift.protocol.TProtocol iprot, doc_result 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 0: // SUCCESS
+              if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
+                {
+                  org.apache.thrift.protocol.TList _list340 = iprot.readListBegin();
+                  struct.success = new ArrayList<Document>(_list340.size);
+                  for (int _i341 = 0; _i341 < _list340.size; ++_i341)
+                  {
+                    Document _elem342; // required
+                    _elem342 = new Document();
+                    _elem342.read(iprot);
+                    struct.success.add(_elem342);
+                  }
+                  iprot.readListEnd();
+                }
+                struct.setSuccessIsSet(true);
+              } else { 
+                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+              }
+              break;
+            case 1: // E
+              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+                struct.e = new BlurException();
+                struct.e.read(iprot);
+                struct.setEIsSet(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, doc_result struct) throws org.apache.thrift.TException {
+        struct.validate();
+
+        oprot.writeStructBegin(STRUCT_DESC);
+        if (struct.success != null) {
+          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
+          {
+            oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size()));
+            for (Document _iter343 : struct.success)
+            {
+              _iter343.write(oprot);
+            }
+            oprot.writeListEnd();
+          }
+          oprot.writeFieldEnd();
+        }
+        if (struct.e != null) {
+          oprot.writeFieldBegin(E_FIELD_DESC);
+          struct.e.write(oprot);
+          oprot.writeFieldEnd();
+        }
+        oprot.writeFieldStop();
+        oprot.writeStructEnd();
+      }
+
+    }
+
+    private static class doc_resultTupleSchemeFactory implements SchemeFactory {
+      public doc_resultTupleScheme getScheme() {
+        return new doc_resultTupleScheme();
+      }
+    }
+
+    private static class doc_resultTupleScheme extends TupleScheme<doc_result> {
+
+      @Override
+      public void write(org.apache.thrift.protocol.TProtocol prot, doc_result struct) throws org.apache.thrift.TException {
+        TTupleProtocol oprot = (TTupleProtocol) prot;
+        BitSet optionals = new BitSet();
+        if (struct.isSetSuccess()) {
+          optionals.set(0);
+        }
+        if (struct.isSetE()) {
+          optionals.set(1);
+        }
+        oprot.writeBitSet(optionals, 2);
+        if (struct.isSetSuccess()) {
+          {
+            oprot.writeI32(struct.success.size());
+            for (Document _iter344 : struct.success)
+            {
+              _iter344.write(oprot);
+            }
+          }
+        }
+        if (struct.isSetE()) {
+          struct.e.write(oprot);
+        }
+      }
+
+      @Override
+      public void read(org.apache.thrift.protocol.TProtocol prot, doc_result struct) throws org.apache.thrift.TException {
+        TTupleProtocol iprot = (TTupleProtocol) prot;
+        BitSet incoming = iprot.readBitSet(2);
+        if (incoming.get(0)) {
+          {
+            org.apache.thrift.protocol.TList _list345 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+            struct.success = new ArrayList<Document>(_list345.size);
+            for (int _i346 = 0; _i346 < _list345.size; ++_i346)
+            {
+              Document _elem347; // required
+              _elem347 = new Document();
+              _elem347.read(iprot);
+              struct.success.add(_elem347);
+            }
+          }
+          struct.setSuccessIsSet(true);
+        }
+        if (incoming.get(1)) {
+          struct.e = new BlurException();
+          struct.e.read(iprot);
+          struct.setEIsSet(true);
+        }
+      }
+    }
+
   }
 
   public static class closeReadSession_args implements org.apache.thrift.TBase<closeReadSession_args, closeReadSession_args._Fields>, java.io.Serializable, Cloneable   {
@@ -3481,6 +4068,12 @@ public class Lucene {
 
     private static final org.apache.thrift.protocol.TField SESSION_FIELD_DESC = new org.apache.thrift.protocol.TField("session", org.apache.thrift.protocol.TType.STRUCT, (short)1);
 
+    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+    static {
+      schemes.put(StandardScheme.class, new closeReadSession_argsStandardSchemeFactory());
+      schemes.put(TupleScheme.class, new closeReadSession_argsTupleSchemeFactory());
+    }
+
     public Session session; // required
 
     /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
@@ -3542,7 +4135,6 @@ public class Lucene {
     }
 
     // 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);
@@ -3695,45 +4287,11 @@ public class Lucene {
     }
 
     public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
-      org.apache.thrift.protocol.TField field;
-      iprot.readStructBegin();
-      while (true)
-      {
-        field = iprot.readFieldBegin();
-        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
-          break;
-        }
-        switch (field.id) {
-          case 1: // SESSION
-            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
-              this.session = new Session();
-              this.session.read(iprot);
-            } else { 
-              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-            }
-            break;
-          default:
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-        }
-        iprot.readFieldEnd();
-      }
-      iprot.readStructEnd();
-
-      // check for required fields of primitive type, which can't be checked in the validate method
-      validate();
+      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
     }
 
     public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
-      validate();
-
-      oprot.writeStructBegin(STRUCT_DESC);
-      if (this.session != null) {
-        oprot.writeFieldBegin(SESSION_FIELD_DESC);
-        this.session.write(oprot);
-        oprot.writeFieldEnd();
-      }
-      oprot.writeFieldStop();
-      oprot.writeStructEnd();
+      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
     }
 
     @Override
@@ -3754,6 +4312,10 @@ public class Lucene {
 
     public void validate() throws org.apache.thrift.TException {
       // check for required fields
+      // check for sub-struct validity
+      if (session != null) {
+        session.validate();
+      }
     }
 
     private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
@@ -3772,6 +4334,92 @@ public class Lucene {
       }
     }
 
+    private static class closeReadSession_argsStandardSchemeFactory implements SchemeFactory {
+      public closeReadSession_argsStandardScheme getScheme() {
+        return new closeReadSession_argsStandardScheme();
+      }
+    }
+
+    private static class closeReadSession_argsStandardScheme extends StandardScheme<closeReadSession_args> {
+
+      public void read(org.apache.thrift.protocol.TProtocol iprot, closeReadSession_args 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: // SESSION
+              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+                struct.session = new Session();
+                struct.session.read(iprot);
+                struct.setSessionIsSet(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, closeReadSession_args struct) throws org.apache.thrift.TException {
+        struct.validate();
+
+        oprot.writeStructBegin(STRUCT_DESC);
+        if (struct.session != null) {
+          oprot.writeFieldBegin(SESSION_FIELD_DESC);
+          struct.session.write(oprot);
+          oprot.writeFieldEnd();
+        }
+        oprot.writeFieldStop();
+        oprot.writeStructEnd();
+      }
+
+    }
+
+    private static class closeReadSession_argsTupleSchemeFactory implements SchemeFactory {
+      public closeReadSession_argsTupleScheme getScheme() {
+        return new closeReadSession_argsTupleScheme();
+      }
+    }
+
+    private static class closeReadSession_argsTupleScheme extends TupleScheme<closeReadSession_args> {
+
+      @Override
+      public void write(org.apache.thrift.protocol.TProtocol prot, closeReadSession_args struct) throws org.apache.thrift.TException {
+        TTupleProtocol oprot = (TTupleProtocol) prot;
+        BitSet optionals = new BitSet();
+        if (struct.isSetSession()) {
+          optionals.set(0);
+        }
+        oprot.writeBitSet(optionals, 1);
+        if (struct.isSetSession()) {
+          struct.session.write(oprot);
+        }
+      }
+
+      @Override
+      public void read(org.apache.thrift.protocol.TProtocol prot, closeReadSession_args struct) throws org.apache.thrift.TException {
+        TTupleProtocol iprot = (TTupleProtocol) prot;
+        BitSet incoming = iprot.readBitSet(1);
+        if (incoming.get(0)) {
+          struct.session = new Session();
+          struct.session.read(iprot);
+          struct.setSessionIsSet(true);
+        }
+      }
+    }
+
   }
 
   public static class closeReadSession_result implements org.apache.thrift.TBase<closeReadSession_result, closeReadSession_result._Fields>, java.io.Serializable, Cloneable   {
@@ -3779,6 +4427,12 @@ public class Lucene {
 
     private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1);
 
+    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+    static {
+      schemes.put(StandardScheme.class, new closeReadSession_resultStandardSchemeFactory());
+      schemes.put(TupleScheme.class, new closeReadSession_resultTupleSchemeFactory());
+    }
+
     public BlurException e; // required
 
     /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
@@ -3840,7 +4494,6 @@ public class Lucene {
     }
 
     // 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);
@@ -3993,45 +4646,12 @@ public class Lucene {
     }
 
     public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
-      org.apache.thrift.protocol.TField field;
-      iprot.readStructBegin();
-      while (true)
-      {
-        field = iprot.readFieldBegin();
-        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
-          break;
-        }
-        switch (field.id) {
-          case 1: // E
-            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
-              this.e = new BlurException();
-              this.e.read(iprot);
-            } else { 
-              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-            }
-            break;
-          default:
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-        }
-        iprot.readFieldEnd();
-      }
-      iprot.readStructEnd();
-
-      // check for required fields of primitive type, which can't be checked in the validate method
-      validate();
+      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
     }
 
     public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
-      oprot.writeStructBegin(STRUCT_DESC);
-
-      if (this.isSetE()) {
-        oprot.writeFieldBegin(E_FIELD_DESC);
-        this.e.write(oprot);
-        oprot.writeFieldEnd();
+      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
       }
-      oprot.writeFieldStop();
-      oprot.writeStructEnd();
-    }
 
     @Override
     public String toString() {
@@ -4051,6 +4671,7 @@ public class Lucene {
 
     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 {
@@ -4069,6 +4690,92 @@ public class Lucene {
       }
     }
 
+    private static class closeReadSession_resultStandardSchemeFactory implements SchemeFactory {
+      public closeReadSession_resultStandardScheme getScheme() {
+        return new closeReadSession_resultStandardScheme();
+      }
+    }
+
+    private static class closeReadSession_resultStandardScheme extends StandardScheme<closeReadSession_result> {
+
+      public void read(org.apache.thrift.protocol.TProtocol iprot, closeReadSession_result 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: // E
+              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+                struct.e = new BlurException();
+                struct.e.read(iprot);
+                struct.setEIsSet(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, closeReadSession_result struct) throws org.apache.thrift.TException {
+        struct.validate();
+
+        oprot.writeStructBegin(STRUCT_DESC);
+        if (struct.e != null) {
+          oprot.writeFieldBegin(E_FIELD_DESC);
+          struct.e.write(oprot);
+          oprot.writeFieldEnd();
+        }
+        oprot.writeFieldStop();
+        oprot.writeStructEnd();
+      }
+
+    }
+
+    private static class closeReadSession_resultTupleSchemeFactory implements SchemeFactory {
+      public closeReadSession_resultTupleScheme getScheme() {
+        return new closeReadSession_resultTupleScheme();
+      }
+    }
+
+    private static class closeReadSession_resultTupleScheme extends TupleScheme<closeReadSession_result> {
+
+      @Override
+      public void write(org.apache.thrift.protocol.TProtocol prot, closeReadSession_result struct) throws org.apache.thrift.TException {
+        TTupleProtocol oprot = (TTupleProtocol) prot;
+        BitSet optionals = new BitSet();
+        if (struct.isSetE()) {
+          optionals.set(0);
+        }
+        oprot.writeBitSet(optionals, 1);
+        if (struct.isSetE()) {
+          struct.e.write(oprot);
+        }
+      }
+
+      @Override
+      public void read(org.apache.thrift.protocol.TProtocol prot, closeReadSession_result struct) throws org.apache.thrift.TException {
+        TTupleProtocol iprot = (TTupleProtocol) prot;
+        BitSet incoming = iprot.readBitSet(1);
+        if (incoming.get(0)) {
+          struct.e = new BlurException();
+          struct.e.read(iprot);
+          struct.setEIsSet(true);
+        }
+      }
+    }
+
   }
 
   public static class openWriteSession_args implements org.apache.thrift.TBase<openWriteSession_args, openWriteSession_args._Fields>, java.io.Serializable, Cloneable   {
@@ -4076,6 +4783,12 @@ public class Lucene {
 
     private static final org.apache.thrift.protocol.TField TABLE_FIELD_DESC = new org.apache.thrift.protocol.TField("table", org.apache.thrift.protocol.TType.STRING, (short)1);
 
+    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+    static {
+      schemes.put(StandardScheme.class, new openWriteSession_argsStandardSchemeFactory());
+      schemes.put(TupleScheme.class, new openWriteSession_argsTupleSchemeFactory());
+    }
+
     public String table; // required
 
     /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
@@ -4137,7 +4850,6 @@ public class Lucene {
     }
 
     // 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);
@@ -4290,44 +5002,11 @@ public class Lucene {
     }
 
     public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
-      org.apache.thrift.protocol.TField field;
-      iprot.readStructBegin();
-      while (true)
-      {
-        field = iprot.readFieldBegin();
-        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
-          break;
-        }
-        switch (field.id) {
-          case 1: // TABLE
-            if (field.type == org.apache.thrift.protocol.TType.STRING) {
-              this.table = iprot.readString();
-            } else { 
-              org.apache.thrif

<TRUNCATED>

Mime
View raw message