incubator-blur-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amccu...@apache.org
Subject [34/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/interface/gen-perl/Blur/Lucene.pm
----------------------------------------------------------------------
diff --git a/interface/gen-perl/Blur/Lucene.pm b/interface/gen-perl/Blur/Lucene.pm
new file mode 100644
index 0000000..d4e9449
--- /dev/null
+++ b/interface/gen-perl/Blur/Lucene.pm
@@ -0,0 +1,2797 @@
+#
+# Autogenerated by Thrift Compiler (0.7.0)
+#
+# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+#
+require 5.6.0;
+use strict;
+use warnings;
+use Thrift;
+
+use Blur::Types;
+use Blur::Blur;
+
+# HELPER FUNCTIONS AND STRUCTURES
+
+package Blur::Lucene_openReadSession_args;
+use base qw(Class::Accessor);
+Blur::Lucene_openReadSession_args->mk_accessors( qw( table ) );
+
+sub new {
+    my $classname = shift;
+    my $self      = {};
+    my $vals      = shift || {};
+    $self->{table} = undef;
+    if (UNIVERSAL::isa($vals,'HASH')) {
+      if (defined $vals->{table}) {
+        $self->{table} = $vals->{table};
+      }
+    }
+    return bless ($self, $classname);
+}
+
+sub getName {
+    return 'Lucene_openReadSession_args';
+  }
+
+sub read {
+    my ($self, $input) = @_;
+    my $xfer  = 0;
+    my $fname;
+    my $ftype = 0;
+    my $fid   = 0;
+    $xfer += $input->readStructBegin(\$fname);
+    while (1) 
+    {
+      $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid);
+      if ($ftype == TType::STOP) {
+        last;
+      }
+      SWITCH: for($fid)
+      {
+        /^1$/ && do{        if ($ftype == TType::STRING) {
+          $xfer += $input->readString(\$self->{table});
+        } else {
+          $xfer += $input->skip($ftype);
+        }
+        last; };
+          $xfer += $input->skip($ftype);
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+sub write {
+    my ($self, $output) = @_;
+    my $xfer   = 0;
+    $xfer += $output->writeStructBegin('Lucene_openReadSession_args');
+    if (defined $self->{table}) {
+      $xfer += $output->writeFieldBegin('table', TType::STRING, 1);
+      $xfer += $output->writeString($self->{table});
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+package Blur::Lucene_openReadSession_result;
+use base qw(Class::Accessor);
+Blur::Lucene_openReadSession_result->mk_accessors( qw( success ) );
+
+sub new {
+    my $classname = shift;
+    my $self      = {};
+    my $vals      = shift || {};
+    $self->{success} = undef;
+    $self->{e} = undef;
+    if (UNIVERSAL::isa($vals,'HASH')) {
+      if (defined $vals->{success}) {
+        $self->{success} = $vals->{success};
+      }
+      if (defined $vals->{e}) {
+        $self->{e} = $vals->{e};
+      }
+    }
+    return bless ($self, $classname);
+}
+
+sub getName {
+    return 'Lucene_openReadSession_result';
+  }
+
+sub read {
+    my ($self, $input) = @_;
+    my $xfer  = 0;
+    my $fname;
+    my $ftype = 0;
+    my $fid   = 0;
+    $xfer += $input->readStructBegin(\$fname);
+    while (1) 
+    {
+      $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid);
+      if ($ftype == TType::STOP) {
+        last;
+      }
+      SWITCH: for($fid)
+      {
+        /^0$/ && do{        if ($ftype == TType::STRUCT) {
+          $self->{success} = new Blur::Session();
+          $xfer += $self->{success}->read($input);
+        } else {
+          $xfer += $input->skip($ftype);
+        }
+        last; };
+        /^1$/ && do{        if ($ftype == TType::STRUCT) {
+          $self->{e} = new Blur::BlurException();
+          $xfer += $self->{e}->read($input);
+        } else {
+          $xfer += $input->skip($ftype);
+        }
+        last; };
+          $xfer += $input->skip($ftype);
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+sub write {
+    my ($self, $output) = @_;
+    my $xfer   = 0;
+    $xfer += $output->writeStructBegin('Lucene_openReadSession_result');
+    if (defined $self->{success}) {
+      $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
+      $xfer += $self->{success}->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    if (defined $self->{e}) {
+      $xfer += $output->writeFieldBegin('e', TType::STRUCT, 1);
+      $xfer += $self->{e}->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+package Blur::Lucene_search_args;
+use base qw(Class::Accessor);
+Blur::Lucene_search_args->mk_accessors( qw( session queryArgs ) );
+
+sub new {
+    my $classname = shift;
+    my $self      = {};
+    my $vals      = shift || {};
+    $self->{session} = undef;
+    $self->{queryArgs} = undef;
+    if (UNIVERSAL::isa($vals,'HASH')) {
+      if (defined $vals->{session}) {
+        $self->{session} = $vals->{session};
+      }
+      if (defined $vals->{queryArgs}) {
+        $self->{queryArgs} = $vals->{queryArgs};
+      }
+    }
+    return bless ($self, $classname);
+}
+
+sub getName {
+    return 'Lucene_search_args';
+  }
+
+sub read {
+    my ($self, $input) = @_;
+    my $xfer  = 0;
+    my $fname;
+    my $ftype = 0;
+    my $fid   = 0;
+    $xfer += $input->readStructBegin(\$fname);
+    while (1) 
+    {
+      $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid);
+      if ($ftype == TType::STOP) {
+        last;
+      }
+      SWITCH: for($fid)
+      {
+        /^1$/ && do{        if ($ftype == TType::STRUCT) {
+          $self->{session} = new Blur::Session();
+          $xfer += $self->{session}->read($input);
+        } else {
+          $xfer += $input->skip($ftype);
+        }
+        last; };
+        /^2$/ && do{        if ($ftype == TType::STRUCT) {
+          $self->{queryArgs} = new Blur::QueryArgs();
+          $xfer += $self->{queryArgs}->read($input);
+        } else {
+          $xfer += $input->skip($ftype);
+        }
+        last; };
+          $xfer += $input->skip($ftype);
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+sub write {
+    my ($self, $output) = @_;
+    my $xfer   = 0;
+    $xfer += $output->writeStructBegin('Lucene_search_args');
+    if (defined $self->{session}) {
+      $xfer += $output->writeFieldBegin('session', TType::STRUCT, 1);
+      $xfer += $self->{session}->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    if (defined $self->{queryArgs}) {
+      $xfer += $output->writeFieldBegin('queryArgs', TType::STRUCT, 2);
+      $xfer += $self->{queryArgs}->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+package Blur::Lucene_search_result;
+use base qw(Class::Accessor);
+Blur::Lucene_search_result->mk_accessors( qw( success ) );
+
+sub new {
+    my $classname = shift;
+    my $self      = {};
+    my $vals      = shift || {};
+    $self->{success} = undef;
+    $self->{e} = undef;
+    if (UNIVERSAL::isa($vals,'HASH')) {
+      if (defined $vals->{success}) {
+        $self->{success} = $vals->{success};
+      }
+      if (defined $vals->{e}) {
+        $self->{e} = $vals->{e};
+      }
+    }
+    return bless ($self, $classname);
+}
+
+sub getName {
+    return 'Lucene_search_result';
+  }
+
+sub read {
+    my ($self, $input) = @_;
+    my $xfer  = 0;
+    my $fname;
+    my $ftype = 0;
+    my $fid   = 0;
+    $xfer += $input->readStructBegin(\$fname);
+    while (1) 
+    {
+      $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid);
+      if ($ftype == TType::STOP) {
+        last;
+      }
+      SWITCH: for($fid)
+      {
+        /^0$/ && do{        if ($ftype == TType::STRUCT) {
+          $self->{success} = new Blur::TopFieldDocs();
+          $xfer += $self->{success}->read($input);
+        } else {
+          $xfer += $input->skip($ftype);
+        }
+        last; };
+        /^1$/ && do{        if ($ftype == TType::STRUCT) {
+          $self->{e} = new Blur::BlurException();
+          $xfer += $self->{e}->read($input);
+        } else {
+          $xfer += $input->skip($ftype);
+        }
+        last; };
+          $xfer += $input->skip($ftype);
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+sub write {
+    my ($self, $output) = @_;
+    my $xfer   = 0;
+    $xfer += $output->writeStructBegin('Lucene_search_result');
+    if (defined $self->{success}) {
+      $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
+      $xfer += $self->{success}->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    if (defined $self->{e}) {
+      $xfer += $output->writeFieldBegin('e', TType::STRUCT, 1);
+      $xfer += $self->{e}->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+package Blur::Lucene_doc_args;
+use base qw(Class::Accessor);
+Blur::Lucene_doc_args->mk_accessors( qw( session docLocations fields ) );
+
+sub new {
+    my $classname = shift;
+    my $self      = {};
+    my $vals      = shift || {};
+    $self->{session} = undef;
+    $self->{docLocations} = undef;
+    $self->{fields} = undef;
+    if (UNIVERSAL::isa($vals,'HASH')) {
+      if (defined $vals->{session}) {
+        $self->{session} = $vals->{session};
+      }
+      if (defined $vals->{docLocations}) {
+        $self->{docLocations} = $vals->{docLocations};
+      }
+      if (defined $vals->{fields}) {
+        $self->{fields} = $vals->{fields};
+      }
+    }
+    return bless ($self, $classname);
+}
+
+sub getName {
+    return 'Lucene_doc_args';
+  }
+
+sub read {
+    my ($self, $input) = @_;
+    my $xfer  = 0;
+    my $fname;
+    my $ftype = 0;
+    my $fid   = 0;
+    $xfer += $input->readStructBegin(\$fname);
+    while (1) 
+    {
+      $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid);
+      if ($ftype == TType::STOP) {
+        last;
+      }
+      SWITCH: for($fid)
+      {
+        /^1$/ && do{        if ($ftype == TType::STRUCT) {
+          $self->{session} = new Blur::Session();
+          $xfer += $self->{session}->read($input);
+        } else {
+          $xfer += $input->skip($ftype);
+        }
+        last; };
+        /^2$/ && do{        if ($ftype == TType::LIST) {
+          {
+            my $_size279 = 0;
+            $self->{docLocations} = [];
+            my $_etype282 = 0;
+            $xfer += $input->readListBegin(\$_etype282, \$_size279);
+            for (my $_i283 = 0; $_i283 < $_size279; ++$_i283)
+            {
+              my $elem284 = undef;
+              $elem284 = new Blur::DocLocation();
+              $xfer += $elem284->read($input);
+              push(@{$self->{docLocations}},$elem284);
+            }
+            $xfer += $input->readListEnd();
+          }
+        } else {
+          $xfer += $input->skip($ftype);
+        }
+        last; };
+        /^4$/ && do{        if ($ftype == TType::SET) {
+          {
+            my $_size285 = 0;
+            $self->{fields} = {};
+            my $_etype288 = 0;
+            $xfer += $input->readSetBegin(\$_etype288, \$_size285);
+            for (my $_i289 = 0; $_i289 < $_size285; ++$_i289)
+            {
+              my $elem290 = undef;
+              $xfer += $input->readString(\$elem290);
+              $self->{fields}->{$elem290} = 1;
+            }
+            $xfer += $input->readSetEnd();
+          }
+        } else {
+          $xfer += $input->skip($ftype);
+        }
+        last; };
+          $xfer += $input->skip($ftype);
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+sub write {
+    my ($self, $output) = @_;
+    my $xfer   = 0;
+    $xfer += $output->writeStructBegin('Lucene_doc_args');
+    if (defined $self->{session}) {
+      $xfer += $output->writeFieldBegin('session', TType::STRUCT, 1);
+      $xfer += $self->{session}->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    if (defined $self->{docLocations}) {
+      $xfer += $output->writeFieldBegin('docLocations', TType::LIST, 2);
+      {
+        $xfer += $output->writeListBegin(TType::STRUCT, scalar(@{$self->{docLocations}}));
+        {
+          foreach my $iter291 (@{$self->{docLocations}}) 
+          {
+            $xfer += ${iter291}->write($output);
+          }
+        }
+        $xfer += $output->writeListEnd();
+      }
+      $xfer += $output->writeFieldEnd();
+    }
+    if (defined $self->{fields}) {
+      $xfer += $output->writeFieldBegin('fields', TType::SET, 4);
+      {
+        $xfer += $output->writeSetBegin(TType::STRING, scalar(@{$self->{fields}}));
+        {
+          foreach my $iter292 (@{$self->{fields}})
+          {
+            $xfer += $output->writeString($iter292);
+          }
+        }
+        $xfer += $output->writeSetEnd();
+      }
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+package Blur::Lucene_doc_result;
+use base qw(Class::Accessor);
+Blur::Lucene_doc_result->mk_accessors( qw( success ) );
+
+sub new {
+    my $classname = shift;
+    my $self      = {};
+    my $vals      = shift || {};
+    $self->{success} = undef;
+    $self->{e} = undef;
+    if (UNIVERSAL::isa($vals,'HASH')) {
+      if (defined $vals->{success}) {
+        $self->{success} = $vals->{success};
+      }
+      if (defined $vals->{e}) {
+        $self->{e} = $vals->{e};
+      }
+    }
+    return bless ($self, $classname);
+}
+
+sub getName {
+    return 'Lucene_doc_result';
+  }
+
+sub read {
+    my ($self, $input) = @_;
+    my $xfer  = 0;
+    my $fname;
+    my $ftype = 0;
+    my $fid   = 0;
+    $xfer += $input->readStructBegin(\$fname);
+    while (1) 
+    {
+      $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid);
+      if ($ftype == TType::STOP) {
+        last;
+      }
+      SWITCH: for($fid)
+      {
+        /^0$/ && do{        if ($ftype == TType::LIST) {
+          {
+            my $_size293 = 0;
+            $self->{success} = [];
+            my $_etype296 = 0;
+            $xfer += $input->readListBegin(\$_etype296, \$_size293);
+            for (my $_i297 = 0; $_i297 < $_size293; ++$_i297)
+            {
+              my $elem298 = undef;
+              $elem298 = new Blur::Document();
+              $xfer += $elem298->read($input);
+              push(@{$self->{success}},$elem298);
+            }
+            $xfer += $input->readListEnd();
+          }
+        } else {
+          $xfer += $input->skip($ftype);
+        }
+        last; };
+        /^1$/ && do{        if ($ftype == TType::STRUCT) {
+          $self->{e} = new Blur::BlurException();
+          $xfer += $self->{e}->read($input);
+        } else {
+          $xfer += $input->skip($ftype);
+        }
+        last; };
+          $xfer += $input->skip($ftype);
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+sub write {
+    my ($self, $output) = @_;
+    my $xfer   = 0;
+    $xfer += $output->writeStructBegin('Lucene_doc_result');
+    if (defined $self->{success}) {
+      $xfer += $output->writeFieldBegin('success', TType::LIST, 0);
+      {
+        $xfer += $output->writeListBegin(TType::STRUCT, scalar(@{$self->{success}}));
+        {
+          foreach my $iter299 (@{$self->{success}}) 
+          {
+            $xfer += ${iter299}->write($output);
+          }
+        }
+        $xfer += $output->writeListEnd();
+      }
+      $xfer += $output->writeFieldEnd();
+    }
+    if (defined $self->{e}) {
+      $xfer += $output->writeFieldBegin('e', TType::STRUCT, 1);
+      $xfer += $self->{e}->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+package Blur::Lucene_closeReadSession_args;
+use base qw(Class::Accessor);
+Blur::Lucene_closeReadSession_args->mk_accessors( qw( session ) );
+
+sub new {
+    my $classname = shift;
+    my $self      = {};
+    my $vals      = shift || {};
+    $self->{session} = undef;
+    if (UNIVERSAL::isa($vals,'HASH')) {
+      if (defined $vals->{session}) {
+        $self->{session} = $vals->{session};
+      }
+    }
+    return bless ($self, $classname);
+}
+
+sub getName {
+    return 'Lucene_closeReadSession_args';
+  }
+
+sub read {
+    my ($self, $input) = @_;
+    my $xfer  = 0;
+    my $fname;
+    my $ftype = 0;
+    my $fid   = 0;
+    $xfer += $input->readStructBegin(\$fname);
+    while (1) 
+    {
+      $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid);
+      if ($ftype == TType::STOP) {
+        last;
+      }
+      SWITCH: for($fid)
+      {
+        /^1$/ && do{        if ($ftype == TType::STRUCT) {
+          $self->{session} = new Blur::Session();
+          $xfer += $self->{session}->read($input);
+        } else {
+          $xfer += $input->skip($ftype);
+        }
+        last; };
+          $xfer += $input->skip($ftype);
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+sub write {
+    my ($self, $output) = @_;
+    my $xfer   = 0;
+    $xfer += $output->writeStructBegin('Lucene_closeReadSession_args');
+    if (defined $self->{session}) {
+      $xfer += $output->writeFieldBegin('session', TType::STRUCT, 1);
+      $xfer += $self->{session}->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+package Blur::Lucene_closeReadSession_result;
+use base qw(Class::Accessor);
+Blur::Lucene_closeReadSession_result->mk_accessors( qw( ) );
+
+sub new {
+    my $classname = shift;
+    my $self      = {};
+    my $vals      = shift || {};
+    $self->{e} = undef;
+    if (UNIVERSAL::isa($vals,'HASH')) {
+      if (defined $vals->{e}) {
+        $self->{e} = $vals->{e};
+      }
+    }
+    return bless ($self, $classname);
+}
+
+sub getName {
+    return 'Lucene_closeReadSession_result';
+  }
+
+sub read {
+    my ($self, $input) = @_;
+    my $xfer  = 0;
+    my $fname;
+    my $ftype = 0;
+    my $fid   = 0;
+    $xfer += $input->readStructBegin(\$fname);
+    while (1) 
+    {
+      $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid);
+      if ($ftype == TType::STOP) {
+        last;
+      }
+      SWITCH: for($fid)
+      {
+        /^1$/ && do{        if ($ftype == TType::STRUCT) {
+          $self->{e} = new Blur::BlurException();
+          $xfer += $self->{e}->read($input);
+        } else {
+          $xfer += $input->skip($ftype);
+        }
+        last; };
+          $xfer += $input->skip($ftype);
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+sub write {
+    my ($self, $output) = @_;
+    my $xfer   = 0;
+    $xfer += $output->writeStructBegin('Lucene_closeReadSession_result');
+    if (defined $self->{e}) {
+      $xfer += $output->writeFieldBegin('e', TType::STRUCT, 1);
+      $xfer += $self->{e}->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+package Blur::Lucene_openWriteSession_args;
+use base qw(Class::Accessor);
+Blur::Lucene_openWriteSession_args->mk_accessors( qw( table ) );
+
+sub new {
+    my $classname = shift;
+    my $self      = {};
+    my $vals      = shift || {};
+    $self->{table} = undef;
+    if (UNIVERSAL::isa($vals,'HASH')) {
+      if (defined $vals->{table}) {
+        $self->{table} = $vals->{table};
+      }
+    }
+    return bless ($self, $classname);
+}
+
+sub getName {
+    return 'Lucene_openWriteSession_args';
+  }
+
+sub read {
+    my ($self, $input) = @_;
+    my $xfer  = 0;
+    my $fname;
+    my $ftype = 0;
+    my $fid   = 0;
+    $xfer += $input->readStructBegin(\$fname);
+    while (1) 
+    {
+      $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid);
+      if ($ftype == TType::STOP) {
+        last;
+      }
+      SWITCH: for($fid)
+      {
+        /^1$/ && do{        if ($ftype == TType::STRING) {
+          $xfer += $input->readString(\$self->{table});
+        } else {
+          $xfer += $input->skip($ftype);
+        }
+        last; };
+          $xfer += $input->skip($ftype);
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+sub write {
+    my ($self, $output) = @_;
+    my $xfer   = 0;
+    $xfer += $output->writeStructBegin('Lucene_openWriteSession_args');
+    if (defined $self->{table}) {
+      $xfer += $output->writeFieldBegin('table', TType::STRING, 1);
+      $xfer += $output->writeString($self->{table});
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+package Blur::Lucene_openWriteSession_result;
+use base qw(Class::Accessor);
+Blur::Lucene_openWriteSession_result->mk_accessors( qw( success ) );
+
+sub new {
+    my $classname = shift;
+    my $self      = {};
+    my $vals      = shift || {};
+    $self->{success} = undef;
+    $self->{e} = undef;
+    if (UNIVERSAL::isa($vals,'HASH')) {
+      if (defined $vals->{success}) {
+        $self->{success} = $vals->{success};
+      }
+      if (defined $vals->{e}) {
+        $self->{e} = $vals->{e};
+      }
+    }
+    return bless ($self, $classname);
+}
+
+sub getName {
+    return 'Lucene_openWriteSession_result';
+  }
+
+sub read {
+    my ($self, $input) = @_;
+    my $xfer  = 0;
+    my $fname;
+    my $ftype = 0;
+    my $fid   = 0;
+    $xfer += $input->readStructBegin(\$fname);
+    while (1) 
+    {
+      $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid);
+      if ($ftype == TType::STOP) {
+        last;
+      }
+      SWITCH: for($fid)
+      {
+        /^0$/ && do{        if ($ftype == TType::STRUCT) {
+          $self->{success} = new Blur::Session();
+          $xfer += $self->{success}->read($input);
+        } else {
+          $xfer += $input->skip($ftype);
+        }
+        last; };
+        /^1$/ && do{        if ($ftype == TType::STRUCT) {
+          $self->{e} = new Blur::BlurException();
+          $xfer += $self->{e}->read($input);
+        } else {
+          $xfer += $input->skip($ftype);
+        }
+        last; };
+          $xfer += $input->skip($ftype);
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+sub write {
+    my ($self, $output) = @_;
+    my $xfer   = 0;
+    $xfer += $output->writeStructBegin('Lucene_openWriteSession_result');
+    if (defined $self->{success}) {
+      $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
+      $xfer += $self->{success}->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    if (defined $self->{e}) {
+      $xfer += $output->writeFieldBegin('e', TType::STRUCT, 1);
+      $xfer += $self->{e}->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+package Blur::Lucene_addDocuments_args;
+use base qw(Class::Accessor);
+Blur::Lucene_addDocuments_args->mk_accessors( qw( session shardIndex document ) );
+
+sub new {
+    my $classname = shift;
+    my $self      = {};
+    my $vals      = shift || {};
+    $self->{session} = undef;
+    $self->{shardIndex} = undef;
+    $self->{document} = undef;
+    if (UNIVERSAL::isa($vals,'HASH')) {
+      if (defined $vals->{session}) {
+        $self->{session} = $vals->{session};
+      }
+      if (defined $vals->{shardIndex}) {
+        $self->{shardIndex} = $vals->{shardIndex};
+      }
+      if (defined $vals->{document}) {
+        $self->{document} = $vals->{document};
+      }
+    }
+    return bless ($self, $classname);
+}
+
+sub getName {
+    return 'Lucene_addDocuments_args';
+  }
+
+sub read {
+    my ($self, $input) = @_;
+    my $xfer  = 0;
+    my $fname;
+    my $ftype = 0;
+    my $fid   = 0;
+    $xfer += $input->readStructBegin(\$fname);
+    while (1) 
+    {
+      $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid);
+      if ($ftype == TType::STOP) {
+        last;
+      }
+      SWITCH: for($fid)
+      {
+        /^1$/ && do{        if ($ftype == TType::STRUCT) {
+          $self->{session} = new Blur::Session();
+          $xfer += $self->{session}->read($input);
+        } else {
+          $xfer += $input->skip($ftype);
+        }
+        last; };
+        /^2$/ && do{        if ($ftype == TType::I32) {
+          $xfer += $input->readI32(\$self->{shardIndex});
+        } else {
+          $xfer += $input->skip($ftype);
+        }
+        last; };
+        /^3$/ && do{        if ($ftype == TType::LIST) {
+          {
+            my $_size300 = 0;
+            $self->{document} = [];
+            my $_etype303 = 0;
+            $xfer += $input->readListBegin(\$_etype303, \$_size300);
+            for (my $_i304 = 0; $_i304 < $_size300; ++$_i304)
+            {
+              my $elem305 = undef;
+              $elem305 = new Blur::Document();
+              $xfer += $elem305->read($input);
+              push(@{$self->{document}},$elem305);
+            }
+            $xfer += $input->readListEnd();
+          }
+        } else {
+          $xfer += $input->skip($ftype);
+        }
+        last; };
+          $xfer += $input->skip($ftype);
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+sub write {
+    my ($self, $output) = @_;
+    my $xfer   = 0;
+    $xfer += $output->writeStructBegin('Lucene_addDocuments_args');
+    if (defined $self->{session}) {
+      $xfer += $output->writeFieldBegin('session', TType::STRUCT, 1);
+      $xfer += $self->{session}->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    if (defined $self->{shardIndex}) {
+      $xfer += $output->writeFieldBegin('shardIndex', TType::I32, 2);
+      $xfer += $output->writeI32($self->{shardIndex});
+      $xfer += $output->writeFieldEnd();
+    }
+    if (defined $self->{document}) {
+      $xfer += $output->writeFieldBegin('document', TType::LIST, 3);
+      {
+        $xfer += $output->writeListBegin(TType::STRUCT, scalar(@{$self->{document}}));
+        {
+          foreach my $iter306 (@{$self->{document}}) 
+          {
+            $xfer += ${iter306}->write($output);
+          }
+        }
+        $xfer += $output->writeListEnd();
+      }
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+package Blur::Lucene_addDocuments_result;
+use base qw(Class::Accessor);
+Blur::Lucene_addDocuments_result->mk_accessors( qw( ) );
+
+sub new {
+    my $classname = shift;
+    my $self      = {};
+    my $vals      = shift || {};
+    $self->{e} = undef;
+    if (UNIVERSAL::isa($vals,'HASH')) {
+      if (defined $vals->{e}) {
+        $self->{e} = $vals->{e};
+      }
+    }
+    return bless ($self, $classname);
+}
+
+sub getName {
+    return 'Lucene_addDocuments_result';
+  }
+
+sub read {
+    my ($self, $input) = @_;
+    my $xfer  = 0;
+    my $fname;
+    my $ftype = 0;
+    my $fid   = 0;
+    $xfer += $input->readStructBegin(\$fname);
+    while (1) 
+    {
+      $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid);
+      if ($ftype == TType::STOP) {
+        last;
+      }
+      SWITCH: for($fid)
+      {
+        /^1$/ && do{        if ($ftype == TType::STRUCT) {
+          $self->{e} = new Blur::BlurException();
+          $xfer += $self->{e}->read($input);
+        } else {
+          $xfer += $input->skip($ftype);
+        }
+        last; };
+          $xfer += $input->skip($ftype);
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+sub write {
+    my ($self, $output) = @_;
+    my $xfer   = 0;
+    $xfer += $output->writeStructBegin('Lucene_addDocuments_result');
+    if (defined $self->{e}) {
+      $xfer += $output->writeFieldBegin('e', TType::STRUCT, 1);
+      $xfer += $self->{e}->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+package Blur::Lucene_deleteDocumentsByQueries_args;
+use base qw(Class::Accessor);
+Blur::Lucene_deleteDocumentsByQueries_args->mk_accessors( qw( session shardIndex queries ) );
+
+sub new {
+    my $classname = shift;
+    my $self      = {};
+    my $vals      = shift || {};
+    $self->{session} = undef;
+    $self->{shardIndex} = undef;
+    $self->{queries} = undef;
+    if (UNIVERSAL::isa($vals,'HASH')) {
+      if (defined $vals->{session}) {
+        $self->{session} = $vals->{session};
+      }
+      if (defined $vals->{shardIndex}) {
+        $self->{shardIndex} = $vals->{shardIndex};
+      }
+      if (defined $vals->{queries}) {
+        $self->{queries} = $vals->{queries};
+      }
+    }
+    return bless ($self, $classname);
+}
+
+sub getName {
+    return 'Lucene_deleteDocumentsByQueries_args';
+  }
+
+sub read {
+    my ($self, $input) = @_;
+    my $xfer  = 0;
+    my $fname;
+    my $ftype = 0;
+    my $fid   = 0;
+    $xfer += $input->readStructBegin(\$fname);
+    while (1) 
+    {
+      $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid);
+      if ($ftype == TType::STOP) {
+        last;
+      }
+      SWITCH: for($fid)
+      {
+        /^1$/ && do{        if ($ftype == TType::STRUCT) {
+          $self->{session} = new Blur::Session();
+          $xfer += $self->{session}->read($input);
+        } else {
+          $xfer += $input->skip($ftype);
+        }
+        last; };
+        /^2$/ && do{        if ($ftype == TType::I32) {
+          $xfer += $input->readI32(\$self->{shardIndex});
+        } else {
+          $xfer += $input->skip($ftype);
+        }
+        last; };
+        /^3$/ && do{        if ($ftype == TType::LIST) {
+          {
+            my $_size307 = 0;
+            $self->{queries} = [];
+            my $_etype310 = 0;
+            $xfer += $input->readListBegin(\$_etype310, \$_size307);
+            for (my $_i311 = 0; $_i311 < $_size307; ++$_i311)
+            {
+              my $elem312 = undef;
+              $elem312 = new Blur::QueryArgs();
+              $xfer += $elem312->read($input);
+              push(@{$self->{queries}},$elem312);
+            }
+            $xfer += $input->readListEnd();
+          }
+        } else {
+          $xfer += $input->skip($ftype);
+        }
+        last; };
+          $xfer += $input->skip($ftype);
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+sub write {
+    my ($self, $output) = @_;
+    my $xfer   = 0;
+    $xfer += $output->writeStructBegin('Lucene_deleteDocumentsByQueries_args');
+    if (defined $self->{session}) {
+      $xfer += $output->writeFieldBegin('session', TType::STRUCT, 1);
+      $xfer += $self->{session}->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    if (defined $self->{shardIndex}) {
+      $xfer += $output->writeFieldBegin('shardIndex', TType::I32, 2);
+      $xfer += $output->writeI32($self->{shardIndex});
+      $xfer += $output->writeFieldEnd();
+    }
+    if (defined $self->{queries}) {
+      $xfer += $output->writeFieldBegin('queries', TType::LIST, 3);
+      {
+        $xfer += $output->writeListBegin(TType::STRUCT, scalar(@{$self->{queries}}));
+        {
+          foreach my $iter313 (@{$self->{queries}}) 
+          {
+            $xfer += ${iter313}->write($output);
+          }
+        }
+        $xfer += $output->writeListEnd();
+      }
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+package Blur::Lucene_deleteDocumentsByQueries_result;
+use base qw(Class::Accessor);
+Blur::Lucene_deleteDocumentsByQueries_result->mk_accessors( qw( ) );
+
+sub new {
+    my $classname = shift;
+    my $self      = {};
+    my $vals      = shift || {};
+    $self->{e} = undef;
+    if (UNIVERSAL::isa($vals,'HASH')) {
+      if (defined $vals->{e}) {
+        $self->{e} = $vals->{e};
+      }
+    }
+    return bless ($self, $classname);
+}
+
+sub getName {
+    return 'Lucene_deleteDocumentsByQueries_result';
+  }
+
+sub read {
+    my ($self, $input) = @_;
+    my $xfer  = 0;
+    my $fname;
+    my $ftype = 0;
+    my $fid   = 0;
+    $xfer += $input->readStructBegin(\$fname);
+    while (1) 
+    {
+      $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid);
+      if ($ftype == TType::STOP) {
+        last;
+      }
+      SWITCH: for($fid)
+      {
+        /^1$/ && do{        if ($ftype == TType::STRUCT) {
+          $self->{e} = new Blur::BlurException();
+          $xfer += $self->{e}->read($input);
+        } else {
+          $xfer += $input->skip($ftype);
+        }
+        last; };
+          $xfer += $input->skip($ftype);
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+sub write {
+    my ($self, $output) = @_;
+    my $xfer   = 0;
+    $xfer += $output->writeStructBegin('Lucene_deleteDocumentsByQueries_result');
+    if (defined $self->{e}) {
+      $xfer += $output->writeFieldBegin('e', TType::STRUCT, 1);
+      $xfer += $self->{e}->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+package Blur::Lucene_deleteDocuments_args;
+use base qw(Class::Accessor);
+Blur::Lucene_deleteDocuments_args->mk_accessors( qw( session shardIndex terms ) );
+
+sub new {
+    my $classname = shift;
+    my $self      = {};
+    my $vals      = shift || {};
+    $self->{session} = undef;
+    $self->{shardIndex} = undef;
+    $self->{terms} = undef;
+    if (UNIVERSAL::isa($vals,'HASH')) {
+      if (defined $vals->{session}) {
+        $self->{session} = $vals->{session};
+      }
+      if (defined $vals->{shardIndex}) {
+        $self->{shardIndex} = $vals->{shardIndex};
+      }
+      if (defined $vals->{terms}) {
+        $self->{terms} = $vals->{terms};
+      }
+    }
+    return bless ($self, $classname);
+}
+
+sub getName {
+    return 'Lucene_deleteDocuments_args';
+  }
+
+sub read {
+    my ($self, $input) = @_;
+    my $xfer  = 0;
+    my $fname;
+    my $ftype = 0;
+    my $fid   = 0;
+    $xfer += $input->readStructBegin(\$fname);
+    while (1) 
+    {
+      $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid);
+      if ($ftype == TType::STOP) {
+        last;
+      }
+      SWITCH: for($fid)
+      {
+        /^1$/ && do{        if ($ftype == TType::STRUCT) {
+          $self->{session} = new Blur::Session();
+          $xfer += $self->{session}->read($input);
+        } else {
+          $xfer += $input->skip($ftype);
+        }
+        last; };
+        /^2$/ && do{        if ($ftype == TType::I32) {
+          $xfer += $input->readI32(\$self->{shardIndex});
+        } else {
+          $xfer += $input->skip($ftype);
+        }
+        last; };
+        /^3$/ && do{        if ($ftype == TType::LIST) {
+          {
+            my $_size314 = 0;
+            $self->{terms} = [];
+            my $_etype317 = 0;
+            $xfer += $input->readListBegin(\$_etype317, \$_size314);
+            for (my $_i318 = 0; $_i318 < $_size314; ++$_i318)
+            {
+              my $elem319 = undef;
+              $elem319 = new Blur::Term();
+              $xfer += $elem319->read($input);
+              push(@{$self->{terms}},$elem319);
+            }
+            $xfer += $input->readListEnd();
+          }
+        } else {
+          $xfer += $input->skip($ftype);
+        }
+        last; };
+          $xfer += $input->skip($ftype);
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+sub write {
+    my ($self, $output) = @_;
+    my $xfer   = 0;
+    $xfer += $output->writeStructBegin('Lucene_deleteDocuments_args');
+    if (defined $self->{session}) {
+      $xfer += $output->writeFieldBegin('session', TType::STRUCT, 1);
+      $xfer += $self->{session}->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    if (defined $self->{shardIndex}) {
+      $xfer += $output->writeFieldBegin('shardIndex', TType::I32, 2);
+      $xfer += $output->writeI32($self->{shardIndex});
+      $xfer += $output->writeFieldEnd();
+    }
+    if (defined $self->{terms}) {
+      $xfer += $output->writeFieldBegin('terms', TType::LIST, 3);
+      {
+        $xfer += $output->writeListBegin(TType::STRUCT, scalar(@{$self->{terms}}));
+        {
+          foreach my $iter320 (@{$self->{terms}}) 
+          {
+            $xfer += ${iter320}->write($output);
+          }
+        }
+        $xfer += $output->writeListEnd();
+      }
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+package Blur::Lucene_deleteDocuments_result;
+use base qw(Class::Accessor);
+Blur::Lucene_deleteDocuments_result->mk_accessors( qw( ) );
+
+sub new {
+    my $classname = shift;
+    my $self      = {};
+    my $vals      = shift || {};
+    $self->{e} = undef;
+    if (UNIVERSAL::isa($vals,'HASH')) {
+      if (defined $vals->{e}) {
+        $self->{e} = $vals->{e};
+      }
+    }
+    return bless ($self, $classname);
+}
+
+sub getName {
+    return 'Lucene_deleteDocuments_result';
+  }
+
+sub read {
+    my ($self, $input) = @_;
+    my $xfer  = 0;
+    my $fname;
+    my $ftype = 0;
+    my $fid   = 0;
+    $xfer += $input->readStructBegin(\$fname);
+    while (1) 
+    {
+      $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid);
+      if ($ftype == TType::STOP) {
+        last;
+      }
+      SWITCH: for($fid)
+      {
+        /^1$/ && do{        if ($ftype == TType::STRUCT) {
+          $self->{e} = new Blur::BlurException();
+          $xfer += $self->{e}->read($input);
+        } else {
+          $xfer += $input->skip($ftype);
+        }
+        last; };
+          $xfer += $input->skip($ftype);
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+sub write {
+    my ($self, $output) = @_;
+    my $xfer   = 0;
+    $xfer += $output->writeStructBegin('Lucene_deleteDocuments_result');
+    if (defined $self->{e}) {
+      $xfer += $output->writeFieldBegin('e', TType::STRUCT, 1);
+      $xfer += $self->{e}->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+package Blur::Lucene_updateDocuments_args;
+use base qw(Class::Accessor);
+Blur::Lucene_updateDocuments_args->mk_accessors( qw( session shardIndex terms document ) );
+
+sub new {
+    my $classname = shift;
+    my $self      = {};
+    my $vals      = shift || {};
+    $self->{session} = undef;
+    $self->{shardIndex} = undef;
+    $self->{terms} = undef;
+    $self->{document} = undef;
+    if (UNIVERSAL::isa($vals,'HASH')) {
+      if (defined $vals->{session}) {
+        $self->{session} = $vals->{session};
+      }
+      if (defined $vals->{shardIndex}) {
+        $self->{shardIndex} = $vals->{shardIndex};
+      }
+      if (defined $vals->{terms}) {
+        $self->{terms} = $vals->{terms};
+      }
+      if (defined $vals->{document}) {
+        $self->{document} = $vals->{document};
+      }
+    }
+    return bless ($self, $classname);
+}
+
+sub getName {
+    return 'Lucene_updateDocuments_args';
+  }
+
+sub read {
+    my ($self, $input) = @_;
+    my $xfer  = 0;
+    my $fname;
+    my $ftype = 0;
+    my $fid   = 0;
+    $xfer += $input->readStructBegin(\$fname);
+    while (1) 
+    {
+      $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid);
+      if ($ftype == TType::STOP) {
+        last;
+      }
+      SWITCH: for($fid)
+      {
+        /^1$/ && do{        if ($ftype == TType::STRUCT) {
+          $self->{session} = new Blur::Session();
+          $xfer += $self->{session}->read($input);
+        } else {
+          $xfer += $input->skip($ftype);
+        }
+        last; };
+        /^2$/ && do{        if ($ftype == TType::I32) {
+          $xfer += $input->readI32(\$self->{shardIndex});
+        } else {
+          $xfer += $input->skip($ftype);
+        }
+        last; };
+        /^3$/ && do{        if ($ftype == TType::LIST) {
+          {
+            my $_size321 = 0;
+            $self->{terms} = [];
+            my $_etype324 = 0;
+            $xfer += $input->readListBegin(\$_etype324, \$_size321);
+            for (my $_i325 = 0; $_i325 < $_size321; ++$_i325)
+            {
+              my $elem326 = undef;
+              $elem326 = new Blur::Term();
+              $xfer += $elem326->read($input);
+              push(@{$self->{terms}},$elem326);
+            }
+            $xfer += $input->readListEnd();
+          }
+        } else {
+          $xfer += $input->skip($ftype);
+        }
+        last; };
+        /^4$/ && do{        if ($ftype == TType::LIST) {
+          {
+            my $_size327 = 0;
+            $self->{document} = [];
+            my $_etype330 = 0;
+            $xfer += $input->readListBegin(\$_etype330, \$_size327);
+            for (my $_i331 = 0; $_i331 < $_size327; ++$_i331)
+            {
+              my $elem332 = undef;
+              $elem332 = new Blur::Document();
+              $xfer += $elem332->read($input);
+              push(@{$self->{document}},$elem332);
+            }
+            $xfer += $input->readListEnd();
+          }
+        } else {
+          $xfer += $input->skip($ftype);
+        }
+        last; };
+          $xfer += $input->skip($ftype);
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+sub write {
+    my ($self, $output) = @_;
+    my $xfer   = 0;
+    $xfer += $output->writeStructBegin('Lucene_updateDocuments_args');
+    if (defined $self->{session}) {
+      $xfer += $output->writeFieldBegin('session', TType::STRUCT, 1);
+      $xfer += $self->{session}->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    if (defined $self->{shardIndex}) {
+      $xfer += $output->writeFieldBegin('shardIndex', TType::I32, 2);
+      $xfer += $output->writeI32($self->{shardIndex});
+      $xfer += $output->writeFieldEnd();
+    }
+    if (defined $self->{terms}) {
+      $xfer += $output->writeFieldBegin('terms', TType::LIST, 3);
+      {
+        $xfer += $output->writeListBegin(TType::STRUCT, scalar(@{$self->{terms}}));
+        {
+          foreach my $iter333 (@{$self->{terms}}) 
+          {
+            $xfer += ${iter333}->write($output);
+          }
+        }
+        $xfer += $output->writeListEnd();
+      }
+      $xfer += $output->writeFieldEnd();
+    }
+    if (defined $self->{document}) {
+      $xfer += $output->writeFieldBegin('document', TType::LIST, 4);
+      {
+        $xfer += $output->writeListBegin(TType::STRUCT, scalar(@{$self->{document}}));
+        {
+          foreach my $iter334 (@{$self->{document}}) 
+          {
+            $xfer += ${iter334}->write($output);
+          }
+        }
+        $xfer += $output->writeListEnd();
+      }
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+package Blur::Lucene_updateDocuments_result;
+use base qw(Class::Accessor);
+Blur::Lucene_updateDocuments_result->mk_accessors( qw( ) );
+
+sub new {
+    my $classname = shift;
+    my $self      = {};
+    my $vals      = shift || {};
+    $self->{e} = undef;
+    if (UNIVERSAL::isa($vals,'HASH')) {
+      if (defined $vals->{e}) {
+        $self->{e} = $vals->{e};
+      }
+    }
+    return bless ($self, $classname);
+}
+
+sub getName {
+    return 'Lucene_updateDocuments_result';
+  }
+
+sub read {
+    my ($self, $input) = @_;
+    my $xfer  = 0;
+    my $fname;
+    my $ftype = 0;
+    my $fid   = 0;
+    $xfer += $input->readStructBegin(\$fname);
+    while (1) 
+    {
+      $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid);
+      if ($ftype == TType::STOP) {
+        last;
+      }
+      SWITCH: for($fid)
+      {
+        /^1$/ && do{        if ($ftype == TType::STRUCT) {
+          $self->{e} = new Blur::BlurException();
+          $xfer += $self->{e}->read($input);
+        } else {
+          $xfer += $input->skip($ftype);
+        }
+        last; };
+          $xfer += $input->skip($ftype);
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+sub write {
+    my ($self, $output) = @_;
+    my $xfer   = 0;
+    $xfer += $output->writeStructBegin('Lucene_updateDocuments_result');
+    if (defined $self->{e}) {
+      $xfer += $output->writeFieldBegin('e', TType::STRUCT, 1);
+      $xfer += $self->{e}->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+package Blur::Lucene_commit_args;
+use base qw(Class::Accessor);
+Blur::Lucene_commit_args->mk_accessors( qw( session ) );
+
+sub new {
+    my $classname = shift;
+    my $self      = {};
+    my $vals      = shift || {};
+    $self->{session} = undef;
+    if (UNIVERSAL::isa($vals,'HASH')) {
+      if (defined $vals->{session}) {
+        $self->{session} = $vals->{session};
+      }
+    }
+    return bless ($self, $classname);
+}
+
+sub getName {
+    return 'Lucene_commit_args';
+  }
+
+sub read {
+    my ($self, $input) = @_;
+    my $xfer  = 0;
+    my $fname;
+    my $ftype = 0;
+    my $fid   = 0;
+    $xfer += $input->readStructBegin(\$fname);
+    while (1) 
+    {
+      $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid);
+      if ($ftype == TType::STOP) {
+        last;
+      }
+      SWITCH: for($fid)
+      {
+        /^1$/ && do{        if ($ftype == TType::STRUCT) {
+          $self->{session} = new Blur::Session();
+          $xfer += $self->{session}->read($input);
+        } else {
+          $xfer += $input->skip($ftype);
+        }
+        last; };
+          $xfer += $input->skip($ftype);
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+sub write {
+    my ($self, $output) = @_;
+    my $xfer   = 0;
+    $xfer += $output->writeStructBegin('Lucene_commit_args');
+    if (defined $self->{session}) {
+      $xfer += $output->writeFieldBegin('session', TType::STRUCT, 1);
+      $xfer += $self->{session}->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+package Blur::Lucene_commit_result;
+use base qw(Class::Accessor);
+Blur::Lucene_commit_result->mk_accessors( qw( ) );
+
+sub new {
+    my $classname = shift;
+    my $self      = {};
+    my $vals      = shift || {};
+    $self->{e} = undef;
+    if (UNIVERSAL::isa($vals,'HASH')) {
+      if (defined $vals->{e}) {
+        $self->{e} = $vals->{e};
+      }
+    }
+    return bless ($self, $classname);
+}
+
+sub getName {
+    return 'Lucene_commit_result';
+  }
+
+sub read {
+    my ($self, $input) = @_;
+    my $xfer  = 0;
+    my $fname;
+    my $ftype = 0;
+    my $fid   = 0;
+    $xfer += $input->readStructBegin(\$fname);
+    while (1) 
+    {
+      $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid);
+      if ($ftype == TType::STOP) {
+        last;
+      }
+      SWITCH: for($fid)
+      {
+        /^1$/ && do{        if ($ftype == TType::STRUCT) {
+          $self->{e} = new Blur::BlurException();
+          $xfer += $self->{e}->read($input);
+        } else {
+          $xfer += $input->skip($ftype);
+        }
+        last; };
+          $xfer += $input->skip($ftype);
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+sub write {
+    my ($self, $output) = @_;
+    my $xfer   = 0;
+    $xfer += $output->writeStructBegin('Lucene_commit_result');
+    if (defined $self->{e}) {
+      $xfer += $output->writeFieldBegin('e', TType::STRUCT, 1);
+      $xfer += $self->{e}->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+package Blur::Lucene_rollback_args;
+use base qw(Class::Accessor);
+Blur::Lucene_rollback_args->mk_accessors( qw( session ) );
+
+sub new {
+    my $classname = shift;
+    my $self      = {};
+    my $vals      = shift || {};
+    $self->{session} = undef;
+    if (UNIVERSAL::isa($vals,'HASH')) {
+      if (defined $vals->{session}) {
+        $self->{session} = $vals->{session};
+      }
+    }
+    return bless ($self, $classname);
+}
+
+sub getName {
+    return 'Lucene_rollback_args';
+  }
+
+sub read {
+    my ($self, $input) = @_;
+    my $xfer  = 0;
+    my $fname;
+    my $ftype = 0;
+    my $fid   = 0;
+    $xfer += $input->readStructBegin(\$fname);
+    while (1) 
+    {
+      $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid);
+      if ($ftype == TType::STOP) {
+        last;
+      }
+      SWITCH: for($fid)
+      {
+        /^1$/ && do{        if ($ftype == TType::STRUCT) {
+          $self->{session} = new Blur::Session();
+          $xfer += $self->{session}->read($input);
+        } else {
+          $xfer += $input->skip($ftype);
+        }
+        last; };
+          $xfer += $input->skip($ftype);
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+sub write {
+    my ($self, $output) = @_;
+    my $xfer   = 0;
+    $xfer += $output->writeStructBegin('Lucene_rollback_args');
+    if (defined $self->{session}) {
+      $xfer += $output->writeFieldBegin('session', TType::STRUCT, 1);
+      $xfer += $self->{session}->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+package Blur::Lucene_rollback_result;
+use base qw(Class::Accessor);
+Blur::Lucene_rollback_result->mk_accessors( qw( ) );
+
+sub new {
+    my $classname = shift;
+    my $self      = {};
+    my $vals      = shift || {};
+    $self->{e} = undef;
+    if (UNIVERSAL::isa($vals,'HASH')) {
+      if (defined $vals->{e}) {
+        $self->{e} = $vals->{e};
+      }
+    }
+    return bless ($self, $classname);
+}
+
+sub getName {
+    return 'Lucene_rollback_result';
+  }
+
+sub read {
+    my ($self, $input) = @_;
+    my $xfer  = 0;
+    my $fname;
+    my $ftype = 0;
+    my $fid   = 0;
+    $xfer += $input->readStructBegin(\$fname);
+    while (1) 
+    {
+      $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid);
+      if ($ftype == TType::STOP) {
+        last;
+      }
+      SWITCH: for($fid)
+      {
+        /^1$/ && do{        if ($ftype == TType::STRUCT) {
+          $self->{e} = new Blur::BlurException();
+          $xfer += $self->{e}->read($input);
+        } else {
+          $xfer += $input->skip($ftype);
+        }
+        last; };
+          $xfer += $input->skip($ftype);
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+sub write {
+    my ($self, $output) = @_;
+    my $xfer   = 0;
+    $xfer += $output->writeStructBegin('Lucene_rollback_result');
+    if (defined $self->{e}) {
+      $xfer += $output->writeFieldBegin('e', TType::STRUCT, 1);
+      $xfer += $self->{e}->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+package Blur::LuceneIf;
+
+use strict;
+use base qw(Blur::BlurIf);
+
+sub openReadSession{
+  my $self = shift;
+  my $table = shift;
+
+  die 'implement interface';
+}
+
+sub search{
+  my $self = shift;
+  my $session = shift;
+  my $queryArgs = shift;
+
+  die 'implement interface';
+}
+
+sub doc{
+  my $self = shift;
+  my $session = shift;
+  my $docLocations = shift;
+  my $fields = shift;
+
+  die 'implement interface';
+}
+
+sub closeReadSession{
+  my $self = shift;
+  my $session = shift;
+
+  die 'implement interface';
+}
+
+sub openWriteSession{
+  my $self = shift;
+  my $table = shift;
+
+  die 'implement interface';
+}
+
+sub addDocuments{
+  my $self = shift;
+  my $session = shift;
+  my $shardIndex = shift;
+  my $document = shift;
+
+  die 'implement interface';
+}
+
+sub deleteDocumentsByQueries{
+  my $self = shift;
+  my $session = shift;
+  my $shardIndex = shift;
+  my $queries = shift;
+
+  die 'implement interface';
+}
+
+sub deleteDocuments{
+  my $self = shift;
+  my $session = shift;
+  my $shardIndex = shift;
+  my $terms = shift;
+
+  die 'implement interface';
+}
+
+sub updateDocuments{
+  my $self = shift;
+  my $session = shift;
+  my $shardIndex = shift;
+  my $terms = shift;
+  my $document = shift;
+
+  die 'implement interface';
+}
+
+sub commit{
+  my $self = shift;
+  my $session = shift;
+
+  die 'implement interface';
+}
+
+sub rollback{
+  my $self = shift;
+  my $session = shift;
+
+  die 'implement interface';
+}
+
+package Blur::LuceneRest;
+
+use strict;
+use base qw(Blur::BlurRest);
+
+sub openReadSession{
+    my ($self, $request) = @_;
+
+    my $table = ($request->{'table'}) ? $request->{'table'} : undef;
+    return $self->{impl}->openReadSession($table);
+  }
+
+sub search{
+    my ($self, $request) = @_;
+
+    my $session = ($request->{'session'}) ? $request->{'session'} : undef;
+    my $queryArgs = ($request->{'queryArgs'}) ? $request->{'queryArgs'} : undef;
+    return $self->{impl}->search($session, $queryArgs);
+  }
+
+sub doc{
+    my ($self, $request) = @_;
+
+    my $session = ($request->{'session'}) ? $request->{'session'} : undef;
+    my $docLocations = ($request->{'docLocations'}) ? $request->{'docLocations'} : undef;
+    my $fields = ($request->{'fields'}) ? $request->{'fields'} : undef;
+    return $self->{impl}->doc($session, $docLocations, $fields);
+  }
+
+sub closeReadSession{
+    my ($self, $request) = @_;
+
+    my $session = ($request->{'session'}) ? $request->{'session'} : undef;
+    return $self->{impl}->closeReadSession($session);
+  }
+
+sub openWriteSession{
+    my ($self, $request) = @_;
+
+    my $table = ($request->{'table'}) ? $request->{'table'} : undef;
+    return $self->{impl}->openWriteSession($table);
+  }
+
+sub addDocuments{
+    my ($self, $request) = @_;
+
+    my $session = ($request->{'session'}) ? $request->{'session'} : undef;
+    my $shardIndex = ($request->{'shardIndex'}) ? $request->{'shardIndex'} : undef;
+    my $document = ($request->{'document'}) ? $request->{'document'} : undef;
+    return $self->{impl}->addDocuments($session, $shardIndex, $document);
+  }
+
+sub deleteDocumentsByQueries{
+    my ($self, $request) = @_;
+
+    my $session = ($request->{'session'}) ? $request->{'session'} : undef;
+    my $shardIndex = ($request->{'shardIndex'}) ? $request->{'shardIndex'} : undef;
+    my $queries = ($request->{'queries'}) ? $request->{'queries'} : undef;
+    return $self->{impl}->deleteDocumentsByQueries($session, $shardIndex, $queries);
+  }
+
+sub deleteDocuments{
+    my ($self, $request) = @_;
+
+    my $session = ($request->{'session'}) ? $request->{'session'} : undef;
+    my $shardIndex = ($request->{'shardIndex'}) ? $request->{'shardIndex'} : undef;
+    my $terms = ($request->{'terms'}) ? $request->{'terms'} : undef;
+    return $self->{impl}->deleteDocuments($session, $shardIndex, $terms);
+  }
+
+sub updateDocuments{
+    my ($self, $request) = @_;
+
+    my $session = ($request->{'session'}) ? $request->{'session'} : undef;
+    my $shardIndex = ($request->{'shardIndex'}) ? $request->{'shardIndex'} : undef;
+    my $terms = ($request->{'terms'}) ? $request->{'terms'} : undef;
+    my $document = ($request->{'document'}) ? $request->{'document'} : undef;
+    return $self->{impl}->updateDocuments($session, $shardIndex, $terms, $document);
+  }
+
+sub commit{
+    my ($self, $request) = @_;
+
+    my $session = ($request->{'session'}) ? $request->{'session'} : undef;
+    return $self->{impl}->commit($session);
+  }
+
+sub rollback{
+    my ($self, $request) = @_;
+
+    my $session = ($request->{'session'}) ? $request->{'session'} : undef;
+    return $self->{impl}->rollback($session);
+  }
+
+package Blur::LuceneClient;
+
+use base qw(Blur::BlurClient);
+use base qw(Blur::LuceneIf);
+sub new {
+    my ($classname, $input, $output) = @_;
+    my $self      = {};
+    $self = $classname->SUPER::new($input, $output);
+    return bless($self,$classname);
+}
+
+sub openReadSession{
+  my $self = shift;
+  my $table = shift;
+
+        $self->send_openReadSession($table);
+    return $self->recv_openReadSession();
+}
+
+sub send_openReadSession{
+  my $self = shift;
+  my $table = shift;
+
+    $self->{output}->writeMessageBegin('openReadSession', TMessageType::CALL, $self->{seqid});
+    my $args = new Blur::Lucene_openReadSession_args();
+    $args->{table} = $table;
+    $args->write($self->{output});
+    $self->{output}->writeMessageEnd();
+    $self->{output}->getTransport()->flush();
+}
+
+sub recv_openReadSession{
+  my $self = shift;
+
+    my $rseqid = 0;
+    my $fname;
+    my $mtype = 0;
+
+    $self->{input}->readMessageBegin(\$fname, \$mtype, \$rseqid);
+    if ($mtype == TMessageType::EXCEPTION) {
+      my $x = new TApplicationException();
+      $x->read($self->{input});
+      $self->{input}->readMessageEnd();
+      die $x;
+    }
+    my $result = new Blur::Lucene_openReadSession_result();
+    $result->read($self->{input});
+    $self->{input}->readMessageEnd();
+
+    if (defined $result->{success} ) {
+      return $result->{success};
+    }
+    if (defined $result->{e}) {
+      die $result->{e};
+    }
+    die "openReadSession failed: unknown result";
+}
+sub search{
+  my $self = shift;
+  my $session = shift;
+  my $queryArgs = shift;
+
+        $self->send_search($session, $queryArgs);
+    return $self->recv_search();
+}
+
+sub send_search{
+  my $self = shift;
+  my $session = shift;
+  my $queryArgs = shift;
+
+    $self->{output}->writeMessageBegin('search', TMessageType::CALL, $self->{seqid});
+    my $args = new Blur::Lucene_search_args();
+    $args->{session} = $session;
+    $args->{queryArgs} = $queryArgs;
+    $args->write($self->{output});
+    $self->{output}->writeMessageEnd();
+    $self->{output}->getTransport()->flush();
+}
+
+sub recv_search{
+  my $self = shift;
+
+    my $rseqid = 0;
+    my $fname;
+    my $mtype = 0;
+
+    $self->{input}->readMessageBegin(\$fname, \$mtype, \$rseqid);
+    if ($mtype == TMessageType::EXCEPTION) {
+      my $x = new TApplicationException();
+      $x->read($self->{input});
+      $self->{input}->readMessageEnd();
+      die $x;
+    }
+    my $result = new Blur::Lucene_search_result();
+    $result->read($self->{input});
+    $self->{input}->readMessageEnd();
+
+    if (defined $result->{success} ) {
+      return $result->{success};
+    }
+    if (defined $result->{e}) {
+      die $result->{e};
+    }
+    die "search failed: unknown result";
+}
+sub doc{
+  my $self = shift;
+  my $session = shift;
+  my $docLocations = shift;
+  my $fields = shift;
+
+        $self->send_doc($session, $docLocations, $fields);
+    return $self->recv_doc();
+}
+
+sub send_doc{
+  my $self = shift;
+  my $session = shift;
+  my $docLocations = shift;
+  my $fields = shift;
+
+    $self->{output}->writeMessageBegin('doc', TMessageType::CALL, $self->{seqid});
+    my $args = new Blur::Lucene_doc_args();
+    $args->{session} = $session;
+    $args->{docLocations} = $docLocations;
+    $args->{fields} = $fields;
+    $args->write($self->{output});
+    $self->{output}->writeMessageEnd();
+    $self->{output}->getTransport()->flush();
+}
+
+sub recv_doc{
+  my $self = shift;
+
+    my $rseqid = 0;
+    my $fname;
+    my $mtype = 0;
+
+    $self->{input}->readMessageBegin(\$fname, \$mtype, \$rseqid);
+    if ($mtype == TMessageType::EXCEPTION) {
+      my $x = new TApplicationException();
+      $x->read($self->{input});
+      $self->{input}->readMessageEnd();
+      die $x;
+    }
+    my $result = new Blur::Lucene_doc_result();
+    $result->read($self->{input});
+    $self->{input}->readMessageEnd();
+
+    if (defined $result->{success} ) {
+      return $result->{success};
+    }
+    if (defined $result->{e}) {
+      die $result->{e};
+    }
+    die "doc failed: unknown result";
+}
+sub closeReadSession{
+  my $self = shift;
+  my $session = shift;
+
+        $self->send_closeReadSession($session);
+    $self->recv_closeReadSession();
+}
+
+sub send_closeReadSession{
+  my $self = shift;
+  my $session = shift;
+
+    $self->{output}->writeMessageBegin('closeReadSession', TMessageType::CALL, $self->{seqid});
+    my $args = new Blur::Lucene_closeReadSession_args();
+    $args->{session} = $session;
+    $args->write($self->{output});
+    $self->{output}->writeMessageEnd();
+    $self->{output}->getTransport()->flush();
+}
+
+sub recv_closeReadSession{
+  my $self = shift;
+
+    my $rseqid = 0;
+    my $fname;
+    my $mtype = 0;
+
+    $self->{input}->readMessageBegin(\$fname, \$mtype, \$rseqid);
+    if ($mtype == TMessageType::EXCEPTION) {
+      my $x = new TApplicationException();
+      $x->read($self->{input});
+      $self->{input}->readMessageEnd();
+      die $x;
+    }
+    my $result = new Blur::Lucene_closeReadSession_result();
+    $result->read($self->{input});
+    $self->{input}->readMessageEnd();
+
+    if (defined $result->{e}) {
+      die $result->{e};
+    }
+    return;
+}
+sub openWriteSession{
+  my $self = shift;
+  my $table = shift;
+
+        $self->send_openWriteSession($table);
+    return $self->recv_openWriteSession();
+}
+
+sub send_openWriteSession{
+  my $self = shift;
+  my $table = shift;
+
+    $self->{output}->writeMessageBegin('openWriteSession', TMessageType::CALL, $self->{seqid});
+    my $args = new Blur::Lucene_openWriteSession_args();
+    $args->{table} = $table;
+    $args->write($self->{output});
+    $self->{output}->writeMessageEnd();
+    $self->{output}->getTransport()->flush();
+}
+
+sub recv_openWriteSession{
+  my $self = shift;
+
+    my $rseqid = 0;
+    my $fname;
+    my $mtype = 0;
+
+    $self->{input}->readMessageBegin(\$fname, \$mtype, \$rseqid);
+    if ($mtype == TMessageType::EXCEPTION) {
+      my $x = new TApplicationException();
+      $x->read($self->{input});
+      $self->{input}->readMessageEnd();
+      die $x;
+    }
+    my $result = new Blur::Lucene_openWriteSession_result();
+    $result->read($self->{input});
+    $self->{input}->readMessageEnd();
+
+    if (defined $result->{success} ) {
+      return $result->{success};
+    }
+    if (defined $result->{e}) {
+      die $result->{e};
+    }
+    die "openWriteSession failed: unknown result";
+}
+sub addDocuments{
+  my $self = shift;
+  my $session = shift;
+  my $shardIndex = shift;
+  my $document = shift;
+
+        $self->send_addDocuments($session, $shardIndex, $document);
+    $self->recv_addDocuments();
+}
+
+sub send_addDocuments{
+  my $self = shift;
+  my $session = shift;
+  my $shardIndex = shift;
+  my $document = shift;
+
+    $self->{output}->writeMessageBegin('addDocuments', TMessageType::CALL, $self->{seqid});
+    my $args = new Blur::Lucene_addDocuments_args();
+    $args->{session} = $session;
+    $args->{shardIndex} = $shardIndex;
+    $args->{document} = $document;
+    $args->write($self->{output});
+    $self->{output}->writeMessageEnd();
+    $self->{output}->getTransport()->flush();
+}
+
+sub recv_addDocuments{
+  my $self = shift;
+
+    my $rseqid = 0;
+    my $fname;
+    my $mtype = 0;
+
+    $self->{input}->readMessageBegin(\$fname, \$mtype, \$rseqid);
+    if ($mtype == TMessageType::EXCEPTION) {
+      my $x = new TApplicationException();
+      $x->read($self->{input});
+      $self->{input}->readMessageEnd();
+      die $x;
+    }
+    my $result = new Blur::Lucene_addDocuments_result();
+    $result->read($self->{input});
+    $self->{input}->readMessageEnd();
+
+    if (defined $result->{e}) {
+      die $result->{e};
+    }
+    return;
+}
+sub deleteDocumentsByQueries{
+  my $self = shift;
+  my $session = shift;
+  my $shardIndex = shift;
+  my $queries = shift;
+
+        $self->send_deleteDocumentsByQueries($session, $shardIndex, $queries);
+    $self->recv_deleteDocumentsByQueries();
+}
+
+sub send_deleteDocumentsByQueries{
+  my $self = shift;
+  my $session = shift;
+  my $shardIndex = shift;
+  my $queries = shift;
+
+    $self->{output}->writeMessageBegin('deleteDocumentsByQueries', TMessageType::CALL, $self->{seqid});
+    my $args = new Blur::Lucene_deleteDocumentsByQueries_args();
+    $args->{session} = $session;
+    $args->{shardIndex} = $shardIndex;
+    $args->{queries} = $queries;
+    $args->write($self->{output});
+    $self->{output}->writeMessageEnd();
+    $self->{output}->getTransport()->flush();
+}
+
+sub recv_deleteDocumentsByQueries{
+  my $self = shift;
+
+    my $rseqid = 0;
+    my $fname;
+    my $mtype = 0;
+
+    $self->{input}->readMessageBegin(\$fname, \$mtype, \$rseqid);
+    if ($mtype == TMessageType::EXCEPTION) {
+      my $x = new TApplicationException();
+      $x->read($self->{input});
+      $self->{input}->readMessageEnd();
+      die $x;
+    }
+    my $result = new Blur::Lucene_deleteDocumentsByQueries_result();
+    $result->read($self->{input});
+    $self->{input}->readMessageEnd();
+
+    if (defined $result->{e}) {
+      die $result->{e};
+    }
+    return;
+}
+sub deleteDocuments{
+  my $self = shift;
+  my $session = shift;
+  my $shardIndex = shift;
+  my $terms = shift;
+
+        $self->send_deleteDocuments($session, $shardIndex, $terms);
+    $self->recv_deleteDocuments();
+}
+
+sub send_deleteDocuments{
+  my $self = shift;
+  my $session = shift;
+  my $shardIndex = shift;
+  my $terms = shift;
+
+    $self->{output}->writeMessageBegin('deleteDocuments', TMessageType::CALL, $self->{seqid});
+    my $args = new Blur::Lucene_deleteDocuments_args();
+    $args->{session} = $session;
+    $args->{shardIndex} = $shardIndex;
+    $args->{terms} = $terms;
+    $args->write($self->{output});
+    $self->{output}->writeMessageEnd();
+    $self->{output}->getTransport()->flush();
+}
+
+sub recv_deleteDocuments{
+  my $self = shift;
+
+    my $rseqid = 0;
+    my $fname;
+    my $mtype = 0;
+
+    $self->{input}->readMessageBegin(\$fname, \$mtype, \$rseqid);
+    if ($mtype == TMessageType::EXCEPTION) {
+      my $x = new TApplicationException();
+      $x->read($self->{input});
+      $self->{input}->readMessageEnd();
+      die $x;
+    }
+    my $result = new Blur::Lucene_deleteDocuments_result();
+    $result->read($self->{input});
+    $self->{input}->readMessageEnd();
+
+    if (defined $result->{e}) {
+      die $result->{e};
+    }
+    return;
+}
+sub updateDocuments{
+  my $self = shift;
+  my $session = shift;
+  my $shardIndex = shift;
+  my $terms = shift;
+  my $document = shift;
+
+        $self->send_updateDocuments($session, $shardIndex, $terms, $document);
+    $self->recv_updateDocuments();
+}
+
+sub send_updateDocuments{
+  my $self = shift;
+  my $session = shift;
+  my $shardIndex = shift;
+  my $terms = shift;
+  my $document = shift;
+
+    $self->{output}->writeMessageBegin('updateDocuments', TMessageType::CALL, $self->{seqid});
+    my $args = new Blur::Lucene_updateDocuments_args();
+    $args->{session} = $session;
+    $args->{shardIndex} = $shardIndex;
+    $args->{terms} = $terms;
+    $args->{document} = $document;
+    $args->write($self->{output});
+    $self->{output}->writeMessageEnd();
+    $self->{output}->getTransport()->flush();
+}
+
+sub recv_updateDocuments{
+  my $self = shift;
+
+    my $rseqid = 0;
+    my $fname;
+    my $mtype = 0;
+
+    $self->{input}->readMessageBegin(\$fname, \$mtype, \$rseqid);
+    if ($mtype == TMessageType::EXCEPTION) {
+      my $x = new TApplicationException();
+      $x->read($self->{input});
+      $self->{input}->readMessageEnd();
+      die $x;
+    }
+    my $result = new Blur::Lucene_updateDocuments_result();
+    $result->read($self->{input});
+    $self->{input}->readMessageEnd();
+
+    if (defined $result->{e}) {
+      die $result->{e};
+    }
+    return;
+}
+sub commit{
+  my $self = shift;
+  my $session = shift;
+
+        $self->send_commit($session);
+    $self->recv_commit();
+}
+
+sub send_commit{
+  my $self = shift;
+  my $session = shift;
+
+    $self->{output}->writeMessageBegin('commit', TMessageType::CALL, $self->{seqid});
+    my $args = new Blur::Lucene_commit_args();
+    $args->{session} = $session;
+    $args->write($self->{output});
+    $self->{output}->writeMessageEnd();
+    $self->{output}->getTransport()->flush();
+}
+
+sub recv_commit{
+  my $self = shift;
+
+    my $rseqid = 0;
+    my $fname;
+    my $mtype = 0;
+
+    $self->{input}->readMessageBegin(\$fname, \$mtype, \$rseqid);
+    if ($mtype == TMessageType::EXCEPTION) {
+      my $x = new TApplicationException();
+      $x->read($self->{input});
+      $self->{input}->readMessageEnd();
+      die $x;
+    }
+    my $result = new Blur::Lucene_commit_result();
+    $result->read($self->{input});
+    $self->{input}->readMessageEnd();
+
+    if (defined $result->{e}) {
+      die $result->{e};
+    }
+    return;
+}
+sub rollback{
+  my $self = shift;
+  my $session = shift;
+
+        $self->send_rollback($session);
+    $self->recv_rollback();
+}
+
+sub send_rollback{
+  my $self = shift;
+  my $session = shift;
+
+    $self->{output}->writeMessageBegin('rollback', TMessageType::CALL, $self->{seqid});
+    my $args = new Blur::Lucene_rollback_args();
+    $args->{session} = $session;
+    $args->write($self->{output});
+    $self->{output}->writeMessageEnd();
+    $self->{output}->getTransport()->flush();
+}
+
+sub recv_rollback{
+  my $self = shift;
+
+    my $rseqid = 0;
+    my $fname;
+    my $mtype = 0;
+
+    $self->{input}->readMessageBegin(\$fname, \$mtype, \$rseqid);
+    if ($mtype == TMessageType::EXCEPTION) {
+      my $x = new TApplicationException();
+      $x->read($self->{input});
+      $self->{input}->readMessageEnd();
+      die $x;
+    }
+    my $result = new Blur::Lucene_rollback_result();
+    $result->read($self->{input});
+    $self->{input}->readMessageEnd();
+
+    if (defined $result->{e}) {
+      die $result->{e};
+    }
+    return;
+}
+package Blur::LuceneProcessor;
+
+use strict;
+use base qw(Blur::BlurProcessor);
+
+sub process {
+      my ($self, $input, $output) = @_;
+      my $rseqid = 0;
+      my $fname  = undef;
+      my $mtype  = 0;
+
+      $input->readMessageBegin(\$fname, \$mtype, \$rseqid);
+      my $methodname = 'process_'.$fname;
+      if (!$self->can($methodname)) {
+        $input->skip(TType::STRUCT);
+        $input->readMessageEnd();
+        my $x = new TApplicationException('Function '.$fname.' not implemented.', TApplicationException::UNKNOWN_METHOD);
+        $output->writeMessageBegin($fname, TMessageType::EXCEPTION, $rseqid);
+        $x->write($output);
+        $output->writeMessageEnd();
+        $output->getTransport()->flush();
+        return;
+      }
+      $self->$methodname($rseqid, $input, $output);
+      return 1;
+}
+
+sub process_openReadSession {
+      my ($self, $seqid, $input, $output) = @_;
+      my $args = new Blur::Lucene_openReadSession_args();
+      $args->read($input);
+      $input->readMessageEnd();
+      my $result = new Blur::Lucene_openReadSession_result();
+      eval {
+        $result->{success} = $self->{handler}->openReadSession($args->table);
+      }; if( UNIVERSAL::isa($@,'Blur::BlurException') ){ 
+        $result->{e} = $@;
+      }
+      $output->writeMessageBegin('openReadSession', TMessageType::REPLY, $seqid);
+      $result->write($output);
+      $output->writeMessageEnd();
+      $output->getTransport()->flush();
+}
+
+sub process_search {
+      my ($self, $seqid, $input, $output) = @_;
+      my $args = new Blur::Lucene_search_args();
+      $args->read($input);
+      $input->readMessageEnd();
+      my $result = new Blur::Lucene_search_result();
+      eval {
+        $result->{success} = $self->{handler}->search($args->session, $args->queryArgs);
+      }; if( UNIVERSAL::isa($@,'Blur::BlurException') ){ 
+        $result->{e} = $@;
+      }
+      $output->writeMessageBegin('search', TMessageType::REPLY, $seqid);
+      $result->write($output);
+      $output->writeMessageEnd();
+      $output->getTransport()->flush();
+}
+
+sub process_doc {
+      my ($self, $seqid, $input, $output) = @_;
+      my $args = new Blur::Lucene_doc_args();
+      $args->read($input);
+      $input->readMessageEnd();
+      my $result = new Blur::Lucene_doc_result();
+      eval {
+        $result->{success} = $self->{handler}->doc($args->session, $args->docLocations, $args->fields);
+      }; if( UNIVERSAL::isa($@,'Blur::BlurException') ){ 
+        $result->{e} = $@;
+      }
+      $output->writeMessageBegin('doc', TMessageType::REPLY, $seqid);
+      $result->write($output);
+      $output->writeMessageEnd();
+      $output->getTransport()->flush();
+}
+
+sub process_closeReadSession {
+      my ($self, $seqid, $input, $output) = @_;
+      my $args = new Blur::Lucene_closeReadSession_args();
+      $args->read($input);
+      $input->readMessageEnd();
+      my $result = new Blur::Lucene_closeReadSession_result();
+      eval {
+        $self->{handler}->closeReadSession($args->session);
+      }; if( UNIVERSAL::isa($@,'Blur::BlurException') ){ 
+        $result->{e} = $@;
+      }
+      $output->writeMessageBegin('closeReadSession', TMessageType::REPLY, $seqid);
+      $result->write($output);
+      $output->writeMessageEnd();
+      $output->getTransport()->flush();
+}
+
+sub process_openWriteSession {
+      my ($self, $seqid, $input, $output) = @_;
+      my $args = new Blur::Lucene_openWriteSession_args();
+      $args->read($input);
+      $input->readMessageEnd();
+      my $result = new Blur::Lucene_openWriteSession_result();
+      eval {
+        $result->{success} = $self->{handler}->openWriteSession($args->table);
+      }; if( UNIVERSAL::isa($@,'Blur::BlurException') ){ 
+        $result->{e} = $@;
+      }
+      $output->writeMessageBegin('openWriteSession', TMessageType::REPLY, $seqid);
+      $result->write($output);
+      $output->writeMessageEnd();
+      $output->getTransport()->flush();
+}
+
+sub process_addDocuments {
+      my ($self, $seqid, $input, $output) = @_;
+      my $args = new Blur::Lucene_addDocuments_args();
+      $args->read($input);
+      $input->readMessageEnd();
+      my $result = new Blur::Lucene_addDocuments_result();
+      eval {
+        $self->{handler}->addDocuments($args->session, $args->shardIndex, $args->document);
+      }; if( UNIVERSAL::isa($@,'Blur::BlurException') ){ 
+        $result->{e} = $@;
+      }
+      $output->writeMessageBegin('addDocuments', TMessageType::REPLY, $seqid);
+      $result->write($output);
+      $output->writeMessageEnd();
+      $output->getTransport()->flush();
+}
+
+sub process_deleteDocumentsByQueries {
+      my ($self, $seqid, $input, $output) = @_;
+      my $args = new Blur::Lucene_deleteDocumentsByQueries_args();
+      $args->read($input);
+      $input->readMessageEnd();
+      my $result = new Blur::Lucene_deleteDocumentsByQueries_result();
+      eval {
+        $self->{handler}->deleteDocumentsByQueries($args->session, $args->shardIndex, $args->queries);
+      }; if( UNIVERSAL::isa($@,'Blur::BlurException') ){ 
+        $result->{e} = $@;
+      }
+      $output->writeMessageBegin('deleteDocumentsByQueries', TMessageType::REPLY, $seqid);
+      $result->write($output);
+      $output->writeMessageEnd();
+      $output->getTransport()->flush();
+}
+
+sub process_deleteDocuments {
+      my ($self, $seqid, $input, $output) = @_;
+      my $args = new Blur::Lucene_deleteDocuments_args();
+      $args->read($input);
+      $input->readMessageEnd();
+      my $result = new Blur::Lucene_deleteDocuments_result();
+      eval {
+        $self->{handler}->deleteDocuments($args->session, $args->shardIndex, $args->terms);
+      }; if( UNIVERSAL::isa($@,'Blur::BlurException') ){ 
+        $result->{e} = $@;
+      }
+      $output->writeMessageBegin('deleteDocuments', TMessageType::REPLY, $seqid);
+      $result->write($output);
+      $output->writeMessageEnd();
+      $output->getTransport()->flush();
+}
+
+sub process_updateDocuments {
+      my ($self, $seqid, $input, $output) = @_;
+      my $args = new Blur::Lucene_updateDocuments_args();
+      $args->read($input);
+      $input->readMessageEnd();
+      my $result = new Blur::Lucene_updateDocuments_result();
+      eval {
+        $self->{handler}->updateDocuments($args->session, $args->shardIndex, $args->terms, $args->document);
+      }; if( UNIVERSAL::isa($@,'Blur::BlurException') ){ 
+        $result->{e} = $@;
+      }
+      $output->writeMessageBegin('updateDocuments', TMessageType::REPLY, $seqid);
+      $result->write($output);
+      $output->writeMessageEnd();
+      $output->getTransport()->flush();
+}
+
+sub process_commit {
+      my ($self, $seqid, $input, $output) = @_;
+      my $args = new Blur::Lucene_commit_args();
+      $args->read($input);
+      $input->readMessageEnd();
+      my $result = new Blur::Lucene_commit_result();
+      eval {
+        $self->{handler}->commit($args->session);
+      }; if( UNIVERSAL::isa($@,'Blur::BlurException') ){ 
+        $result->{e} = $@;
+      }
+      $output->writeMessageBegin('commit', TMessageType::REPLY, $seqid);
+      $result->write($output);
+      $output->writeMessageEnd();
+      $output->getTransport()->flush();
+}
+
+sub process_rollback {
+      my ($self, $seqid, $input, $output) = @_;
+      my $args = new Blur::Lucene_rollback_args();
+      $args->read($input);
+      $input->readMessageEnd();
+      my $result = new Blur::Lucene_rollback_result();
+      eval {
+        $self->{handler}->rollback($args->session);
+      }; if( UNIVERSAL::isa($@,'Blur::BlurException') ){ 
+        $result->{e} = $@;
+      }
+      $output->writeMessageBegin('rollback', TMessageType::REPLY, $seqid);
+      $result->write($output);
+      $output->writeMessageEnd();
+      $output->getTransport()->flush();
+}
+
+1;


Mime
View raw message