incubator-blur-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amccu...@apache.org
Subject [12/14] Small changes to RPC and the addDocuments method is now implemented.
Date Sun, 04 Nov 2012 02:17:15 GMT
http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/beb7527a/interface/gen-java/org/apache/blur/thrift/generated/TYPE.java
----------------------------------------------------------------------
diff --git a/interface/gen-java/org/apache/blur/thrift/generated/TYPE.java b/interface/gen-java/org/apache/blur/thrift/generated/TYPE.java
index d3f4818..8c9a193 100644
--- a/interface/gen-java/org/apache/blur/thrift/generated/TYPE.java
+++ b/interface/gen-java/org/apache/blur/thrift/generated/TYPE.java
@@ -36,7 +36,8 @@ public enum TYPE implements org.apache.thrift.TEnum {
   LONG(2),
   FLOAT(3),
   DOUBLE(4),
-  BINARY(5);
+  BINARY(5),
+  TEXT(6);
 
   private final int value;
 
@@ -69,6 +70,8 @@ public enum TYPE implements org.apache.thrift.TEnum {
         return DOUBLE;
       case 5:
         return BINARY;
+      case 6:
+        return TEXT;
       default:
         return null;
     }

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/beb7527a/interface/gen-perl/Blur/Lucene.pm
----------------------------------------------------------------------
diff --git a/interface/gen-perl/Blur/Lucene.pm b/interface/gen-perl/Blur/Lucene.pm
index 61f4148..89d22fa 100644
--- a/interface/gen-perl/Blur/Lucene.pm
+++ b/interface/gen-perl/Blur/Lucene.pm
@@ -711,165 +711,20 @@ sub write {
     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 ) );
+Blur::Lucene_addDocuments_args->mk_accessors( qw( table shardIndex document ) );
 
 sub new {
     my $classname = shift;
     my $self      = {};
     my $vals      = shift || {};
-    $self->{session} = undef;
+    $self->{table} = undef;
     $self->{shardIndex} = undef;
     $self->{document} = undef;
     if (UNIVERSAL::isa($vals,'HASH')) {
-      if (defined $vals->{session}) {
-        $self->{session} = $vals->{session};
+      if (defined $vals->{table}) {
+        $self->{table} = $vals->{table};
       }
       if (defined $vals->{shardIndex}) {
         $self->{shardIndex} = $vals->{shardIndex};
@@ -900,9 +755,8 @@ sub read {
       }
       SWITCH: for($fid)
       {
-        /^1$/ && do{        if ($ftype == TType::STRUCT) {
-          $self->{session} = new Blur::Session();
-          $xfer += $self->{session}->read($input);
+        /^1$/ && do{        if ($ftype == TType::STRING) {
+          $xfer += $input->readString(\$self->{table});
         } else {
           $xfer += $input->skip($ftype);
         }
@@ -944,9 +798,9 @@ 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);
+    if (defined $self->{table}) {
+      $xfer += $output->writeFieldBegin('table', TType::STRING, 1);
+      $xfer += $output->writeString($self->{table});
       $xfer += $output->writeFieldEnd();
     }
     if (defined $self->{shardIndex}) {
@@ -1040,18 +894,18 @@ sub write {
 
 package Blur::Lucene_deleteDocumentsByQueries_args;
 use base qw(Class::Accessor);
-Blur::Lucene_deleteDocumentsByQueries_args->mk_accessors( qw( session shardIndex queries ) );
+Blur::Lucene_deleteDocumentsByQueries_args->mk_accessors( qw( table shardIndex queries ) );
 
 sub new {
     my $classname = shift;
     my $self      = {};
     my $vals      = shift || {};
-    $self->{session} = undef;
+    $self->{table} = undef;
     $self->{shardIndex} = undef;
     $self->{queries} = undef;
     if (UNIVERSAL::isa($vals,'HASH')) {
-      if (defined $vals->{session}) {
-        $self->{session} = $vals->{session};
+      if (defined $vals->{table}) {
+        $self->{table} = $vals->{table};
       }
       if (defined $vals->{shardIndex}) {
         $self->{shardIndex} = $vals->{shardIndex};
@@ -1082,9 +936,8 @@ sub read {
       }
       SWITCH: for($fid)
       {
-        /^1$/ && do{        if ($ftype == TType::STRUCT) {
-          $self->{session} = new Blur::Session();
-          $xfer += $self->{session}->read($input);
+        /^1$/ && do{        if ($ftype == TType::STRING) {
+          $xfer += $input->readString(\$self->{table});
         } else {
           $xfer += $input->skip($ftype);
         }
@@ -1126,9 +979,9 @@ 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);
+    if (defined $self->{table}) {
+      $xfer += $output->writeFieldBegin('table', TType::STRING, 1);
+      $xfer += $output->writeString($self->{table});
       $xfer += $output->writeFieldEnd();
     }
     if (defined $self->{shardIndex}) {
@@ -1222,18 +1075,18 @@ sub write {
 
 package Blur::Lucene_deleteDocuments_args;
 use base qw(Class::Accessor);
-Blur::Lucene_deleteDocuments_args->mk_accessors( qw( session shardIndex terms ) );
+Blur::Lucene_deleteDocuments_args->mk_accessors( qw( table shardIndex terms ) );
 
 sub new {
     my $classname = shift;
     my $self      = {};
     my $vals      = shift || {};
-    $self->{session} = undef;
+    $self->{table} = undef;
     $self->{shardIndex} = undef;
     $self->{terms} = undef;
     if (UNIVERSAL::isa($vals,'HASH')) {
-      if (defined $vals->{session}) {
-        $self->{session} = $vals->{session};
+      if (defined $vals->{table}) {
+        $self->{table} = $vals->{table};
       }
       if (defined $vals->{shardIndex}) {
         $self->{shardIndex} = $vals->{shardIndex};
@@ -1264,9 +1117,8 @@ sub read {
       }
       SWITCH: for($fid)
       {
-        /^1$/ && do{        if ($ftype == TType::STRUCT) {
-          $self->{session} = new Blur::Session();
-          $xfer += $self->{session}->read($input);
+        /^1$/ && do{        if ($ftype == TType::STRING) {
+          $xfer += $input->readString(\$self->{table});
         } else {
           $xfer += $input->skip($ftype);
         }
@@ -1308,9 +1160,9 @@ 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);
+    if (defined $self->{table}) {
+      $xfer += $output->writeFieldBegin('table', TType::STRING, 1);
+      $xfer += $output->writeString($self->{table});
       $xfer += $output->writeFieldEnd();
     }
     if (defined $self->{shardIndex}) {
@@ -1404,19 +1256,19 @@ sub write {
 
 package Blur::Lucene_updateDocuments_args;
 use base qw(Class::Accessor);
-Blur::Lucene_updateDocuments_args->mk_accessors( qw( session shardIndex terms document ) );
+Blur::Lucene_updateDocuments_args->mk_accessors( qw( table shardIndex terms document ) );
 
 sub new {
     my $classname = shift;
     my $self      = {};
     my $vals      = shift || {};
-    $self->{session} = undef;
+    $self->{table} = 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->{table}) {
+        $self->{table} = $vals->{table};
       }
       if (defined $vals->{shardIndex}) {
         $self->{shardIndex} = $vals->{shardIndex};
@@ -1450,9 +1302,8 @@ sub read {
       }
       SWITCH: for($fid)
       {
-        /^1$/ && do{        if ($ftype == TType::STRUCT) {
-          $self->{session} = new Blur::Session();
-          $xfer += $self->{session}->read($input);
+        /^1$/ && do{        if ($ftype == TType::STRING) {
+          $xfer += $input->readString(\$self->{table});
         } else {
           $xfer += $input->skip($ftype);
         }
@@ -1513,9 +1364,9 @@ 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);
+    if (defined $self->{table}) {
+      $xfer += $output->writeFieldBegin('table', TType::STRING, 1);
+      $xfer += $output->writeString($self->{table});
       $xfer += $output->writeFieldEnd();
     }
     if (defined $self->{shardIndex}) {
@@ -1529,286 +1380,26 @@ sub write {
         $xfer += $output->writeListBegin(TType::STRUCT, scalar(@{$self->{terms}}));
         {
           foreach my $iter340 (@{$self->{terms}}) 
-          {
-            $xfer += ${iter340}->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 $iter341 (@{$self->{document}}) 
-          {
-            $xfer += ${iter341}->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;
+          {
+            $xfer += ${iter340}->write($output);
+          }
+        }
+        $xfer += $output->writeListEnd();
       }
-      SWITCH: for($fid)
+      $xfer += $output->writeFieldEnd();
+    }
+    if (defined $self->{document}) {
+      $xfer += $output->writeFieldBegin('document', TType::LIST, 4);
       {
-        /^1$/ && do{        if ($ftype == TType::STRUCT) {
-          $self->{session} = new Blur::Session();
-          $xfer += $self->{session}->read($input);
-        } else {
-          $xfer += $input->skip($ftype);
+        $xfer += $output->writeListBegin(TType::STRUCT, scalar(@{$self->{document}}));
+        {
+          foreach my $iter341 (@{$self->{document}}) 
+          {
+            $xfer += ${iter341}->write($output);
+          }
         }
-        last; };
-          $xfer += $input->skip($ftype);
+        $xfer += $output->writeListEnd();
       }
-      $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();
@@ -1816,9 +1407,9 @@ sub write {
     return $xfer;
   }
 
-package Blur::Lucene_rollback_result;
+package Blur::Lucene_updateDocuments_result;
 use base qw(Class::Accessor);
-Blur::Lucene_rollback_result->mk_accessors( qw( ) );
+Blur::Lucene_updateDocuments_result->mk_accessors( qw( ) );
 
 sub new {
     my $classname = shift;
@@ -1834,7 +1425,7 @@ sub new {
 }
 
 sub getName {
-    return 'Lucene_rollback_result';
+    return 'Lucene_updateDocuments_result';
   }
 
 sub read {
@@ -1870,7 +1461,7 @@ sub read {
 sub write {
     my ($self, $output) = @_;
     my $xfer   = 0;
-    $xfer += $output->writeStructBegin('Lucene_rollback_result');
+    $xfer += $output->writeStructBegin('Lucene_updateDocuments_result');
     if (defined $self->{e}) {
       $xfer += $output->writeFieldBegin('e', TType::STRUCT, 1);
       $xfer += $self->{e}->write($output);
@@ -1917,16 +1508,9 @@ sub closeReadSession{
   die 'implement interface';
 }
 
-sub openWriteSession{
-  my $self = shift;
-  my $table = shift;
-
-  die 'implement interface';
-}
-
 sub addDocuments{
   my $self = shift;
-  my $session = shift;
+  my $table = shift;
   my $shardIndex = shift;
   my $document = shift;
 
@@ -1935,7 +1519,7 @@ sub addDocuments{
 
 sub deleteDocumentsByQueries{
   my $self = shift;
-  my $session = shift;
+  my $table = shift;
   my $shardIndex = shift;
   my $queries = shift;
 
@@ -1944,7 +1528,7 @@ sub deleteDocumentsByQueries{
 
 sub deleteDocuments{
   my $self = shift;
-  my $session = shift;
+  my $table = shift;
   my $shardIndex = shift;
   my $terms = shift;
 
@@ -1953,7 +1537,7 @@ sub deleteDocuments{
 
 sub updateDocuments{
   my $self = shift;
-  my $session = shift;
+  my $table = shift;
   my $shardIndex = shift;
   my $terms = shift;
   my $document = shift;
@@ -1961,20 +1545,6 @@ sub updateDocuments{
   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;
@@ -2011,62 +1581,41 @@ sub closeReadSession{
     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 $table = ($request->{'table'}) ? $request->{'table'} : undef;
     my $shardIndex = ($request->{'shardIndex'}) ? $request->{'shardIndex'} : undef;
     my $document = ($request->{'document'}) ? $request->{'document'} : undef;
-    return $self->{impl}->addDocuments($session, $shardIndex, $document);
+    return $self->{impl}->addDocuments($table, $shardIndex, $document);
   }
 
 sub deleteDocumentsByQueries{
     my ($self, $request) = @_;
 
-    my $session = ($request->{'session'}) ? $request->{'session'} : undef;
+    my $table = ($request->{'table'}) ? $request->{'table'} : undef;
     my $shardIndex = ($request->{'shardIndex'}) ? $request->{'shardIndex'} : undef;
     my $queries = ($request->{'queries'}) ? $request->{'queries'} : undef;
-    return $self->{impl}->deleteDocumentsByQueries($session, $shardIndex, $queries);
+    return $self->{impl}->deleteDocumentsByQueries($table, $shardIndex, $queries);
   }
 
 sub deleteDocuments{
     my ($self, $request) = @_;
 
-    my $session = ($request->{'session'}) ? $request->{'session'} : undef;
+    my $table = ($request->{'table'}) ? $request->{'table'} : undef;
     my $shardIndex = ($request->{'shardIndex'}) ? $request->{'shardIndex'} : undef;
     my $terms = ($request->{'terms'}) ? $request->{'terms'} : undef;
-    return $self->{impl}->deleteDocuments($session, $shardIndex, $terms);
+    return $self->{impl}->deleteDocuments($table, $shardIndex, $terms);
   }
 
 sub updateDocuments{
     my ($self, $request) = @_;
 
-    my $session = ($request->{'session'}) ? $request->{'session'} : undef;
+    my $table = ($request->{'table'}) ? $request->{'table'} : 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);
+    return $self->{impl}->updateDocuments($table, $shardIndex, $terms, $document);
   }
 
 package Blur::LuceneClient;
@@ -2270,71 +1819,25 @@ sub recv_closeReadSession{
     }
     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 $table = shift;
   my $shardIndex = shift;
   my $document = shift;
 
-        $self->send_addDocuments($session, $shardIndex, $document);
+        $self->send_addDocuments($table, $shardIndex, $document);
     $self->recv_addDocuments();
 }
 
 sub send_addDocuments{
   my $self = shift;
-  my $session = shift;
+  my $table = 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->{table} = $table;
     $args->{shardIndex} = $shardIndex;
     $args->{document} = $document;
     $args->write($self->{output});
@@ -2367,23 +1870,23 @@ sub recv_addDocuments{
 }
 sub deleteDocumentsByQueries{
   my $self = shift;
-  my $session = shift;
+  my $table = shift;
   my $shardIndex = shift;
   my $queries = shift;
 
-        $self->send_deleteDocumentsByQueries($session, $shardIndex, $queries);
+        $self->send_deleteDocumentsByQueries($table, $shardIndex, $queries);
     $self->recv_deleteDocumentsByQueries();
 }
 
 sub send_deleteDocumentsByQueries{
   my $self = shift;
-  my $session = shift;
+  my $table = 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->{table} = $table;
     $args->{shardIndex} = $shardIndex;
     $args->{queries} = $queries;
     $args->write($self->{output});
@@ -2416,23 +1919,23 @@ sub recv_deleteDocumentsByQueries{
 }
 sub deleteDocuments{
   my $self = shift;
-  my $session = shift;
+  my $table = shift;
   my $shardIndex = shift;
   my $terms = shift;
 
-        $self->send_deleteDocuments($session, $shardIndex, $terms);
+        $self->send_deleteDocuments($table, $shardIndex, $terms);
     $self->recv_deleteDocuments();
 }
 
 sub send_deleteDocuments{
   my $self = shift;
-  my $session = shift;
+  my $table = 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->{table} = $table;
     $args->{shardIndex} = $shardIndex;
     $args->{terms} = $terms;
     $args->write($self->{output});
@@ -2465,25 +1968,25 @@ sub recv_deleteDocuments{
 }
 sub updateDocuments{
   my $self = shift;
-  my $session = shift;
+  my $table = shift;
   my $shardIndex = shift;
   my $terms = shift;
   my $document = shift;
 
-        $self->send_updateDocuments($session, $shardIndex, $terms, $document);
+        $self->send_updateDocuments($table, $shardIndex, $terms, $document);
     $self->recv_updateDocuments();
 }
 
 sub send_updateDocuments{
   my $self = shift;
-  my $session = shift;
+  my $table = 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->{table} = $table;
     $args->{shardIndex} = $shardIndex;
     $args->{terms} = $terms;
     $args->{document} = $document;
@@ -2515,92 +2018,6 @@ sub recv_updateDocuments{
     }
     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;
@@ -2696,23 +2113,6 @@ sub process_closeReadSession {
       $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();
@@ -2720,7 +2120,7 @@ sub process_addDocuments {
       $input->readMessageEnd();
       my $result = new Blur::Lucene_addDocuments_result();
       eval {
-        $self->{handler}->addDocuments($args->session, $args->shardIndex, $args->document);
+        $self->{handler}->addDocuments($args->table, $args->shardIndex, $args->document);
       }; if( UNIVERSAL::isa($@,'Blur::BlurException') ){ 
         $result->{e} = $@;
       }
@@ -2737,7 +2137,7 @@ sub process_deleteDocumentsByQueries {
       $input->readMessageEnd();
       my $result = new Blur::Lucene_deleteDocumentsByQueries_result();
       eval {
-        $self->{handler}->deleteDocumentsByQueries($args->session, $args->shardIndex, $args->queries);
+        $self->{handler}->deleteDocumentsByQueries($args->table, $args->shardIndex, $args->queries);
       }; if( UNIVERSAL::isa($@,'Blur::BlurException') ){ 
         $result->{e} = $@;
       }
@@ -2754,7 +2154,7 @@ sub process_deleteDocuments {
       $input->readMessageEnd();
       my $result = new Blur::Lucene_deleteDocuments_result();
       eval {
-        $self->{handler}->deleteDocuments($args->session, $args->shardIndex, $args->terms);
+        $self->{handler}->deleteDocuments($args->table, $args->shardIndex, $args->terms);
       }; if( UNIVERSAL::isa($@,'Blur::BlurException') ){ 
         $result->{e} = $@;
       }
@@ -2771,7 +2171,7 @@ sub process_updateDocuments {
       $input->readMessageEnd();
       my $result = new Blur::Lucene_updateDocuments_result();
       eval {
-        $self->{handler}->updateDocuments($args->session, $args->shardIndex, $args->terms, $args->document);
+        $self->{handler}->updateDocuments($args->table, $args->shardIndex, $args->terms, $args->document);
       }; if( UNIVERSAL::isa($@,'Blur::BlurException') ){ 
         $result->{e} = $@;
       }
@@ -2781,38 +2181,4 @@ sub process_updateDocuments {
       $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;

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/beb7527a/interface/gen-perl/Blur/Types.pm
----------------------------------------------------------------------
diff --git a/interface/gen-perl/Blur/Types.pm b/interface/gen-perl/Blur/Types.pm
index 30f8f08..0deec99 100644
--- a/interface/gen-perl/Blur/Types.pm
+++ b/interface/gen-perl/Blur/Types.pm
@@ -33,6 +33,7 @@ use constant LONG => 2;
 use constant FLOAT => 3;
 use constant DOUBLE => 4;
 use constant BINARY => 5;
+use constant TEXT => 6;
 package Blur::SortType;
 use constant SCORE => 0;
 use constant DOC => 1;
@@ -4356,7 +4357,7 @@ sub new {
   $self->{name} = undef;
   $self->{value} = undef;
   $self->{type} = undef;
-  $self->{boost} = undef;
+  $self->{boost} = 1;
   if (UNIVERSAL::isa($vals,'HASH')) {
     if (defined $vals->{name}) {
       $self->{name} = $vals->{name};

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/beb7527a/interface/gen-rb/blur_types.rb
----------------------------------------------------------------------
diff --git a/interface/gen-rb/blur_types.rb b/interface/gen-rb/blur_types.rb
index ce3a7c9..48b89da 100644
--- a/interface/gen-rb/blur_types.rb
+++ b/interface/gen-rb/blur_types.rb
@@ -48,8 +48,9 @@ module Blur
     FLOAT = 3
     DOUBLE = 4
     BINARY = 5
-    VALUE_MAP = {0 => "STRING", 1 => "INT", 2 => "LONG", 3 => "FLOAT", 4 => "DOUBLE", 5 => "BINARY"}
-    VALID_VALUES = Set.new([STRING, INT, LONG, FLOAT, DOUBLE, BINARY]).freeze
+    TEXT = 6
+    VALUE_MAP = {0 => "STRING", 1 => "INT", 2 => "LONG", 3 => "FLOAT", 4 => "DOUBLE", 5 => "BINARY", 6 => "TEXT"}
+    VALID_VALUES = Set.new([STRING, INT, LONG, FLOAT, DOUBLE, BINARY, TEXT]).freeze
   end
 
   module SortType
@@ -1003,7 +1004,7 @@ module Blur
       NAME => {:type => ::Thrift::Types::STRING, :name => 'name'},
       VALUE => {:type => ::Thrift::Types::STRING, :name => 'value', :binary => true},
       TYPE => {:type => ::Thrift::Types::I32, :name => 'type', :enum_class => ::Blur::TYPE},
-      BOOST => {:type => ::Thrift::Types::DOUBLE, :name => 'boost'}
+      BOOST => {:type => ::Thrift::Types::DOUBLE, :name => 'boost', :default => 1}
     }
 
     def struct_fields; FIELDS; end

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/beb7527a/interface/gen-rb/lucene.rb
----------------------------------------------------------------------
diff --git a/interface/gen-rb/lucene.rb b/interface/gen-rb/lucene.rb
index 63ef173..3dbcdb6 100644
--- a/interface/gen-rb/lucene.rb
+++ b/interface/gen-rb/lucene.rb
@@ -76,29 +76,13 @@ module Blur
         return
       end
 
-      def openWriteSession(table)
-        send_openWriteSession(table)
-        return recv_openWriteSession()
-      end
-
-      def send_openWriteSession(table)
-        send_message('openWriteSession', OpenWriteSession_args, :table => table)
-      end
-
-      def recv_openWriteSession()
-        result = receive_message(OpenWriteSession_result)
-        return result.success unless result.success.nil?
-        raise result.e unless result.e.nil?
-        raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'openWriteSession failed: unknown result')
-      end
-
-      def addDocuments(session, shardIndex, document)
-        send_addDocuments(session, shardIndex, document)
+      def addDocuments(table, shardIndex, document)
+        send_addDocuments(table, shardIndex, document)
         recv_addDocuments()
       end
 
-      def send_addDocuments(session, shardIndex, document)
-        send_message('addDocuments', AddDocuments_args, :session => session, :shardIndex => shardIndex, :document => document)
+      def send_addDocuments(table, shardIndex, document)
+        send_message('addDocuments', AddDocuments_args, :table => table, :shardIndex => shardIndex, :document => document)
       end
 
       def recv_addDocuments()
@@ -107,13 +91,13 @@ module Blur
         return
       end
 
-      def deleteDocumentsByQueries(session, shardIndex, queries)
-        send_deleteDocumentsByQueries(session, shardIndex, queries)
+      def deleteDocumentsByQueries(table, shardIndex, queries)
+        send_deleteDocumentsByQueries(table, shardIndex, queries)
         recv_deleteDocumentsByQueries()
       end
 
-      def send_deleteDocumentsByQueries(session, shardIndex, queries)
-        send_message('deleteDocumentsByQueries', DeleteDocumentsByQueries_args, :session => session, :shardIndex => shardIndex, :queries => queries)
+      def send_deleteDocumentsByQueries(table, shardIndex, queries)
+        send_message('deleteDocumentsByQueries', DeleteDocumentsByQueries_args, :table => table, :shardIndex => shardIndex, :queries => queries)
       end
 
       def recv_deleteDocumentsByQueries()
@@ -122,13 +106,13 @@ module Blur
         return
       end
 
-      def deleteDocuments(session, shardIndex, terms)
-        send_deleteDocuments(session, shardIndex, terms)
+      def deleteDocuments(table, shardIndex, terms)
+        send_deleteDocuments(table, shardIndex, terms)
         recv_deleteDocuments()
       end
 
-      def send_deleteDocuments(session, shardIndex, terms)
-        send_message('deleteDocuments', DeleteDocuments_args, :session => session, :shardIndex => shardIndex, :terms => terms)
+      def send_deleteDocuments(table, shardIndex, terms)
+        send_message('deleteDocuments', DeleteDocuments_args, :table => table, :shardIndex => shardIndex, :terms => terms)
       end
 
       def recv_deleteDocuments()
@@ -137,13 +121,13 @@ module Blur
         return
       end
 
-      def updateDocuments(session, shardIndex, terms, document)
-        send_updateDocuments(session, shardIndex, terms, document)
+      def updateDocuments(table, shardIndex, terms, document)
+        send_updateDocuments(table, shardIndex, terms, document)
         recv_updateDocuments()
       end
 
-      def send_updateDocuments(session, shardIndex, terms, document)
-        send_message('updateDocuments', UpdateDocuments_args, :session => session, :shardIndex => shardIndex, :terms => terms, :document => document)
+      def send_updateDocuments(table, shardIndex, terms, document)
+        send_message('updateDocuments', UpdateDocuments_args, :table => table, :shardIndex => shardIndex, :terms => terms, :document => document)
       end
 
       def recv_updateDocuments()
@@ -152,36 +136,6 @@ module Blur
         return
       end
 
-      def commit(session)
-        send_commit(session)
-        recv_commit()
-      end
-
-      def send_commit(session)
-        send_message('commit', Commit_args, :session => session)
-      end
-
-      def recv_commit()
-        result = receive_message(Commit_result)
-        raise result.e unless result.e.nil?
-        return
-      end
-
-      def rollback(session)
-        send_rollback(session)
-        recv_rollback()
-      end
-
-      def send_rollback(session)
-        send_message('rollback', Rollback_args, :session => session)
-      end
-
-      def recv_rollback()
-        result = receive_message(Rollback_result)
-        raise result.e unless result.e.nil?
-        return
-      end
-
     end
 
     class Processor < ::Blur::Blur::Processor 
@@ -231,22 +185,11 @@ module Blur
         write_result(result, oprot, 'closeReadSession', seqid)
       end
 
-      def process_openWriteSession(seqid, iprot, oprot)
-        args = read_args(iprot, OpenWriteSession_args)
-        result = OpenWriteSession_result.new()
-        begin
-          result.success = @handler.openWriteSession(args.table)
-        rescue ::Blur::BlurException => e
-          result.e = e
-        end
-        write_result(result, oprot, 'openWriteSession', seqid)
-      end
-
       def process_addDocuments(seqid, iprot, oprot)
         args = read_args(iprot, AddDocuments_args)
         result = AddDocuments_result.new()
         begin
-          @handler.addDocuments(args.session, args.shardIndex, args.document)
+          @handler.addDocuments(args.table, args.shardIndex, args.document)
         rescue ::Blur::BlurException => e
           result.e = e
         end
@@ -257,7 +200,7 @@ module Blur
         args = read_args(iprot, DeleteDocumentsByQueries_args)
         result = DeleteDocumentsByQueries_result.new()
         begin
-          @handler.deleteDocumentsByQueries(args.session, args.shardIndex, args.queries)
+          @handler.deleteDocumentsByQueries(args.table, args.shardIndex, args.queries)
         rescue ::Blur::BlurException => e
           result.e = e
         end
@@ -268,7 +211,7 @@ module Blur
         args = read_args(iprot, DeleteDocuments_args)
         result = DeleteDocuments_result.new()
         begin
-          @handler.deleteDocuments(args.session, args.shardIndex, args.terms)
+          @handler.deleteDocuments(args.table, args.shardIndex, args.terms)
         rescue ::Blur::BlurException => e
           result.e = e
         end
@@ -279,35 +222,13 @@ module Blur
         args = read_args(iprot, UpdateDocuments_args)
         result = UpdateDocuments_result.new()
         begin
-          @handler.updateDocuments(args.session, args.shardIndex, args.terms, args.document)
+          @handler.updateDocuments(args.table, args.shardIndex, args.terms, args.document)
         rescue ::Blur::BlurException => e
           result.e = e
         end
         write_result(result, oprot, 'updateDocuments', seqid)
       end
 
-      def process_commit(seqid, iprot, oprot)
-        args = read_args(iprot, Commit_args)
-        result = Commit_result.new()
-        begin
-          @handler.commit(args.session)
-        rescue ::Blur::BlurException => e
-          result.e = e
-        end
-        write_result(result, oprot, 'commit', seqid)
-      end
-
-      def process_rollback(seqid, iprot, oprot)
-        args = read_args(iprot, Rollback_args)
-        result = Rollback_result.new()
-        begin
-          @handler.rollback(args.session)
-        rescue ::Blur::BlurException => e
-          result.e = e
-        end
-        write_result(result, oprot, 'rollback', seqid)
-      end
-
     end
 
     # HELPER FUNCTIONS AND STRUCTURES
@@ -452,48 +373,14 @@ module Blur
       ::Thrift::Struct.generate_accessors self
     end
 
-    class OpenWriteSession_args
-      include ::Thrift::Struct, ::Thrift::Struct_Union
-      TABLE = 1
-
-      FIELDS = {
-        TABLE => {:type => ::Thrift::Types::STRING, :name => 'table'}
-      }
-
-      def struct_fields; FIELDS; end
-
-      def validate
-      end
-
-      ::Thrift::Struct.generate_accessors self
-    end
-
-    class OpenWriteSession_result
-      include ::Thrift::Struct, ::Thrift::Struct_Union
-      SUCCESS = 0
-      E = 1
-
-      FIELDS = {
-        SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::Blur::Session},
-        E => {:type => ::Thrift::Types::STRUCT, :name => 'e', :class => ::Blur::BlurException}
-      }
-
-      def struct_fields; FIELDS; end
-
-      def validate
-      end
-
-      ::Thrift::Struct.generate_accessors self
-    end
-
     class AddDocuments_args
       include ::Thrift::Struct, ::Thrift::Struct_Union
-      SESSION = 1
+      TABLE = 1
       SHARDINDEX = 2
       DOCUMENT = 3
 
       FIELDS = {
-        SESSION => {:type => ::Thrift::Types::STRUCT, :name => 'session', :class => ::Blur::Session},
+        TABLE => {:type => ::Thrift::Types::STRING, :name => 'table'},
         SHARDINDEX => {:type => ::Thrift::Types::I32, :name => 'shardIndex'},
         DOCUMENT => {:type => ::Thrift::Types::LIST, :name => 'document', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Blur::Document}}
       }
@@ -524,12 +411,12 @@ module Blur
 
     class DeleteDocumentsByQueries_args
       include ::Thrift::Struct, ::Thrift::Struct_Union
-      SESSION = 1
+      TABLE = 1
       SHARDINDEX = 2
       QUERIES = 3
 
       FIELDS = {
-        SESSION => {:type => ::Thrift::Types::STRUCT, :name => 'session', :class => ::Blur::Session},
+        TABLE => {:type => ::Thrift::Types::STRING, :name => 'table'},
         SHARDINDEX => {:type => ::Thrift::Types::I32, :name => 'shardIndex'},
         QUERIES => {:type => ::Thrift::Types::LIST, :name => 'queries', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Blur::QueryArgs}}
       }
@@ -560,12 +447,12 @@ module Blur
 
     class DeleteDocuments_args
       include ::Thrift::Struct, ::Thrift::Struct_Union
-      SESSION = 1
+      TABLE = 1
       SHARDINDEX = 2
       TERMS = 3
 
       FIELDS = {
-        SESSION => {:type => ::Thrift::Types::STRUCT, :name => 'session', :class => ::Blur::Session},
+        TABLE => {:type => ::Thrift::Types::STRING, :name => 'table'},
         SHARDINDEX => {:type => ::Thrift::Types::I32, :name => 'shardIndex'},
         TERMS => {:type => ::Thrift::Types::LIST, :name => 'terms', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Blur::Term}}
       }
@@ -596,13 +483,13 @@ module Blur
 
     class UpdateDocuments_args
       include ::Thrift::Struct, ::Thrift::Struct_Union
-      SESSION = 1
+      TABLE = 1
       SHARDINDEX = 2
       TERMS = 3
       DOCUMENT = 4
 
       FIELDS = {
-        SESSION => {:type => ::Thrift::Types::STRUCT, :name => 'session', :class => ::Blur::Session},
+        TABLE => {:type => ::Thrift::Types::STRING, :name => 'table'},
         SHARDINDEX => {:type => ::Thrift::Types::I32, :name => 'shardIndex'},
         TERMS => {:type => ::Thrift::Types::LIST, :name => 'terms', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Blur::Term}},
         DOCUMENT => {:type => ::Thrift::Types::LIST, :name => 'document', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Blur::Document}}
@@ -632,70 +519,6 @@ module Blur
       ::Thrift::Struct.generate_accessors self
     end
 
-    class Commit_args
-      include ::Thrift::Struct, ::Thrift::Struct_Union
-      SESSION = 1
-
-      FIELDS = {
-        SESSION => {:type => ::Thrift::Types::STRUCT, :name => 'session', :class => ::Blur::Session}
-      }
-
-      def struct_fields; FIELDS; end
-
-      def validate
-      end
-
-      ::Thrift::Struct.generate_accessors self
-    end
-
-    class Commit_result
-      include ::Thrift::Struct, ::Thrift::Struct_Union
-      E = 1
-
-      FIELDS = {
-        E => {:type => ::Thrift::Types::STRUCT, :name => 'e', :class => ::Blur::BlurException}
-      }
-
-      def struct_fields; FIELDS; end
-
-      def validate
-      end
-
-      ::Thrift::Struct.generate_accessors self
-    end
-
-    class Rollback_args
-      include ::Thrift::Struct, ::Thrift::Struct_Union
-      SESSION = 1
-
-      FIELDS = {
-        SESSION => {:type => ::Thrift::Types::STRUCT, :name => 'session', :class => ::Blur::Session}
-      }
-
-      def struct_fields; FIELDS; end
-
-      def validate
-      end
-
-      ::Thrift::Struct.generate_accessors self
-    end
-
-    class Rollback_result
-      include ::Thrift::Struct, ::Thrift::Struct_Union
-      E = 1
-
-      FIELDS = {
-        E => {:type => ::Thrift::Types::STRUCT, :name => 'e', :class => ::Blur::BlurException}
-      }
-
-      def struct_fields; FIELDS; end
-
-      def validate
-      end
-
-      ::Thrift::Struct.generate_accessors self
-    end
-
   end
 
 end

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/beb7527a/src/blur-core/src/main/java/org/apache/blur/manager/writer/BlurIndex.java
----------------------------------------------------------------------
diff --git a/src/blur-core/src/main/java/org/apache/blur/manager/writer/BlurIndex.java b/src/blur-core/src/main/java/org/apache/blur/manager/writer/BlurIndex.java
index 79ba2b8..f15d810 100644
--- a/src/blur-core/src/main/java/org/apache/blur/manager/writer/BlurIndex.java
+++ b/src/blur-core/src/main/java/org/apache/blur/manager/writer/BlurIndex.java
@@ -17,12 +17,13 @@ package org.apache.blur.manager.writer;
  * limitations under the License.
  */
 import java.io.IOException;
+import java.util.List;
 import java.util.concurrent.atomic.AtomicBoolean;
 
+import org.apache.blur.thrift.generated.Document;
 import org.apache.blur.thrift.generated.Row;
 import org.apache.lucene.index.IndexReader;
 
-
 public abstract class BlurIndex {
 
   public abstract void replaceRow(boolean waitToBeVisible, boolean wal, Row row) throws IOException;
@@ -39,4 +40,6 @@ public abstract class BlurIndex {
 
   public abstract void optimize(int numberOfSegmentsPerShard) throws IOException;
 
+  public abstract void addDocuments(boolean waitToBeVisible, boolean wal, List<Document> documents) throws IOException;
+
 }

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/beb7527a/src/blur-core/src/main/java/org/apache/blur/manager/writer/BlurIndexReader.java
----------------------------------------------------------------------
diff --git a/src/blur-core/src/main/java/org/apache/blur/manager/writer/BlurIndexReader.java b/src/blur-core/src/main/java/org/apache/blur/manager/writer/BlurIndexReader.java
index 854490e..c37046e 100644
--- a/src/blur-core/src/main/java/org/apache/blur/manager/writer/BlurIndexReader.java
+++ b/src/blur-core/src/main/java/org/apache/blur/manager/writer/BlurIndexReader.java
@@ -19,10 +19,12 @@ package org.apache.blur.manager.writer;
 import static org.apache.blur.lucene.LuceneVersionConstant.LUCENE_VERSION;
 
 import java.io.IOException;
+import java.util.List;
 
 import org.apache.blur.index.IndexWriter;
 import org.apache.blur.log.Log;
 import org.apache.blur.log.LogFactory;
+import org.apache.blur.thrift.generated.Document;
 import org.apache.blur.thrift.generated.Row;
 import org.apache.lucene.analysis.core.KeywordAnalyzer;
 import org.apache.lucene.index.DirectoryReader;
@@ -69,4 +71,9 @@ public class BlurIndexReader extends AbstractBlurIndex {
   public void optimize(int numberOfSegmentsPerShard) throws IOException {
     // Do nothing
   }
+
+  @Override
+  public void addDocuments(boolean waitToBeVisible, boolean wal, List<Document> documents) throws IOException {
+    throw new RuntimeException("Read-only shard");
+  }
 }

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/beb7527a/src/blur-core/src/main/java/org/apache/blur/manager/writer/BlurNRTIndex.java
----------------------------------------------------------------------
diff --git a/src/blur-core/src/main/java/org/apache/blur/manager/writer/BlurNRTIndex.java b/src/blur-core/src/main/java/org/apache/blur/manager/writer/BlurNRTIndex.java
index 141dc0f..37ec4a8 100644
--- a/src/blur-core/src/main/java/org/apache/blur/manager/writer/BlurNRTIndex.java
+++ b/src/blur-core/src/main/java/org/apache/blur/manager/writer/BlurNRTIndex.java
@@ -30,6 +30,7 @@ import org.apache.blur.log.Log;
 import org.apache.blur.log.LogFactory;
 import org.apache.blur.lucene.store.refcounter.DirectoryReferenceCounter;
 import org.apache.blur.lucene.store.refcounter.DirectoryReferenceFileGC;
+import org.apache.blur.thrift.generated.Document;
 import org.apache.blur.thrift.generated.Record;
 import org.apache.blur.thrift.generated.Row;
 import org.apache.hadoop.conf.Configuration;
@@ -48,7 +49,6 @@ import org.apache.lucene.search.SearcherFactory;
 import org.apache.lucene.search.similarities.Similarity;
 import org.apache.lucene.store.Directory;
 
-
 public class BlurNRTIndex extends BlurIndex {
 
   private static final Log LOG = LogFactory.getLog(BlurNRTIndex.class);
@@ -295,4 +295,10 @@ public class BlurNRTIndex extends BlurIndex {
     _gc = gc;
   }
 
+  @Override
+  public void addDocuments(boolean waitToBeVisible, boolean wal, List<Document> documents) throws IOException {
+    long generation = _recorder.addDocuments(wal, documents, _trackingWriter);
+    waitToBeVisible(waitToBeVisible, generation);
+  }
+
 }

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/beb7527a/src/blur-core/src/main/java/org/apache/blur/manager/writer/TransactionRecorder.java
----------------------------------------------------------------------
diff --git a/src/blur-core/src/main/java/org/apache/blur/manager/writer/TransactionRecorder.java b/src/blur-core/src/main/java/org/apache/blur/manager/writer/TransactionRecorder.java
index d5861f4..8cca5d5 100644
--- a/src/blur-core/src/main/java/org/apache/blur/manager/writer/TransactionRecorder.java
+++ b/src/blur-core/src/main/java/org/apache/blur/manager/writer/TransactionRecorder.java
@@ -37,6 +37,7 @@ import org.apache.blur.thrift.generated.Column;
 import org.apache.blur.thrift.generated.Record;
 import org.apache.blur.thrift.generated.Row;
 import org.apache.blur.utils.BlurConstants;
+import org.apache.blur.utils.BlurUtil;
 import org.apache.blur.utils.RowIndexWriter;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.fs.FSDataInputStream;
@@ -352,4 +353,12 @@ public class TransactionRecorder {
   private Term createRowId(String id) {
     return new Term(BlurConstants.ROW_ID, id);
   }
+
+  public long addDocuments(boolean wal, List<org.apache.blur.thrift.generated.Document> documents, TrackingIndexWriter writer) throws IOException {
+    List<Document> docs = new ArrayList<Document>();
+    for (org.apache.blur.thrift.generated.Document doc : documents) {
+      docs.add(BlurUtil.convert(doc));
+    }
+    return writer.addDocuments(docs);
+  }
 }

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/beb7527a/src/blur-core/src/main/java/org/apache/blur/thrift/BlurShardServer.java
----------------------------------------------------------------------
diff --git a/src/blur-core/src/main/java/org/apache/blur/thrift/BlurShardServer.java b/src/blur-core/src/main/java/org/apache/blur/thrift/BlurShardServer.java
index 0b6cc89..cf39e7d 100644
--- a/src/blur-core/src/main/java/org/apache/blur/thrift/BlurShardServer.java
+++ b/src/blur-core/src/main/java/org/apache/blur/thrift/BlurShardServer.java
@@ -547,44 +547,36 @@ public class BlurShardServer extends TableAdmin implements Iface {
   }
 
   @Override
-  public Session openWriteSession(String table) throws BlurException, TException {
-    // TODO Auto-generated method stub
-    return null;
-  }
-
-  @Override
-  public void addDocuments(Session session, int shardIndex, List<Document> document) throws BlurException, TException {
-    // TODO Auto-generated method stub
-
-  }
-
-  @Override
-  public void deleteDocumentsByQueries(Session session, int shardIndex, List<QueryArgs> queries) throws BlurException, TException {
-    // TODO Auto-generated method stub
-
+  public void addDocuments(String table, int shardIndex, List<Document> documents) throws BlurException, TException {
+    try {
+      Map<String, BlurIndex> blurIndexes;
+      try {
+        blurIndexes = _indexServer.getIndexes(table);
+      } catch (IOException e) {
+        LOG.error("Unknown error while trying to fetch index readers.", e);
+        throw new BException(e.getMessage(), e);
+      }
+      BlurIndex index = blurIndexes.get(BlurUtil.getShardName(BlurConstants.SHARD_PREFIX, shardIndex));
+      index.addDocuments(false, false, documents);
+    } catch (Throwable t) {
+      LOG.error("Unknown error", t);
+      throw new BException(t.getMessage(), t);
+    }
   }
 
   @Override
-  public void deleteDocuments(Session session, int shardIndex, List<Term> terms) throws BlurException, TException {
-    // TODO Auto-generated method stub
+  public void deleteDocumentsByQueries(String table, int shardIndex, List<QueryArgs> queries) throws BlurException, TException {
 
   }
 
   @Override
-  public void updateDocuments(Session session, int shardIndex, List<Term> terms, List<Document> document) throws BlurException, TException {
-    // TODO Auto-generated method stub
+  public void deleteDocuments(String table, int shardIndex, List<Term> terms) throws BlurException, TException {
 
   }
 
   @Override
-  public void commit(Session session) throws BlurException, TException {
-    // TODO Auto-generated method stub
+  public void updateDocuments(String table, int shardIndex, List<Term> terms, List<Document> document) throws BlurException, TException {
 
   }
 
-  @Override
-  public void rollback(Session session) throws BlurException, TException {
-    // TODO Auto-generated method stub
-
-  }
 }

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/beb7527a/src/blur-core/src/main/java/org/apache/blur/utils/BlurUtil.java
----------------------------------------------------------------------
diff --git a/src/blur-core/src/main/java/org/apache/blur/utils/BlurUtil.java b/src/blur-core/src/main/java/org/apache/blur/utils/BlurUtil.java
index 3468507..69b6c5e 100644
--- a/src/blur-core/src/main/java/org/apache/blur/utils/BlurUtil.java
+++ b/src/blur-core/src/main/java/org/apache/blur/utils/BlurUtil.java
@@ -25,6 +25,7 @@ import java.io.InputStream;
 import java.io.ObjectInputStream;
 import java.io.ObjectOutputStream;
 import java.io.Serializable;
+import java.io.UnsupportedEncodingException;
 import java.lang.reflect.InvocationHandler;
 import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
@@ -79,6 +80,15 @@ import org.apache.hadoop.fs.FileSystem;
 import org.apache.hadoop.fs.Path;
 import org.apache.hadoop.io.DataInputBuffer;
 import org.apache.lucene.document.Document;
+import org.apache.lucene.document.DoubleField;
+import org.apache.lucene.document.FieldType;
+import org.apache.lucene.document.FloatField;
+import org.apache.lucene.document.IntField;
+import org.apache.lucene.document.LongField;
+import org.apache.lucene.document.StoredField;
+import org.apache.lucene.document.StringField;
+import org.apache.lucene.document.Field.Store;
+import org.apache.lucene.document.TextField;
 import org.apache.lucene.index.AtomicReader;
 import org.apache.lucene.index.IndexReader;
 import org.apache.lucene.index.IndexableField;
@@ -837,7 +847,7 @@ public class BlurUtil {
 
   public static Field convert(IndexableField field) {
     Field result = new Field();
-    result.setBoost(field.boost()); 
+    result.setBoost(field.boost());
     result.setName(field.name());
     Number number = field.numericValue();
     if (number != null) {
@@ -943,15 +953,15 @@ public class BlurUtil {
     String name = f.getName();
     builder.append(name);
     builder.append(',');
-    
+
     TYPE type = f.getType();
     builder.append(type.name());
     builder.append(',');
-    
+
     byte[] value = f.getValue();
     builder.append(toString(type, value));
     builder.append(',');
-    
+
     double boost = f.getBoost();
     builder.append(boost);
     builder.append('}');
@@ -976,4 +986,68 @@ public class BlurUtil {
       throw new RuntimeException("Type unknown.");
     }
   }
+
+  public static Document convert(org.apache.blur.thrift.generated.Document document) throws IOException {
+    Document result = new Document();
+    List<Field> fields = document.getFields();
+    for (Field field : fields) {
+      result.add(convert(field));
+    }
+    return result;
+  }
+
+  public static IndexableField convert(Field field) throws IOException {
+    TYPE type = field.getType();
+    org.apache.lucene.document.Field result;
+    switch (type) {
+    case STRING:
+      result = new StringField(field.getName(), toString(field.getValue()), Store.YES);
+      break;
+    case TEXT:
+      result = new TextField(field.getName(), toString(field.getValue()), Store.YES);
+      break;
+    case INT:
+      result = new IntField(field.getName(), toInteger(field.getValue()), Store.YES);
+      break;
+    case FLOAT:
+      result = new FloatField(field.getName(), toFloat(field.getValue()), Store.YES);
+      break;
+    case LONG:
+      result = new LongField(field.getName(), toLong(field.getValue()), Store.YES);
+      break;
+    case DOUBLE:
+      result = new DoubleField(field.getName(), toDouble(field.getValue()), Store.YES);
+      break;
+    case BINARY:
+      result = new StoredField(field.getName(), field.getValue());
+      break;
+    default:
+      throw new RuntimeException("Not supported");
+    }
+    FieldType fieldType = result.fieldType();
+    if (fieldType.indexed() && !fieldType.omitNorms()) {
+      result.setBoost((float) field.getBoost());
+    }
+    return result;
+  }
+
+  public static double toDouble(byte[] value) {
+    throw new RuntimeException("Not implemented");
+  }
+
+  public static long toLong(byte[] value) {
+    throw new RuntimeException("Not implemented");
+  }
+
+  public static float toFloat(byte[] value) {
+    throw new RuntimeException("Not implemented");
+  }
+
+  public static int toInteger(byte[] value) {
+    throw new RuntimeException("Not implemented");
+  }
+
+  public static String toString(byte[] value) throws IOException {
+    return new String(value, "UTF-8");
+  }
 }

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/beb7527a/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/Field.java
----------------------------------------------------------------------
diff --git a/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/Field.java b/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/Field.java
index e2a556d..7d51828 100644
--- a/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/Field.java
+++ b/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/Field.java
@@ -162,6 +162,8 @@ public class Field implements org.apache.thrift.TBase<Field, Field._Fields>, jav
   }
 
   public Field() {
+    this.boost = 1;
+
   }
 
   public Field(
@@ -205,8 +207,8 @@ public class Field implements org.apache.thrift.TBase<Field, Field._Fields>, jav
     this.name = null;
     this.value = null;
     this.type = null;
-    setBoostIsSet(false);
-    this.boost = 0.0;
+    this.boost = 1;
+
   }
 
   public String getName() {


Mime
View raw message