incubator-blur-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amccu...@apache.org
Subject [38/46] First commit of api changes.
Date Tue, 30 Oct 2012 02:53:19 GMT
http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/1e930bbc/src/blur-new-api-prototype/src/main/java/org/apache/blur/thrift/generated/BlurShard.java
----------------------------------------------------------------------
diff --git a/src/blur-new-api-prototype/src/main/java/org/apache/blur/thrift/generated/BlurShard.java b/src/blur-new-api-prototype/src/main/java/org/apache/blur/thrift/generated/BlurShard.java
index 5396ae8..106148e 100644
--- a/src/blur-new-api-prototype/src/main/java/org/apache/blur/thrift/generated/BlurShard.java
+++ b/src/blur-new-api-prototype/src/main/java/org/apache/blur/thrift/generated/BlurShard.java
@@ -24,41 +24,41 @@ public class BlurShard {
 
   public interface Iface {
 
-    public void addReadSession(Session session) throws BlurException, org.apache.thrift.TException;
+    public TopFieldDocs search(Session session, QueryArgs queryArgs) throws BlurException, org.apache.thrift.TException;
 
-    public void executeQuery(Session session, String query) throws BlurException, org.apache.thrift.TException;
+    public Document doc(Session session, int shardIndex, int doc, Set<String> fields) throws BlurException, org.apache.thrift.TException;
 
-    public List<Tuple> nextMetaDataResults(Session session, int batchSize) throws BlurException, org.apache.thrift.TException;
+    public void addDocuments(Session session, int shardIndex, List<Document> document) throws BlurException, org.apache.thrift.TException;
 
-    public List<Tuple> nextResults(Session session, int batchSize) throws BlurException, org.apache.thrift.TException;
+    public void deleteDocumentsByQueries(Session session, int shardIndex, List<QueryArgs> queries) throws BlurException, org.apache.thrift.TException;
 
-    public void removeReadSession(Session session) throws BlurException, org.apache.thrift.TException;
+    public void deleteDocuments(Session session, int shardIndex, List<Term> terms) throws BlurException, org.apache.thrift.TException;
 
-    public void addWriteSession(Session session) throws BlurException, org.apache.thrift.TException;
+    public void updateDocuments(Session session, int shardIndex, List<Term> terms, List<Document> document) throws BlurException, org.apache.thrift.TException;
 
-    public void writeTuples(Session session, List<Tuple> tuples) throws BlurException, org.apache.thrift.TException;
+    public void commit(Session session) throws BlurException, org.apache.thrift.TException;
 
-    public void removeWriteSession(Session session) throws BlurException, org.apache.thrift.TException;
+    public void rollback(Session session) throws BlurException, org.apache.thrift.TException;
 
   }
 
   public interface AsyncIface {
 
-    public void addReadSession(Session session, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.addReadSession_call> resultHandler) throws org.apache.thrift.TException;
+    public void search(Session session, QueryArgs queryArgs, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.search_call> resultHandler) throws org.apache.thrift.TException;
 
-    public void executeQuery(Session session, String query, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.executeQuery_call> resultHandler) throws org.apache.thrift.TException;
+    public void doc(Session session, int shardIndex, int doc, Set<String> fields, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.doc_call> resultHandler) throws org.apache.thrift.TException;
 
-    public void nextMetaDataResults(Session session, int batchSize, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.nextMetaDataResults_call> resultHandler) throws org.apache.thrift.TException;
+    public void addDocuments(Session session, int shardIndex, List<Document> document, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.addDocuments_call> resultHandler) throws org.apache.thrift.TException;
 
-    public void nextResults(Session session, int batchSize, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.nextResults_call> resultHandler) throws org.apache.thrift.TException;
+    public void deleteDocumentsByQueries(Session session, int shardIndex, List<QueryArgs> queries, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.deleteDocumentsByQueries_call> resultHandler) throws org.apache.thrift.TException;
 
-    public void removeReadSession(Session session, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.removeReadSession_call> resultHandler) throws org.apache.thrift.TException;
+    public void deleteDocuments(Session session, int shardIndex, List<Term> terms, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.deleteDocuments_call> resultHandler) throws org.apache.thrift.TException;
 
-    public void addWriteSession(Session session, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.addWriteSession_call> resultHandler) throws org.apache.thrift.TException;
+    public void updateDocuments(Session session, int shardIndex, List<Term> terms, List<Document> document, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.updateDocuments_call> resultHandler) throws org.apache.thrift.TException;
 
-    public void writeTuples(Session session, List<Tuple> tuples, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.writeTuples_call> resultHandler) throws org.apache.thrift.TException;
+    public void commit(Session session, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.commit_call> resultHandler) throws org.apache.thrift.TException;
 
-    public void removeWriteSession(Session session, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.removeWriteSession_call> resultHandler) throws org.apache.thrift.TException;
+    public void rollback(Session session, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.rollback_call> resultHandler) throws org.apache.thrift.TException;
 
   }
 
@@ -82,194 +82,203 @@ public class BlurShard {
       super(iprot, oprot);
     }
 
-    public void addReadSession(Session session) throws BlurException, org.apache.thrift.TException
+    public TopFieldDocs search(Session session, QueryArgs queryArgs) throws BlurException, org.apache.thrift.TException
     {
-      send_addReadSession(session);
-      recv_addReadSession();
+      send_search(session, queryArgs);
+      return recv_search();
     }
 
-    public void send_addReadSession(Session session) throws org.apache.thrift.TException
+    public void send_search(Session session, QueryArgs queryArgs) throws org.apache.thrift.TException
     {
-      addReadSession_args args = new addReadSession_args();
+      search_args args = new search_args();
       args.setSession(session);
-      sendBase("addReadSession", args);
+      args.setQueryArgs(queryArgs);
+      sendBase("search", args);
     }
 
-    public void recv_addReadSession() throws BlurException, org.apache.thrift.TException
+    public TopFieldDocs recv_search() throws BlurException, org.apache.thrift.TException
     {
-      addReadSession_result result = new addReadSession_result();
-      receiveBase(result, "addReadSession");
+      search_result result = new search_result();
+      receiveBase(result, "search");
+      if (result.isSetSuccess()) {
+        return result.success;
+      }
       if (result.e != null) {
         throw result.e;
       }
-      return;
+      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "search failed: unknown result");
     }
 
-    public void executeQuery(Session session, String query) throws BlurException, org.apache.thrift.TException
+    public Document doc(Session session, int shardIndex, int doc, Set<String> fields) throws BlurException, org.apache.thrift.TException
     {
-      send_executeQuery(session, query);
-      recv_executeQuery();
+      send_doc(session, shardIndex, doc, fields);
+      return recv_doc();
     }
 
-    public void send_executeQuery(Session session, String query) throws org.apache.thrift.TException
+    public void send_doc(Session session, int shardIndex, int doc, Set<String> fields) throws org.apache.thrift.TException
     {
-      executeQuery_args args = new executeQuery_args();
+      doc_args args = new doc_args();
       args.setSession(session);
-      args.setQuery(query);
-      sendBase("executeQuery", args);
+      args.setShardIndex(shardIndex);
+      args.setDoc(doc);
+      args.setFields(fields);
+      sendBase("doc", args);
     }
 
-    public void recv_executeQuery() throws BlurException, org.apache.thrift.TException
+    public Document recv_doc() throws BlurException, org.apache.thrift.TException
     {
-      executeQuery_result result = new executeQuery_result();
-      receiveBase(result, "executeQuery");
+      doc_result result = new doc_result();
+      receiveBase(result, "doc");
+      if (result.isSetSuccess()) {
+        return result.success;
+      }
       if (result.e != null) {
         throw result.e;
       }
-      return;
+      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "doc failed: unknown result");
     }
 
-    public List<Tuple> nextMetaDataResults(Session session, int batchSize) throws BlurException, org.apache.thrift.TException
+    public void addDocuments(Session session, int shardIndex, List<Document> document) throws BlurException, org.apache.thrift.TException
     {
-      send_nextMetaDataResults(session, batchSize);
-      return recv_nextMetaDataResults();
+      send_addDocuments(session, shardIndex, document);
+      recv_addDocuments();
     }
 
-    public void send_nextMetaDataResults(Session session, int batchSize) throws org.apache.thrift.TException
+    public void send_addDocuments(Session session, int shardIndex, List<Document> document) throws org.apache.thrift.TException
     {
-      nextMetaDataResults_args args = new nextMetaDataResults_args();
+      addDocuments_args args = new addDocuments_args();
       args.setSession(session);
-      args.setBatchSize(batchSize);
-      sendBase("nextMetaDataResults", args);
+      args.setShardIndex(shardIndex);
+      args.setDocument(document);
+      sendBase("addDocuments", args);
     }
 
-    public List<Tuple> recv_nextMetaDataResults() throws BlurException, org.apache.thrift.TException
+    public void recv_addDocuments() throws BlurException, org.apache.thrift.TException
     {
-      nextMetaDataResults_result result = new nextMetaDataResults_result();
-      receiveBase(result, "nextMetaDataResults");
-      if (result.isSetSuccess()) {
-        return result.success;
-      }
+      addDocuments_result result = new addDocuments_result();
+      receiveBase(result, "addDocuments");
       if (result.e != null) {
         throw result.e;
       }
-      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "nextMetaDataResults failed: unknown result");
+      return;
     }
 
-    public List<Tuple> nextResults(Session session, int batchSize) throws BlurException, org.apache.thrift.TException
+    public void deleteDocumentsByQueries(Session session, int shardIndex, List<QueryArgs> queries) throws BlurException, org.apache.thrift.TException
     {
-      send_nextResults(session, batchSize);
-      return recv_nextResults();
+      send_deleteDocumentsByQueries(session, shardIndex, queries);
+      recv_deleteDocumentsByQueries();
     }
 
-    public void send_nextResults(Session session, int batchSize) throws org.apache.thrift.TException
+    public void send_deleteDocumentsByQueries(Session session, int shardIndex, List<QueryArgs> queries) throws org.apache.thrift.TException
     {
-      nextResults_args args = new nextResults_args();
+      deleteDocumentsByQueries_args args = new deleteDocumentsByQueries_args();
       args.setSession(session);
-      args.setBatchSize(batchSize);
-      sendBase("nextResults", args);
+      args.setShardIndex(shardIndex);
+      args.setQueries(queries);
+      sendBase("deleteDocumentsByQueries", args);
     }
 
-    public List<Tuple> recv_nextResults() throws BlurException, org.apache.thrift.TException
+    public void recv_deleteDocumentsByQueries() throws BlurException, org.apache.thrift.TException
     {
-      nextResults_result result = new nextResults_result();
-      receiveBase(result, "nextResults");
-      if (result.isSetSuccess()) {
-        return result.success;
-      }
+      deleteDocumentsByQueries_result result = new deleteDocumentsByQueries_result();
+      receiveBase(result, "deleteDocumentsByQueries");
       if (result.e != null) {
         throw result.e;
       }
-      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "nextResults failed: unknown result");
+      return;
     }
 
-    public void removeReadSession(Session session) throws BlurException, org.apache.thrift.TException
+    public void deleteDocuments(Session session, int shardIndex, List<Term> terms) throws BlurException, org.apache.thrift.TException
     {
-      send_removeReadSession(session);
-      recv_removeReadSession();
+      send_deleteDocuments(session, shardIndex, terms);
+      recv_deleteDocuments();
     }
 
-    public void send_removeReadSession(Session session) throws org.apache.thrift.TException
+    public void send_deleteDocuments(Session session, int shardIndex, List<Term> terms) throws org.apache.thrift.TException
     {
-      removeReadSession_args args = new removeReadSession_args();
+      deleteDocuments_args args = new deleteDocuments_args();
       args.setSession(session);
-      sendBase("removeReadSession", args);
+      args.setShardIndex(shardIndex);
+      args.setTerms(terms);
+      sendBase("deleteDocuments", args);
     }
 
-    public void recv_removeReadSession() throws BlurException, org.apache.thrift.TException
+    public void recv_deleteDocuments() throws BlurException, org.apache.thrift.TException
     {
-      removeReadSession_result result = new removeReadSession_result();
-      receiveBase(result, "removeReadSession");
+      deleteDocuments_result result = new deleteDocuments_result();
+      receiveBase(result, "deleteDocuments");
       if (result.e != null) {
         throw result.e;
       }
       return;
     }
 
-    public void addWriteSession(Session session) throws BlurException, org.apache.thrift.TException
+    public void updateDocuments(Session session, int shardIndex, List<Term> terms, List<Document> document) throws BlurException, org.apache.thrift.TException
     {
-      send_addWriteSession(session);
-      recv_addWriteSession();
+      send_updateDocuments(session, shardIndex, terms, document);
+      recv_updateDocuments();
     }
 
-    public void send_addWriteSession(Session session) throws org.apache.thrift.TException
+    public void send_updateDocuments(Session session, int shardIndex, List<Term> terms, List<Document> document) throws org.apache.thrift.TException
     {
-      addWriteSession_args args = new addWriteSession_args();
+      updateDocuments_args args = new updateDocuments_args();
       args.setSession(session);
-      sendBase("addWriteSession", args);
+      args.setShardIndex(shardIndex);
+      args.setTerms(terms);
+      args.setDocument(document);
+      sendBase("updateDocuments", args);
     }
 
-    public void recv_addWriteSession() throws BlurException, org.apache.thrift.TException
+    public void recv_updateDocuments() throws BlurException, org.apache.thrift.TException
     {
-      addWriteSession_result result = new addWriteSession_result();
-      receiveBase(result, "addWriteSession");
+      updateDocuments_result result = new updateDocuments_result();
+      receiveBase(result, "updateDocuments");
       if (result.e != null) {
         throw result.e;
       }
       return;
     }
 
-    public void writeTuples(Session session, List<Tuple> tuples) throws BlurException, org.apache.thrift.TException
+    public void commit(Session session) throws BlurException, org.apache.thrift.TException
     {
-      send_writeTuples(session, tuples);
-      recv_writeTuples();
+      send_commit(session);
+      recv_commit();
     }
 
-    public void send_writeTuples(Session session, List<Tuple> tuples) throws org.apache.thrift.TException
+    public void send_commit(Session session) throws org.apache.thrift.TException
     {
-      writeTuples_args args = new writeTuples_args();
+      commit_args args = new commit_args();
       args.setSession(session);
-      args.setTuples(tuples);
-      sendBase("writeTuples", args);
+      sendBase("commit", args);
     }
 
-    public void recv_writeTuples() throws BlurException, org.apache.thrift.TException
+    public void recv_commit() throws BlurException, org.apache.thrift.TException
     {
-      writeTuples_result result = new writeTuples_result();
-      receiveBase(result, "writeTuples");
+      commit_result result = new commit_result();
+      receiveBase(result, "commit");
       if (result.e != null) {
         throw result.e;
       }
       return;
     }
 
-    public void removeWriteSession(Session session) throws BlurException, org.apache.thrift.TException
+    public void rollback(Session session) throws BlurException, org.apache.thrift.TException
     {
-      send_removeWriteSession(session);
-      recv_removeWriteSession();
+      send_rollback(session);
+      recv_rollback();
     }
 
-    public void send_removeWriteSession(Session session) throws org.apache.thrift.TException
+    public void send_rollback(Session session) throws org.apache.thrift.TException
     {
-      removeWriteSession_args args = new removeWriteSession_args();
+      rollback_args args = new rollback_args();
       args.setSession(session);
-      sendBase("removeWriteSession", args);
+      sendBase("rollback", args);
     }
 
-    public void recv_removeWriteSession() throws BlurException, org.apache.thrift.TException
+    public void recv_rollback() throws BlurException, org.apache.thrift.TException
     {
-      removeWriteSession_result result = new removeWriteSession_result();
-      receiveBase(result, "removeWriteSession");
+      rollback_result result = new rollback_result();
+      receiveBase(result, "rollback");
       if (result.e != null) {
         throw result.e;
       }
@@ -294,161 +303,182 @@ public class BlurShard {
       super(protocolFactory, clientManager, transport);
     }
 
-    public void addReadSession(Session session, org.apache.thrift.async.AsyncMethodCallback<addReadSession_call> resultHandler) throws org.apache.thrift.TException {
+    public void search(Session session, QueryArgs queryArgs, org.apache.thrift.async.AsyncMethodCallback<search_call> resultHandler) throws org.apache.thrift.TException {
       checkReady();
-      addReadSession_call method_call = new addReadSession_call(session, resultHandler, this, ___protocolFactory, ___transport);
+      search_call method_call = new search_call(session, queryArgs, resultHandler, this, ___protocolFactory, ___transport);
       this.___currentMethod = method_call;
       ___manager.call(method_call);
     }
 
-    public static class addReadSession_call extends org.apache.thrift.async.TAsyncMethodCall {
+    public static class search_call extends org.apache.thrift.async.TAsyncMethodCall {
       private Session session;
-      public addReadSession_call(Session session, org.apache.thrift.async.AsyncMethodCallback<addReadSession_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+      private QueryArgs queryArgs;
+      public search_call(Session session, QueryArgs queryArgs, org.apache.thrift.async.AsyncMethodCallback<search_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
         super(client, protocolFactory, transport, resultHandler, false);
         this.session = session;
+        this.queryArgs = queryArgs;
       }
 
       public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
-        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("addReadSession", org.apache.thrift.protocol.TMessageType.CALL, 0));
-        addReadSession_args args = new addReadSession_args();
+        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("search", org.apache.thrift.protocol.TMessageType.CALL, 0));
+        search_args args = new search_args();
         args.setSession(session);
+        args.setQueryArgs(queryArgs);
         args.write(prot);
         prot.writeMessageEnd();
       }
 
-      public void getResult() throws BlurException, org.apache.thrift.TException {
+      public 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!");
         }
         org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
         org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
-        (new Client(prot)).recv_addReadSession();
+        return (new Client(prot)).recv_search();
       }
     }
 
-    public void executeQuery(Session session, String query, org.apache.thrift.async.AsyncMethodCallback<executeQuery_call> resultHandler) throws org.apache.thrift.TException {
+    public void doc(Session session, int shardIndex, int doc, Set<String> fields, org.apache.thrift.async.AsyncMethodCallback<doc_call> resultHandler) throws org.apache.thrift.TException {
       checkReady();
-      executeQuery_call method_call = new executeQuery_call(session, query, resultHandler, this, ___protocolFactory, ___transport);
+      doc_call method_call = new doc_call(session, shardIndex, doc, fields, resultHandler, this, ___protocolFactory, ___transport);
       this.___currentMethod = method_call;
       ___manager.call(method_call);
     }
 
-    public static class executeQuery_call extends org.apache.thrift.async.TAsyncMethodCall {
+    public static class doc_call extends org.apache.thrift.async.TAsyncMethodCall {
       private Session session;
-      private String query;
-      public executeQuery_call(Session session, String query, org.apache.thrift.async.AsyncMethodCallback<executeQuery_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+      private int shardIndex;
+      private int doc;
+      private Set<String> fields;
+      public doc_call(Session session, int shardIndex, int doc, Set<String> fields, org.apache.thrift.async.AsyncMethodCallback<doc_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
         super(client, protocolFactory, transport, resultHandler, false);
         this.session = session;
-        this.query = query;
+        this.shardIndex = shardIndex;
+        this.doc = doc;
+        this.fields = fields;
       }
 
       public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
-        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("executeQuery", org.apache.thrift.protocol.TMessageType.CALL, 0));
-        executeQuery_args args = new executeQuery_args();
+        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("doc", org.apache.thrift.protocol.TMessageType.CALL, 0));
+        doc_args args = new doc_args();
         args.setSession(session);
-        args.setQuery(query);
+        args.setShardIndex(shardIndex);
+        args.setDoc(doc);
+        args.setFields(fields);
         args.write(prot);
         prot.writeMessageEnd();
       }
 
-      public void getResult() throws BlurException, org.apache.thrift.TException {
+      public Document getResult() throws BlurException, org.apache.thrift.TException {
         if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
           throw new IllegalStateException("Method call not finished!");
         }
         org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
         org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
-        (new Client(prot)).recv_executeQuery();
+        return (new Client(prot)).recv_doc();
       }
     }
 
-    public void nextMetaDataResults(Session session, int batchSize, org.apache.thrift.async.AsyncMethodCallback<nextMetaDataResults_call> resultHandler) throws org.apache.thrift.TException {
+    public void addDocuments(Session session, int shardIndex, List<Document> document, org.apache.thrift.async.AsyncMethodCallback<addDocuments_call> resultHandler) throws org.apache.thrift.TException {
       checkReady();
-      nextMetaDataResults_call method_call = new nextMetaDataResults_call(session, batchSize, resultHandler, this, ___protocolFactory, ___transport);
+      addDocuments_call method_call = new addDocuments_call(session, shardIndex, document, resultHandler, this, ___protocolFactory, ___transport);
       this.___currentMethod = method_call;
       ___manager.call(method_call);
     }
 
-    public static class nextMetaDataResults_call extends org.apache.thrift.async.TAsyncMethodCall {
+    public static class addDocuments_call extends org.apache.thrift.async.TAsyncMethodCall {
       private Session session;
-      private int batchSize;
-      public nextMetaDataResults_call(Session session, int batchSize, org.apache.thrift.async.AsyncMethodCallback<nextMetaDataResults_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+      private int shardIndex;
+      private List<Document> document;
+      public addDocuments_call(Session session, int shardIndex, List<Document> document, org.apache.thrift.async.AsyncMethodCallback<addDocuments_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
         super(client, protocolFactory, transport, resultHandler, false);
         this.session = session;
-        this.batchSize = batchSize;
+        this.shardIndex = shardIndex;
+        this.document = document;
       }
 
       public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
-        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("nextMetaDataResults", org.apache.thrift.protocol.TMessageType.CALL, 0));
-        nextMetaDataResults_args args = new nextMetaDataResults_args();
+        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("addDocuments", org.apache.thrift.protocol.TMessageType.CALL, 0));
+        addDocuments_args args = new addDocuments_args();
         args.setSession(session);
-        args.setBatchSize(batchSize);
+        args.setShardIndex(shardIndex);
+        args.setDocument(document);
         args.write(prot);
         prot.writeMessageEnd();
       }
 
-      public List<Tuple> getResult() throws BlurException, org.apache.thrift.TException {
+      public void getResult() throws BlurException, org.apache.thrift.TException {
         if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
           throw new IllegalStateException("Method call not finished!");
         }
         org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
         org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
-        return (new Client(prot)).recv_nextMetaDataResults();
+        (new Client(prot)).recv_addDocuments();
       }
     }
 
-    public void nextResults(Session session, int batchSize, org.apache.thrift.async.AsyncMethodCallback<nextResults_call> resultHandler) throws org.apache.thrift.TException {
+    public void deleteDocumentsByQueries(Session session, int shardIndex, List<QueryArgs> queries, org.apache.thrift.async.AsyncMethodCallback<deleteDocumentsByQueries_call> resultHandler) throws org.apache.thrift.TException {
       checkReady();
-      nextResults_call method_call = new nextResults_call(session, batchSize, resultHandler, this, ___protocolFactory, ___transport);
+      deleteDocumentsByQueries_call method_call = new deleteDocumentsByQueries_call(session, shardIndex, queries, resultHandler, this, ___protocolFactory, ___transport);
       this.___currentMethod = method_call;
       ___manager.call(method_call);
     }
 
-    public static class nextResults_call extends org.apache.thrift.async.TAsyncMethodCall {
+    public static class deleteDocumentsByQueries_call extends org.apache.thrift.async.TAsyncMethodCall {
       private Session session;
-      private int batchSize;
-      public nextResults_call(Session session, int batchSize, org.apache.thrift.async.AsyncMethodCallback<nextResults_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+      private int shardIndex;
+      private List<QueryArgs> queries;
+      public deleteDocumentsByQueries_call(Session session, int shardIndex, List<QueryArgs> queries, org.apache.thrift.async.AsyncMethodCallback<deleteDocumentsByQueries_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
         super(client, protocolFactory, transport, resultHandler, false);
         this.session = session;
-        this.batchSize = batchSize;
+        this.shardIndex = shardIndex;
+        this.queries = queries;
       }
 
       public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
-        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("nextResults", org.apache.thrift.protocol.TMessageType.CALL, 0));
-        nextResults_args args = new nextResults_args();
+        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("deleteDocumentsByQueries", org.apache.thrift.protocol.TMessageType.CALL, 0));
+        deleteDocumentsByQueries_args args = new deleteDocumentsByQueries_args();
         args.setSession(session);
-        args.setBatchSize(batchSize);
+        args.setShardIndex(shardIndex);
+        args.setQueries(queries);
         args.write(prot);
         prot.writeMessageEnd();
       }
 
-      public List<Tuple> getResult() throws BlurException, org.apache.thrift.TException {
+      public void getResult() throws BlurException, org.apache.thrift.TException {
         if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
           throw new IllegalStateException("Method call not finished!");
         }
         org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
         org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
-        return (new Client(prot)).recv_nextResults();
+        (new Client(prot)).recv_deleteDocumentsByQueries();
       }
     }
 
-    public void removeReadSession(Session session, org.apache.thrift.async.AsyncMethodCallback<removeReadSession_call> resultHandler) throws org.apache.thrift.TException {
+    public void deleteDocuments(Session session, int shardIndex, List<Term> terms, org.apache.thrift.async.AsyncMethodCallback<deleteDocuments_call> resultHandler) throws org.apache.thrift.TException {
       checkReady();
-      removeReadSession_call method_call = new removeReadSession_call(session, resultHandler, this, ___protocolFactory, ___transport);
+      deleteDocuments_call method_call = new deleteDocuments_call(session, shardIndex, terms, resultHandler, this, ___protocolFactory, ___transport);
       this.___currentMethod = method_call;
       ___manager.call(method_call);
     }
 
-    public static class removeReadSession_call extends org.apache.thrift.async.TAsyncMethodCall {
+    public static class deleteDocuments_call extends org.apache.thrift.async.TAsyncMethodCall {
       private Session session;
-      public removeReadSession_call(Session session, org.apache.thrift.async.AsyncMethodCallback<removeReadSession_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+      private int shardIndex;
+      private List<Term> terms;
+      public deleteDocuments_call(Session session, int shardIndex, List<Term> terms, org.apache.thrift.async.AsyncMethodCallback<deleteDocuments_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
         super(client, protocolFactory, transport, resultHandler, false);
         this.session = session;
+        this.shardIndex = shardIndex;
+        this.terms = terms;
       }
 
       public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
-        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("removeReadSession", org.apache.thrift.protocol.TMessageType.CALL, 0));
-        removeReadSession_args args = new removeReadSession_args();
+        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("deleteDocuments", org.apache.thrift.protocol.TMessageType.CALL, 0));
+        deleteDocuments_args args = new deleteDocuments_args();
         args.setSession(session);
+        args.setShardIndex(shardIndex);
+        args.setTerms(terms);
         args.write(prot);
         prot.writeMessageEnd();
       }
@@ -459,28 +489,37 @@ public class BlurShard {
         }
         org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
         org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
-        (new Client(prot)).recv_removeReadSession();
+        (new Client(prot)).recv_deleteDocuments();
       }
     }
 
-    public void addWriteSession(Session session, org.apache.thrift.async.AsyncMethodCallback<addWriteSession_call> resultHandler) throws org.apache.thrift.TException {
+    public void updateDocuments(Session session, int shardIndex, List<Term> terms, List<Document> document, org.apache.thrift.async.AsyncMethodCallback<updateDocuments_call> resultHandler) throws org.apache.thrift.TException {
       checkReady();
-      addWriteSession_call method_call = new addWriteSession_call(session, resultHandler, this, ___protocolFactory, ___transport);
+      updateDocuments_call method_call = new updateDocuments_call(session, shardIndex, terms, document, resultHandler, this, ___protocolFactory, ___transport);
       this.___currentMethod = method_call;
       ___manager.call(method_call);
     }
 
-    public static class addWriteSession_call extends org.apache.thrift.async.TAsyncMethodCall {
+    public static class updateDocuments_call extends org.apache.thrift.async.TAsyncMethodCall {
       private Session session;
-      public addWriteSession_call(Session session, org.apache.thrift.async.AsyncMethodCallback<addWriteSession_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+      private int shardIndex;
+      private List<Term> terms;
+      private List<Document> document;
+      public updateDocuments_call(Session session, int shardIndex, List<Term> terms, List<Document> document, org.apache.thrift.async.AsyncMethodCallback<updateDocuments_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
         super(client, protocolFactory, transport, resultHandler, false);
         this.session = session;
+        this.shardIndex = shardIndex;
+        this.terms = terms;
+        this.document = document;
       }
 
       public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
-        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("addWriteSession", org.apache.thrift.protocol.TMessageType.CALL, 0));
-        addWriteSession_args args = new addWriteSession_args();
+        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("updateDocuments", org.apache.thrift.protocol.TMessageType.CALL, 0));
+        updateDocuments_args args = new updateDocuments_args();
         args.setSession(session);
+        args.setShardIndex(shardIndex);
+        args.setTerms(terms);
+        args.setDocument(document);
         args.write(prot);
         prot.writeMessageEnd();
       }
@@ -491,31 +530,28 @@ public class BlurShard {
         }
         org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
         org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
-        (new Client(prot)).recv_addWriteSession();
+        (new Client(prot)).recv_updateDocuments();
       }
     }
 
-    public void writeTuples(Session session, List<Tuple> tuples, org.apache.thrift.async.AsyncMethodCallback<writeTuples_call> resultHandler) throws org.apache.thrift.TException {
+    public void commit(Session session, org.apache.thrift.async.AsyncMethodCallback<commit_call> resultHandler) throws org.apache.thrift.TException {
       checkReady();
-      writeTuples_call method_call = new writeTuples_call(session, tuples, resultHandler, this, ___protocolFactory, ___transport);
+      commit_call method_call = new commit_call(session, resultHandler, this, ___protocolFactory, ___transport);
       this.___currentMethod = method_call;
       ___manager.call(method_call);
     }
 
-    public static class writeTuples_call extends org.apache.thrift.async.TAsyncMethodCall {
+    public static class commit_call extends org.apache.thrift.async.TAsyncMethodCall {
       private Session session;
-      private List<Tuple> tuples;
-      public writeTuples_call(Session session, List<Tuple> tuples, org.apache.thrift.async.AsyncMethodCallback<writeTuples_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+      public commit_call(Session session, org.apache.thrift.async.AsyncMethodCallback<commit_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
         super(client, protocolFactory, transport, resultHandler, false);
         this.session = session;
-        this.tuples = tuples;
       }
 
       public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
-        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("writeTuples", org.apache.thrift.protocol.TMessageType.CALL, 0));
-        writeTuples_args args = new writeTuples_args();
+        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("commit", org.apache.thrift.protocol.TMessageType.CALL, 0));
+        commit_args args = new commit_args();
         args.setSession(session);
-        args.setTuples(tuples);
         args.write(prot);
         prot.writeMessageEnd();
       }
@@ -526,27 +562,27 @@ public class BlurShard {
         }
         org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
         org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
-        (new Client(prot)).recv_writeTuples();
+        (new Client(prot)).recv_commit();
       }
     }
 
-    public void removeWriteSession(Session session, org.apache.thrift.async.AsyncMethodCallback<removeWriteSession_call> resultHandler) throws org.apache.thrift.TException {
+    public void rollback(Session session, org.apache.thrift.async.AsyncMethodCallback<rollback_call> resultHandler) throws org.apache.thrift.TException {
       checkReady();
-      removeWriteSession_call method_call = new removeWriteSession_call(session, resultHandler, this, ___protocolFactory, ___transport);
+      rollback_call method_call = new rollback_call(session, resultHandler, this, ___protocolFactory, ___transport);
       this.___currentMethod = method_call;
       ___manager.call(method_call);
     }
 
-    public static class removeWriteSession_call extends org.apache.thrift.async.TAsyncMethodCall {
+    public static class rollback_call extends org.apache.thrift.async.TAsyncMethodCall {
       private Session session;
-      public removeWriteSession_call(Session session, org.apache.thrift.async.AsyncMethodCallback<removeWriteSession_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+      public rollback_call(Session session, org.apache.thrift.async.AsyncMethodCallback<rollback_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
         super(client, protocolFactory, transport, resultHandler, false);
         this.session = session;
       }
 
       public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
-        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("removeWriteSession", org.apache.thrift.protocol.TMessageType.CALL, 0));
-        removeWriteSession_args args = new removeWriteSession_args();
+        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("rollback", org.apache.thrift.protocol.TMessageType.CALL, 0));
+        rollback_args args = new rollback_args();
         args.setSession(session);
         args.write(prot);
         prot.writeMessageEnd();
@@ -558,7 +594,7 @@ public class BlurShard {
         }
         org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
         org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
-        (new Client(prot)).recv_removeWriteSession();
+        (new Client(prot)).recv_rollback();
       }
     }
 
@@ -575,30 +611,30 @@ public class BlurShard {
     }
 
     private static <I extends Iface> Map<String,  org.apache.thrift.ProcessFunction<I, ? extends  org.apache.thrift.TBase>> getProcessMap(Map<String,  org.apache.thrift.ProcessFunction<I, ? extends  org.apache.thrift.TBase>> processMap) {
-      processMap.put("addReadSession", new addReadSession());
-      processMap.put("executeQuery", new executeQuery());
-      processMap.put("nextMetaDataResults", new nextMetaDataResults());
-      processMap.put("nextResults", new nextResults());
-      processMap.put("removeReadSession", new removeReadSession());
-      processMap.put("addWriteSession", new addWriteSession());
-      processMap.put("writeTuples", new writeTuples());
-      processMap.put("removeWriteSession", new removeWriteSession());
+      processMap.put("search", new search());
+      processMap.put("doc", new doc());
+      processMap.put("addDocuments", new addDocuments());
+      processMap.put("deleteDocumentsByQueries", new deleteDocumentsByQueries());
+      processMap.put("deleteDocuments", new deleteDocuments());
+      processMap.put("updateDocuments", new updateDocuments());
+      processMap.put("commit", new commit());
+      processMap.put("rollback", new rollback());
       return processMap;
     }
 
-    private static class addReadSession<I extends Iface> extends org.apache.thrift.ProcessFunction<I, addReadSession_args> {
-      public addReadSession() {
-        super("addReadSession");
+    private static class search<I extends Iface> extends org.apache.thrift.ProcessFunction<I, search_args> {
+      public search() {
+        super("search");
       }
 
-      protected addReadSession_args getEmptyArgsInstance() {
-        return new addReadSession_args();
+      protected search_args getEmptyArgsInstance() {
+        return new search_args();
       }
 
-      protected addReadSession_result getResult(I iface, addReadSession_args args) throws org.apache.thrift.TException {
-        addReadSession_result result = new addReadSession_result();
+      protected search_result getResult(I iface, search_args args) throws org.apache.thrift.TException {
+        search_result result = new search_result();
         try {
-          iface.addReadSession(args.session);
+          result.success = iface.search(args.session, args.queryArgs);
         } catch (BlurException e) {
           result.e = e;
         }
@@ -606,19 +642,19 @@ public class BlurShard {
       }
     }
 
-    private static class executeQuery<I extends Iface> extends org.apache.thrift.ProcessFunction<I, executeQuery_args> {
-      public executeQuery() {
-        super("executeQuery");
+    private static class doc<I extends Iface> extends org.apache.thrift.ProcessFunction<I, doc_args> {
+      public doc() {
+        super("doc");
       }
 
-      protected executeQuery_args getEmptyArgsInstance() {
-        return new executeQuery_args();
+      protected doc_args getEmptyArgsInstance() {
+        return new doc_args();
       }
 
-      protected executeQuery_result getResult(I iface, executeQuery_args args) throws org.apache.thrift.TException {
-        executeQuery_result result = new executeQuery_result();
+      protected doc_result getResult(I iface, doc_args args) throws org.apache.thrift.TException {
+        doc_result result = new doc_result();
         try {
-          iface.executeQuery(args.session, args.query);
+          result.success = iface.doc(args.session, args.shardIndex, args.doc, args.fields);
         } catch (BlurException e) {
           result.e = e;
         }
@@ -626,19 +662,19 @@ public class BlurShard {
       }
     }
 
-    private static class nextMetaDataResults<I extends Iface> extends org.apache.thrift.ProcessFunction<I, nextMetaDataResults_args> {
-      public nextMetaDataResults() {
-        super("nextMetaDataResults");
+    private static class addDocuments<I extends Iface> extends org.apache.thrift.ProcessFunction<I, addDocuments_args> {
+      public addDocuments() {
+        super("addDocuments");
       }
 
-      protected nextMetaDataResults_args getEmptyArgsInstance() {
-        return new nextMetaDataResults_args();
+      protected addDocuments_args getEmptyArgsInstance() {
+        return new addDocuments_args();
       }
 
-      protected nextMetaDataResults_result getResult(I iface, nextMetaDataResults_args args) throws org.apache.thrift.TException {
-        nextMetaDataResults_result result = new nextMetaDataResults_result();
+      protected addDocuments_result getResult(I iface, addDocuments_args args) throws org.apache.thrift.TException {
+        addDocuments_result result = new addDocuments_result();
         try {
-          result.success = iface.nextMetaDataResults(args.session, args.batchSize);
+          iface.addDocuments(args.session, args.shardIndex, args.document);
         } catch (BlurException e) {
           result.e = e;
         }
@@ -646,19 +682,19 @@ public class BlurShard {
       }
     }
 
-    private static class nextResults<I extends Iface> extends org.apache.thrift.ProcessFunction<I, nextResults_args> {
-      public nextResults() {
-        super("nextResults");
+    private static class deleteDocumentsByQueries<I extends Iface> extends org.apache.thrift.ProcessFunction<I, deleteDocumentsByQueries_args> {
+      public deleteDocumentsByQueries() {
+        super("deleteDocumentsByQueries");
       }
 
-      protected nextResults_args getEmptyArgsInstance() {
-        return new nextResults_args();
+      protected deleteDocumentsByQueries_args getEmptyArgsInstance() {
+        return new deleteDocumentsByQueries_args();
       }
 
-      protected nextResults_result getResult(I iface, nextResults_args args) throws org.apache.thrift.TException {
-        nextResults_result result = new nextResults_result();
+      protected deleteDocumentsByQueries_result getResult(I iface, deleteDocumentsByQueries_args args) throws org.apache.thrift.TException {
+        deleteDocumentsByQueries_result result = new deleteDocumentsByQueries_result();
         try {
-          result.success = iface.nextResults(args.session, args.batchSize);
+          iface.deleteDocumentsByQueries(args.session, args.shardIndex, args.queries);
         } catch (BlurException e) {
           result.e = e;
         }
@@ -666,19 +702,19 @@ public class BlurShard {
       }
     }
 
-    private static class removeReadSession<I extends Iface> extends org.apache.thrift.ProcessFunction<I, removeReadSession_args> {
-      public removeReadSession() {
-        super("removeReadSession");
+    private static class deleteDocuments<I extends Iface> extends org.apache.thrift.ProcessFunction<I, deleteDocuments_args> {
+      public deleteDocuments() {
+        super("deleteDocuments");
       }
 
-      protected removeReadSession_args getEmptyArgsInstance() {
-        return new removeReadSession_args();
+      protected deleteDocuments_args getEmptyArgsInstance() {
+        return new deleteDocuments_args();
       }
 
-      protected removeReadSession_result getResult(I iface, removeReadSession_args args) throws org.apache.thrift.TException {
-        removeReadSession_result result = new removeReadSession_result();
+      protected deleteDocuments_result getResult(I iface, deleteDocuments_args args) throws org.apache.thrift.TException {
+        deleteDocuments_result result = new deleteDocuments_result();
         try {
-          iface.removeReadSession(args.session);
+          iface.deleteDocuments(args.session, args.shardIndex, args.terms);
         } catch (BlurException e) {
           result.e = e;
         }
@@ -686,19 +722,19 @@ public class BlurShard {
       }
     }
 
-    private static class addWriteSession<I extends Iface> extends org.apache.thrift.ProcessFunction<I, addWriteSession_args> {
-      public addWriteSession() {
-        super("addWriteSession");
+    private static class updateDocuments<I extends Iface> extends org.apache.thrift.ProcessFunction<I, updateDocuments_args> {
+      public updateDocuments() {
+        super("updateDocuments");
       }
 
-      protected addWriteSession_args getEmptyArgsInstance() {
-        return new addWriteSession_args();
+      protected updateDocuments_args getEmptyArgsInstance() {
+        return new updateDocuments_args();
       }
 
-      protected addWriteSession_result getResult(I iface, addWriteSession_args args) throws org.apache.thrift.TException {
-        addWriteSession_result result = new addWriteSession_result();
+      protected updateDocuments_result getResult(I iface, updateDocuments_args args) throws org.apache.thrift.TException {
+        updateDocuments_result result = new updateDocuments_result();
         try {
-          iface.addWriteSession(args.session);
+          iface.updateDocuments(args.session, args.shardIndex, args.terms, args.document);
         } catch (BlurException e) {
           result.e = e;
         }
@@ -706,19 +742,19 @@ public class BlurShard {
       }
     }
 
-    private static class writeTuples<I extends Iface> extends org.apache.thrift.ProcessFunction<I, writeTuples_args> {
-      public writeTuples() {
-        super("writeTuples");
+    private static class commit<I extends Iface> extends org.apache.thrift.ProcessFunction<I, commit_args> {
+      public commit() {
+        super("commit");
       }
 
-      protected writeTuples_args getEmptyArgsInstance() {
-        return new writeTuples_args();
+      protected commit_args getEmptyArgsInstance() {
+        return new commit_args();
       }
 
-      protected writeTuples_result getResult(I iface, writeTuples_args args) throws org.apache.thrift.TException {
-        writeTuples_result result = new writeTuples_result();
+      protected commit_result getResult(I iface, commit_args args) throws org.apache.thrift.TException {
+        commit_result result = new commit_result();
         try {
-          iface.writeTuples(args.session, args.tuples);
+          iface.commit(args.session);
         } catch (BlurException e) {
           result.e = e;
         }
@@ -726,19 +762,19 @@ public class BlurShard {
       }
     }
 
-    private static class removeWriteSession<I extends Iface> extends org.apache.thrift.ProcessFunction<I, removeWriteSession_args> {
-      public removeWriteSession() {
-        super("removeWriteSession");
+    private static class rollback<I extends Iface> extends org.apache.thrift.ProcessFunction<I, rollback_args> {
+      public rollback() {
+        super("rollback");
       }
 
-      protected removeWriteSession_args getEmptyArgsInstance() {
-        return new removeWriteSession_args();
+      protected rollback_args getEmptyArgsInstance() {
+        return new rollback_args();
       }
 
-      protected removeWriteSession_result getResult(I iface, removeWriteSession_args args) throws org.apache.thrift.TException {
-        removeWriteSession_result result = new removeWriteSession_result();
+      protected rollback_result getResult(I iface, rollback_args args) throws org.apache.thrift.TException {
+        rollback_result result = new rollback_result();
         try {
-          iface.removeWriteSession(args.session);
+          iface.rollback(args.session);
         } catch (BlurException e) {
           result.e = e;
         }
@@ -748,16 +784,19 @@ public class BlurShard {
 
   }
 
-  public static class addReadSession_args implements org.apache.thrift.TBase<addReadSession_args, addReadSession_args._Fields>, java.io.Serializable, Cloneable   {
-    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addReadSession_args");
+  public static class search_args implements org.apache.thrift.TBase<search_args, search_args._Fields>, java.io.Serializable, Cloneable   {
+    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("search_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 QUERY_ARGS_FIELD_DESC = new org.apache.thrift.protocol.TField("queryArgs", org.apache.thrift.protocol.TType.STRUCT, (short)2);
 
     public Session session; // required
+    public QueryArgs queryArgs; // 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");
+      SESSION((short)1, "session"),
+      QUERY_ARGS((short)2, "queryArgs");
 
       private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
 
@@ -774,6 +813,8 @@ public class BlurShard {
         switch(fieldId) {
           case 1: // SESSION
             return SESSION;
+          case 2: // QUERY_ARGS
+            return QUERY_ARGS;
           default:
             return null;
         }
@@ -820,43 +861,51 @@ public class BlurShard {
       Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
       tmpMap.put(_Fields.SESSION, new org.apache.thrift.meta_data.FieldMetaData("session", org.apache.thrift.TFieldRequirementType.DEFAULT, 
           new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Session.class)));
+      tmpMap.put(_Fields.QUERY_ARGS, new org.apache.thrift.meta_data.FieldMetaData("queryArgs", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, QueryArgs.class)));
       metaDataMap = Collections.unmodifiableMap(tmpMap);
-      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addReadSession_args.class, metaDataMap);
+      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(search_args.class, metaDataMap);
     }
 
-    public addReadSession_args() {
+    public search_args() {
     }
 
-    public addReadSession_args(
-      Session session)
+    public search_args(
+      Session session,
+      QueryArgs queryArgs)
     {
       this();
       this.session = session;
+      this.queryArgs = queryArgs;
     }
 
     /**
      * Performs a deep copy on <i>other</i>.
      */
-    public addReadSession_args(addReadSession_args other) {
+    public search_args(search_args other) {
       if (other.isSetSession()) {
         this.session = new Session(other.session);
       }
+      if (other.isSetQueryArgs()) {
+        this.queryArgs = new QueryArgs(other.queryArgs);
+      }
     }
 
-    public addReadSession_args deepCopy() {
-      return new addReadSession_args(this);
+    public search_args deepCopy() {
+      return new search_args(this);
     }
 
     @Override
     public void clear() {
       this.session = null;
+      this.queryArgs = null;
     }
 
     public Session getSession() {
       return this.session;
     }
 
-    public addReadSession_args setSession(Session session) {
+    public search_args setSession(Session session) {
       this.session = session;
       return this;
     }
@@ -876,6 +925,30 @@ public class BlurShard {
       }
     }
 
+    public QueryArgs getQueryArgs() {
+      return this.queryArgs;
+    }
+
+    public search_args setQueryArgs(QueryArgs queryArgs) {
+      this.queryArgs = queryArgs;
+      return this;
+    }
+
+    public void unsetQueryArgs() {
+      this.queryArgs = null;
+    }
+
+    /** Returns true if field queryArgs is set (has been assigned a value) and false otherwise */
+    public boolean isSetQueryArgs() {
+      return this.queryArgs != null;
+    }
+
+    public void setQueryArgsIsSet(boolean value) {
+      if (!value) {
+        this.queryArgs = null;
+      }
+    }
+
     public void setFieldValue(_Fields field, Object value) {
       switch (field) {
       case SESSION:
@@ -886,6 +959,14 @@ public class BlurShard {
         }
         break;
 
+      case QUERY_ARGS:
+        if (value == null) {
+          unsetQueryArgs();
+        } else {
+          setQueryArgs((QueryArgs)value);
+        }
+        break;
+
       }
     }
 
@@ -894,6 +975,9 @@ public class BlurShard {
       case SESSION:
         return getSession();
 
+      case QUERY_ARGS:
+        return getQueryArgs();
+
       }
       throw new IllegalStateException();
     }
@@ -907,6 +991,8 @@ public class BlurShard {
       switch (field) {
       case SESSION:
         return isSetSession();
+      case QUERY_ARGS:
+        return isSetQueryArgs();
       }
       throw new IllegalStateException();
     }
@@ -915,12 +1001,12 @@ public class BlurShard {
     public boolean equals(Object that) {
       if (that == null)
         return false;
-      if (that instanceof addReadSession_args)
-        return this.equals((addReadSession_args)that);
+      if (that instanceof search_args)
+        return this.equals((search_args)that);
       return false;
     }
 
-    public boolean equals(addReadSession_args that) {
+    public boolean equals(search_args that) {
       if (that == null)
         return false;
 
@@ -933,6 +1019,15 @@ public class BlurShard {
           return false;
       }
 
+      boolean this_present_queryArgs = true && this.isSetQueryArgs();
+      boolean that_present_queryArgs = true && that.isSetQueryArgs();
+      if (this_present_queryArgs || that_present_queryArgs) {
+        if (!(this_present_queryArgs && that_present_queryArgs))
+          return false;
+        if (!this.queryArgs.equals(that.queryArgs))
+          return false;
+      }
+
       return true;
     }
 
@@ -941,13 +1036,13 @@ public class BlurShard {
       return 0;
     }
 
-    public int compareTo(addReadSession_args other) {
+    public int compareTo(search_args other) {
       if (!getClass().equals(other.getClass())) {
         return getClass().getName().compareTo(other.getClass().getName());
       }
 
       int lastComparison = 0;
-      addReadSession_args typedOther = (addReadSession_args)other;
+      search_args typedOther = (search_args)other;
 
       lastComparison = Boolean.valueOf(isSetSession()).compareTo(typedOther.isSetSession());
       if (lastComparison != 0) {
@@ -959,6 +1054,16 @@ public class BlurShard {
           return lastComparison;
         }
       }
+      lastComparison = Boolean.valueOf(isSetQueryArgs()).compareTo(typedOther.isSetQueryArgs());
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+      if (isSetQueryArgs()) {
+        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.queryArgs, typedOther.queryArgs);
+        if (lastComparison != 0) {
+          return lastComparison;
+        }
+      }
       return 0;
     }
 
@@ -984,6 +1089,14 @@ public class BlurShard {
               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);
         }
@@ -1004,13 +1117,18 @@ public class BlurShard {
         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();
     }
 
     @Override
     public String toString() {
-      StringBuilder sb = new StringBuilder("addReadSession_args(");
+      StringBuilder sb = new StringBuilder("search_args(");
       boolean first = true;
 
       sb.append("session:");
@@ -1020,6 +1138,14 @@ public class BlurShard {
         sb.append(this.session);
       }
       first = false;
+      if (!first) sb.append(", ");
+      sb.append("queryArgs:");
+      if (this.queryArgs == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.queryArgs);
+      }
+      first = false;
       sb.append(")");
       return sb.toString();
     }
@@ -1046,15 +1172,18 @@ public class BlurShard {
 
   }
 
-  public static class addReadSession_result implements org.apache.thrift.TBase<addReadSession_result, addReadSession_result._Fields>, java.io.Serializable, Cloneable   {
-    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addReadSession_result");
+  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 E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1);
 
+    public TopFieldDocs success; // required
     public BlurException e; // 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 {
+      SUCCESS((short)0, "success"),
       E((short)1, "e");
 
       private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
@@ -1070,6 +1199,8 @@ public class BlurShard {
        */
       public static _Fields findByThriftId(int fieldId) {
         switch(fieldId) {
+          case 0: // SUCCESS
+            return SUCCESS;
           case 1: // E
             return E;
           default:
@@ -1116,45 +1247,77 @@ public class BlurShard {
     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)));
       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);
-      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addReadSession_result.class, metaDataMap);
+      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(search_result.class, metaDataMap);
     }
 
-    public addReadSession_result() {
+    public search_result() {
     }
 
-    public addReadSession_result(
+    public search_result(
+      TopFieldDocs success,
       BlurException e)
     {
       this();
+      this.success = success;
       this.e = e;
     }
 
     /**
      * Performs a deep copy on <i>other</i>.
      */
-    public addReadSession_result(addReadSession_result other) {
+    public search_result(search_result other) {
+      if (other.isSetSuccess()) {
+        this.success = new TopFieldDocs(other.success);
+      }
       if (other.isSetE()) {
         this.e = new BlurException(other.e);
       }
     }
 
-    public addReadSession_result deepCopy() {
-      return new addReadSession_result(this);
+    public search_result deepCopy() {
+      return new search_result(this);
     }
 
     @Override
     public void clear() {
+      this.success = null;
       this.e = null;
     }
 
+    public TopFieldDocs getSuccess() {
+      return this.success;
+    }
+
+    public search_result setSuccess(TopFieldDocs success) {
+      this.success = success;
+      return this;
+    }
+
+    public void unsetSuccess() {
+      this.success = null;
+    }
+
+    /** Returns true if field success is set (has been assigned a value) and false otherwise */
+    public boolean isSetSuccess() {
+      return this.success != null;
+    }
+
+    public void setSuccessIsSet(boolean value) {
+      if (!value) {
+        this.success = null;
+      }
+    }
+
     public BlurException getE() {
       return this.e;
     }
 
-    public addReadSession_result setE(BlurException e) {
+    public search_result setE(BlurException e) {
       this.e = e;
       return this;
     }
@@ -1176,6 +1339,14 @@ public class BlurShard {
 
     public void setFieldValue(_Fields field, Object value) {
       switch (field) {
+      case SUCCESS:
+        if (value == null) {
+          unsetSuccess();
+        } else {
+          setSuccess((TopFieldDocs)value);
+        }
+        break;
+
       case E:
         if (value == null) {
           unsetE();
@@ -1189,6 +1360,9 @@ public class BlurShard {
 
     public Object getFieldValue(_Fields field) {
       switch (field) {
+      case SUCCESS:
+        return getSuccess();
+
       case E:
         return getE();
 
@@ -1203,6 +1377,8 @@ public class BlurShard {
       }
 
       switch (field) {
+      case SUCCESS:
+        return isSetSuccess();
       case E:
         return isSetE();
       }
@@ -1213,15 +1389,24 @@ public class BlurShard {
     public boolean equals(Object that) {
       if (that == null)
         return false;
-      if (that instanceof addReadSession_result)
-        return this.equals((addReadSession_result)that);
+      if (that instanceof search_result)
+        return this.equals((search_result)that);
       return false;
     }
 
-    public boolean equals(addReadSession_result that) {
+    public boolean equals(search_result that) {
       if (that == null)
         return false;
 
+      boolean this_present_success = true && this.isSetSuccess();
+      boolean that_present_success = true && that.isSetSuccess();
+      if (this_present_success || that_present_success) {
+        if (!(this_present_success && that_present_success))
+          return false;
+        if (!this.success.equals(that.success))
+          return false;
+      }
+
       boolean this_present_e = true && this.isSetE();
       boolean that_present_e = true && that.isSetE();
       if (this_present_e || that_present_e) {
@@ -1239,14 +1424,24 @@ public class BlurShard {
       return 0;
     }
 
-    public int compareTo(addReadSession_result other) {
+    public int compareTo(search_result other) {
       if (!getClass().equals(other.getClass())) {
         return getClass().getName().compareTo(other.getClass().getName());
       }
 
       int lastComparison = 0;
-      addReadSession_result typedOther = (addReadSession_result)other;
+      search_result typedOther = (search_result)other;
 
+      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+      if (isSetSuccess()) {
+        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
+        if (lastComparison != 0) {
+          return lastComparison;
+        }
+      }
       lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
       if (lastComparison != 0) {
         return lastComparison;
@@ -1274,6 +1469,14 @@ public class BlurShard {
           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();
@@ -1296,7 +1499,11 @@ public class BlurShard {
     public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
       oprot.writeStructBegin(STRUCT_DESC);
 
-      if (this.isSetE()) {
+      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();
@@ -1307,9 +1514,17 @@ public class BlurShard {
 
     @Override
     public String toString() {
-      StringBuilder sb = new StringBuilder("addReadSession_result(");
+      StringBuilder sb = new StringBuilder("search_result(");
       boolean first = true;
 
+      sb.append("success:");
+      if (this.success == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.success);
+      }
+      first = false;
+      if (!first) sb.append(", ");
       sb.append("e:");
       if (this.e == null) {
         sb.append("null");
@@ -1343,19 +1558,25 @@ public class BlurShard {
 
   }
 
-  public static class executeQuery_args implements org.apache.thrift.TBase<executeQuery_args, executeQuery_args._Fields>, java.io.Serializable, Cloneable   {
-    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("executeQuery_args");
+  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 QUERY_FIELD_DESC = new org.apache.thrift.protocol.TField("query", org.apache.thrift.protocol.TType.STRING, (short)2);
+    private static final org.apache.thrift.protocol.TField SHARD_INDEX_FIELD_DESC = new org.apache.thrift.protocol.TField("shardIndex", org.apache.thrift.protocol.TType.I32, (short)2);
+    private static final org.apache.thrift.protocol.TField DOC_FIELD_DESC = new org.apache.thrift.protocol.TField("doc", org.apache.thrift.protocol.TType.I32, (short)3);
+    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);
 
     public Session session; // required
-    public String query; // required
+    public int shardIndex; // required
+    public int doc; // 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"),
-      QUERY((short)2, "query");
+      SHARD_INDEX((short)2, "shardIndex"),
+      DOC((short)3, "doc"),
+      FIELDS((short)4, "fields");
 
       private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
 
@@ -1372,8 +1593,12 @@ public class BlurShard {
         switch(fieldId) {
           case 1: // SESSION
             return SESSION;
-          case 2: // QUERY
-            return QUERY;
+          case 2: // SHARD_INDEX
+            return SHARD_INDEX;
+          case 3: // DOC
+            return DOC;
+          case 4: // FIELDS
+            return FIELDS;
           default:
             return null;
         }
@@ -1414,57 +1639,83 @@ public class BlurShard {
     }
 
     // isset id assignments
+    private static final int __SHARDINDEX_ISSET_ID = 0;
+    private static final int __DOC_ISSET_ID = 1;
+    private BitSet __isset_bit_vector = new BitSet(2);
 
     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.SESSION, new org.apache.thrift.meta_data.FieldMetaData("session", org.apache.thrift.TFieldRequirementType.DEFAULT, 
           new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Session.class)));
-      tmpMap.put(_Fields.QUERY, new org.apache.thrift.meta_data.FieldMetaData("query", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+      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.DOC, new org.apache.thrift.meta_data.FieldMetaData("doc", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
+      tmpMap.put(_Fields.FIELDS, new org.apache.thrift.meta_data.FieldMetaData("fields", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+          new org.apache.thrift.meta_data.SetMetaData(org.apache.thrift.protocol.TType.SET, 
+              new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
       metaDataMap = Collections.unmodifiableMap(tmpMap);
-      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(executeQuery_args.class, metaDataMap);
+      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(doc_args.class, metaDataMap);
     }
 
-    public executeQuery_args() {
+    public doc_args() {
     }
 
-    public executeQuery_args(
+    public doc_args(
       Session session,
-      String query)
+      int shardIndex,
+      int doc,
+      Set<String> fields)
     {
       this();
       this.session = session;
-      this.query = query;
+      this.shardIndex = shardIndex;
+      setShardIndexIsSet(true);
+      this.doc = doc;
+      setDocIsSet(true);
+      this.fields = fields;
     }
 
     /**
      * Performs a deep copy on <i>other</i>.
      */
-    public executeQuery_args(executeQuery_args other) {
+    public doc_args(doc_args other) {
+      __isset_bit_vector.clear();
+      __isset_bit_vector.or(other.__isset_bit_vector);
       if (other.isSetSession()) {
         this.session = new Session(other.session);
       }
-      if (other.isSetQuery()) {
-        this.query = other.query;
+      this.shardIndex = other.shardIndex;
+      this.doc = other.doc;
+      if (other.isSetFields()) {
+        Set<String> __this__fields = new HashSet<String>();
+        for (String other_element : other.fields) {
+          __this__fields.add(other_element);
+        }
+        this.fields = __this__fields;
       }
     }
 
-    public executeQuery_args deepCopy() {
-      return new executeQuery_args(this);
+    public doc_args deepCopy() {
+      return new doc_args(this);
     }
 
     @Override
     public void clear() {
       this.session = null;
-      this.query = null;
+      setShardIndexIsSet(false);
+      this.shardIndex = 0;
+      setDocIsSet(false);
+      this.doc = 0;
+      this.fields = null;
     }
 
     public Session getSession() {
       return this.session;
     }
 
-    public executeQuery_args setSession(Session session) {
+    public doc_args setSession(Session session) {
       this.session = session;
       return this;
     }
@@ -1484,27 +1735,88 @@ public class BlurShard {
       }
     }
 
-    public String getQuery() {
-      return this.query;
+    public int getShardIndex() {
+      return this.shardIndex;
+    }
+
+    public doc_args setShardIndex(int shardIndex) {
+      this.shardIndex = shardIndex;
+      setShardIndexIsSet(true);
+      return this;
+    }
+
+    public void unsetShardIndex() {
+      __isset_bit_vector.clear(__SHARDINDEX_ISSET_ID);
+    }
+
+    /** Returns true if field shardIndex is set (has been assigned a value) and false otherwise */
+    public boolean isSetShardIndex() {
+      return __isset_bit_vector.get(__SHARDINDEX_ISSET_ID);
+    }
+
+    public void setShardIndexIsSet(boolean value) {
+      __isset_bit_vector.set(__SHARDINDEX_ISSET_ID, value);
+    }
+
+    public int getDoc() {
+      return this.doc;
+    }
+
+    public doc_args setDoc(int doc) {
+      this.doc = doc;
+      setDocIsSet(true);
+      return this;
+    }
+
+    public void unsetDoc() {
+      __isset_bit_vector.clear(__DOC_ISSET_ID);
+    }
+
+    /** Returns true if field doc is set (has been assigned a value) and false otherwise */
+    public boolean isSetDoc() {
+      return __isset_bit_vector.get(__DOC_ISSET_ID);
+    }
+
+    public void setDocIsSet(boolean value) {
+      __isset_bit_vector.set(__DOC_ISSET_ID, value);
+    }
+
+    public int getFieldsSize() {
+      return (this.fields == null) ? 0 : this.fields.size();
+    }
+
+    public java.util.Iterator<String> getFieldsIterator() {
+      return (this.fields == null) ? null : this.fields.iterator();
+    }
+
+    public void addToFields(String elem) {
+      if (this.fields == null) {
+        this.fields = new HashSet<String>();
+      }
+      this.fields.add(elem);
+    }
+
+    public Set<String> getFields() {
+      return this.fields;
     }
 
-    public executeQuery_args setQuery(String query) {
-      this.query = query;
+    public doc_args setFields(Set<String> fields) {
+      this.fields = fields;
       return this;
     }
 
-    public void unsetQuery() {
-      this.query = null;
+    public void unsetFields() {
+      this.fields = null;
     }
 
-    /** Returns true if field query is set (has been assigned a value) and false otherwise */
-    public boolean isSetQuery() {
-      return this.query != 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 setQueryIsSet(boolean value) {
+    public void setFieldsIsSet(boolean value) {
       if (!value) {
-        this.query = null;
+        this.fields = null;
       }
     }
 
@@ -1518,11 +1830,27 @@ public class BlurShard {
         }
         break;
 
-      case QUERY:
+      case SHARD_INDEX:
+        if (value == null) {
+          unsetShardIndex();
+        } else {
+          setShardIndex((Integer)value);
+        }
+        break;
+
+      case DOC:
+        if (value == null) {
+          unsetDoc();
+        } else {
+          setDoc((Integer)value);
+        }
+        break;
+
+      case FIELDS:
         if (value == null) {
-          unsetQuery();
+          unsetFields();
         } else {
-          setQuery((String)value);
+          setFields((Set<String>)value);
         }
         break;
 
@@ -1534,8 +1862,14 @@ public class BlurShard {
       case SESSION:
         return getSession();
 
-      case QUERY:
-        return getQuery();
+      case SHARD_INDEX:
+        return Integer.valueOf(getShardIndex());
+
+      case DOC:
+        return Integer.valueOf(getDoc());
+
+      case FIELDS:
+        return getFields();
 
       }
       throw new IllegalStateException();
@@ -1550,8 +1884,12 @@ public class BlurShard {
       switch (field) {
       case SESSION:
         return isSetSession();
-      case QUERY:
-        return isSetQuery();
+      case SHARD_INDEX:
+        return isSetShardIndex();
+      case DOC:
+        return isSetDoc();
+      case FIELDS:
+        return isSetFields();
       }
       throw new IllegalStateException();
     }
@@ -1560,12 +1898,12 @@ public class BlurShard {
     public boolean equals(Object that) {
       if (that == null)
         return false;
-      if (that instanceof executeQuery_args)
-        return this.equals((executeQuery_args)that);
+      if (that instanceof doc_args)
+        return this.equals((doc_args)that);
       return false;
     }
 
-    public boolean equals(executeQuery_args that) {
+    public boolean equals(doc_args that) {
       if (that == null)
         return false;
 
@@ -1578,12 +1916,30 @@ public class BlurShard {
           return false;
       }
 
-      boolean this_present_query = true && this.isSetQuery();
-      boolean that_present_query = true && that.isSetQuery();
-      if (this_present_query || that_present_query) {
-        if (!(this_present_query && that_present_query))
+      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_doc = true;
+      boolean that_present_doc = true;
+      if (this_present_doc || that_present_doc) {
+        if (!(this_present_doc && that_present_doc))
+          return false;
+        if (this.doc != that.doc)
+          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.query.equals(that.query))
+        if (!this.fields.equals(that.fields))
           return false;
       }
 
@@ -1595,13 +1951,13 @@ public class BlurShard {
       return 0;
     }
 
-    public int compareTo(executeQuery_args other) {
+    public int compareTo(doc_args other) {
       if (!getClass().equals(other.getClass())) {
         return getClass().getName().compareTo(other.getClass().getName());
       }
 
       int lastComparison = 0;
-      executeQuery_args typedOther = (executeQuery_args)other;
+      doc_args typedOther = (doc_args)other;
 
       lastComparison = Boolean.valueOf(isSetSession()).compareTo(typedOther.isSetSession());
       if (lastComparison != 0) {
@@ -1613,12 +1969,32 @@ public class BlurShard {
           return lastComparison;
         }
       }
-      lastComparison = Boolean.valueOf(isSetQuery()).compareTo(typedOther.isSetQuery());
+      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(isSetDoc()).compareTo(typedOther.isSetDoc());
       if (lastComparison != 0) {
         return lastComparison;
       }
-      if (isSetQuery()) {
-        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.query, typedOther.query);
+      if (isSetDoc()) {
+        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.doc, typedOther.doc);
+        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;
         }
@@ -1648,9 +2024,35 @@ public class BlurShard {
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
             }
             break;
-          case 2: // QUERY
-            if (field.type == org.apache.thrift.protocol.TType.STRING) {
-              this.query = iprot.readString();
+          case 2: // SHARD_INDEX
+            if (field.type == org.apache.thrift.protocol.TType.I32) {
+              this.shardIndex = iprot.readI32();
+              setShardIndexIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
+            }
+            break;
+          case 3: // DOC
+            if (field.type == org.apache.thrift.protocol.TType.I32) {
+              this.doc = iprot.readI32();
+              setDocIsSet(true);
+            } 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.thr

<TRUNCATED>

Mime
View raw message