incubator-blur-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amccu...@apache.org
Subject [1/8] Simple highlighting is now built in, will likely need more work.
Date Thu, 13 Jun 2013 02:24:52 GMT
Updated Branches:
  refs/heads/master 38f29e2f1 -> 3db5c4b1b


http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/3dd4c2e7/distribution/src/main/scripts/interface/gen-perl/Blur/Types.pm
----------------------------------------------------------------------
diff --git a/distribution/src/main/scripts/interface/gen-perl/Blur/Types.pm b/distribution/src/main/scripts/interface/gen-perl/Blur/Types.pm
index 9c0d1d6..dec017f 100644
--- a/distribution/src/main/scripts/interface/gen-perl/Blur/Types.pm
+++ b/distribution/src/main/scripts/interface/gen-perl/Blur/Types.pm
@@ -194,7 +194,7 @@ sub write {
 
 package Blur::Record;
 use base qw(Class::Accessor);
-Blur::Record->mk_accessors( qw( recordId family columns highlightedColumns ) );
+Blur::Record->mk_accessors( qw( recordId family columns ) );
 
 sub new {
   my $classname = shift;
@@ -203,7 +203,6 @@ sub new {
   $self->{recordId} = undef;
   $self->{family} = undef;
   $self->{columns} = undef;
-  $self->{highlightedColumns} = undef;
   if (UNIVERSAL::isa($vals,'HASH')) {
     if (defined $vals->{recordId}) {
       $self->{recordId} = $vals->{recordId};
@@ -214,9 +213,6 @@ sub new {
     if (defined $vals->{columns}) {
       $self->{columns} = $vals->{columns};
     }
-    if (defined $vals->{highlightedColumns}) {
-      $self->{highlightedColumns} = $vals->{highlightedColumns};
-    }
   }
   return bless ($self, $classname);
 }
@@ -271,25 +267,6 @@ sub read {
         $xfer += $input->skip($ftype);
       }
       last; };
-      /^4$/ && do{      if ($ftype == TType::LIST) {
-        {
-          my $_size6 = 0;
-          $self->{highlightedColumns} = [];
-          my $_etype9 = 0;
-          $xfer += $input->readListBegin(\$_etype9, \$_size6);
-          for (my $_i10 = 0; $_i10 < $_size6; ++$_i10)
-          {
-            my $elem11 = undef;
-            $elem11 = new Blur::Column();
-            $xfer += $elem11->read($input);
-            push(@{$self->{highlightedColumns}},$elem11);
-          }
-          $xfer += $input->readListEnd();
-        }
-      } else {
-        $xfer += $input->skip($ftype);
-      }
-      last; };
         $xfer += $input->skip($ftype);
     }
     $xfer += $input->readFieldEnd();
@@ -317,23 +294,9 @@ sub write {
     {
       $xfer += $output->writeListBegin(TType::STRUCT, scalar(@{$self->{columns}}));
       {
-        foreach my $iter12 (@{$self->{columns}}) 
-        {
-          $xfer += ${iter12}->write($output);
-        }
-      }
-      $xfer += $output->writeListEnd();
-    }
-    $xfer += $output->writeFieldEnd();
-  }
-  if (defined $self->{highlightedColumns}) {
-    $xfer += $output->writeFieldBegin('highlightedColumns', TType::LIST, 4);
-    {
-      $xfer += $output->writeListBegin(TType::STRUCT, scalar(@{$self->{highlightedColumns}}));
-      {
-        foreach my $iter13 (@{$self->{highlightedColumns}}) 
+        foreach my $iter6 (@{$self->{columns}}) 
         {
-          $xfer += ${iter13}->write($output);
+          $xfer += ${iter6}->write($output);
         }
       }
       $xfer += $output->writeListEnd();
@@ -397,16 +360,16 @@ sub read {
       last; };
       /^2$/ && do{      if ($ftype == TType::LIST) {
         {
-          my $_size14 = 0;
+          my $_size7 = 0;
           $self->{records} = [];
-          my $_etype17 = 0;
-          $xfer += $input->readListBegin(\$_etype17, \$_size14);
-          for (my $_i18 = 0; $_i18 < $_size14; ++$_i18)
+          my $_etype10 = 0;
+          $xfer += $input->readListBegin(\$_etype10, \$_size7);
+          for (my $_i11 = 0; $_i11 < $_size7; ++$_i11)
           {
-            my $elem19 = undef;
-            $elem19 = new Blur::Record();
-            $xfer += $elem19->read($input);
-            push(@{$self->{records}},$elem19);
+            my $elem12 = undef;
+            $elem12 = new Blur::Record();
+            $xfer += $elem12->read($input);
+            push(@{$self->{records}},$elem12);
           }
           $xfer += $input->readListEnd();
         }
@@ -442,9 +405,9 @@ sub write {
     {
       $xfer += $output->writeListBegin(TType::STRUCT, scalar(@{$self->{records}}));
       {
-        foreach my $iter20 (@{$self->{records}}) 
+        foreach my $iter13 (@{$self->{records}}) 
         {
-          $xfer += ${iter20}->write($output);
+          $xfer += ${iter13}->write($output);
         }
       }
       $xfer += $output->writeListEnd();
@@ -587,20 +550,24 @@ sub write {
 
 package Blur::HighlightOptions;
 use base qw(Class::Accessor);
-Blur::HighlightOptions->mk_accessors( qw( simpleQuery onlyMatchingRecords ) );
+Blur::HighlightOptions->mk_accessors( qw( simpleQuery preTag postTag ) );
 
 sub new {
   my $classname = shift;
   my $self      = {};
   my $vals      = shift || {};
   $self->{simpleQuery} = undef;
-  $self->{onlyMatchingRecords} = 1;
+  $self->{preTag} = "<<<";
+  $self->{postTag} = ">>>";
   if (UNIVERSAL::isa($vals,'HASH')) {
     if (defined $vals->{simpleQuery}) {
       $self->{simpleQuery} = $vals->{simpleQuery};
     }
-    if (defined $vals->{onlyMatchingRecords}) {
-      $self->{onlyMatchingRecords} = $vals->{onlyMatchingRecords};
+    if (defined $vals->{preTag}) {
+      $self->{preTag} = $vals->{preTag};
+    }
+    if (defined $vals->{postTag}) {
+      $self->{postTag} = $vals->{postTag};
     }
   }
   return bless ($self, $classname);
@@ -632,8 +599,14 @@ sub read {
         $xfer += $input->skip($ftype);
       }
       last; };
-      /^2$/ && do{      if ($ftype == TType::BOOL) {
-        $xfer += $input->readBool(\$self->{onlyMatchingRecords});
+      /^2$/ && do{      if ($ftype == TType::STRING) {
+        $xfer += $input->readString(\$self->{preTag});
+      } else {
+        $xfer += $input->skip($ftype);
+      }
+      last; };
+      /^3$/ && do{      if ($ftype == TType::STRING) {
+        $xfer += $input->readString(\$self->{postTag});
       } else {
         $xfer += $input->skip($ftype);
       }
@@ -655,9 +628,14 @@ sub write {
     $xfer += $self->{simpleQuery}->write($output);
     $xfer += $output->writeFieldEnd();
   }
-  if (defined $self->{onlyMatchingRecords}) {
-    $xfer += $output->writeFieldBegin('onlyMatchingRecords', TType::BOOL, 2);
-    $xfer += $output->writeBool($self->{onlyMatchingRecords});
+  if (defined $self->{preTag}) {
+    $xfer += $output->writeFieldBegin('preTag', TType::STRING, 2);
+    $xfer += $output->writeString($self->{preTag});
+    $xfer += $output->writeFieldEnd();
+  }
+  if (defined $self->{postTag}) {
+    $xfer += $output->writeFieldBegin('postTag', TType::STRING, 3);
+    $xfer += $output->writeString($self->{postTag});
     $xfer += $output->writeFieldEnd();
   }
   $xfer += $output->writeFieldStop();
@@ -763,15 +741,15 @@ sub read {
       last; };
       /^5$/ && do{      if ($ftype == TType::SET) {
         {
-          my $_size21 = 0;
+          my $_size14 = 0;
           $self->{columnFamiliesToFetch} = {};
-          my $_etype24 = 0;
-          $xfer += $input->readSetBegin(\$_etype24, \$_size21);
-          for (my $_i25 = 0; $_i25 < $_size21; ++$_i25)
+          my $_etype17 = 0;
+          $xfer += $input->readSetBegin(\$_etype17, \$_size14);
+          for (my $_i18 = 0; $_i18 < $_size14; ++$_i18)
           {
-            my $elem26 = undef;
-            $xfer += $input->readString(\$elem26);
-            $self->{columnFamiliesToFetch}->{$elem26} = 1;
+            my $elem19 = undef;
+            $xfer += $input->readString(\$elem19);
+            $self->{columnFamiliesToFetch}->{$elem19} = 1;
           }
           $xfer += $input->readSetEnd();
         }
@@ -781,30 +759,30 @@ sub read {
       last; };
       /^6$/ && do{      if ($ftype == TType::MAP) {
         {
-          my $_size27 = 0;
+          my $_size20 = 0;
           $self->{columnsToFetch} = {};
-          my $_ktype28 = 0;
-          my $_vtype29 = 0;
-          $xfer += $input->readMapBegin(\$_ktype28, \$_vtype29, \$_size27);
-          for (my $_i31 = 0; $_i31 < $_size27; ++$_i31)
+          my $_ktype21 = 0;
+          my $_vtype22 = 0;
+          $xfer += $input->readMapBegin(\$_ktype21, \$_vtype22, \$_size20);
+          for (my $_i24 = 0; $_i24 < $_size20; ++$_i24)
           {
-            my $key32 = '';
-            my $val33 = [];
-            $xfer += $input->readString(\$key32);
+            my $key25 = '';
+            my $val26 = [];
+            $xfer += $input->readString(\$key25);
             {
-              my $_size34 = 0;
-              $val33 = {};
-              my $_etype37 = 0;
-              $xfer += $input->readSetBegin(\$_etype37, \$_size34);
-              for (my $_i38 = 0; $_i38 < $_size34; ++$_i38)
+              my $_size27 = 0;
+              $val26 = {};
+              my $_etype30 = 0;
+              $xfer += $input->readSetBegin(\$_etype30, \$_size27);
+              for (my $_i31 = 0; $_i31 < $_size27; ++$_i31)
               {
-                my $elem39 = undef;
-                $xfer += $input->readString(\$elem39);
-                $val33->{$elem39} = 1;
+                my $elem32 = undef;
+                $xfer += $input->readString(\$elem32);
+                $val26->{$elem32} = 1;
               }
               $xfer += $input->readSetEnd();
             }
-            $self->{columnsToFetch}->{$key32} = $val33;
+            $self->{columnsToFetch}->{$key25} = $val26;
           }
           $xfer += $input->readMapEnd();
         }
@@ -874,9 +852,9 @@ sub write {
     {
       $xfer += $output->writeSetBegin(TType::STRING, scalar(@{$self->{columnFamiliesToFetch}}));
       {
-        foreach my $iter40 (@{$self->{columnFamiliesToFetch}})
+        foreach my $iter33 (@{$self->{columnFamiliesToFetch}})
         {
-          $xfer += $output->writeString($iter40);
+          $xfer += $output->writeString($iter33);
         }
       }
       $xfer += $output->writeSetEnd();
@@ -888,15 +866,15 @@ sub write {
     {
       $xfer += $output->writeMapBegin(TType::STRING, TType::SET, scalar(keys %{$self->{columnsToFetch}}));
       {
-        while( my ($kiter41,$viter42) = each %{$self->{columnsToFetch}}) 
+        while( my ($kiter34,$viter35) = each %{$self->{columnsToFetch}}) 
         {
-          $xfer += $output->writeString($kiter41);
+          $xfer += $output->writeString($kiter34);
           {
-            $xfer += $output->writeSetBegin(TType::STRING, scalar(@{${viter42}}));
+            $xfer += $output->writeSetBegin(TType::STRING, scalar(@{${viter35}}));
             {
-              foreach my $iter43 (@{${viter42}})
+              foreach my $iter36 (@{${viter35}})
               {
-                $xfer += $output->writeString($iter43);
+                $xfer += $output->writeString($iter36);
               }
             }
             $xfer += $output->writeSetEnd();
@@ -1469,16 +1447,16 @@ sub read {
       last; };
       /^3$/ && do{      if ($ftype == TType::LIST) {
         {
-          my $_size44 = 0;
+          my $_size37 = 0;
           $self->{facets} = [];
-          my $_etype47 = 0;
-          $xfer += $input->readListBegin(\$_etype47, \$_size44);
-          for (my $_i48 = 0; $_i48 < $_size44; ++$_i48)
+          my $_etype40 = 0;
+          $xfer += $input->readListBegin(\$_etype40, \$_size37);
+          for (my $_i41 = 0; $_i41 < $_size37; ++$_i41)
           {
-            my $elem49 = undef;
-            $elem49 = new Blur::Facet();
-            $xfer += $elem49->read($input);
-            push(@{$self->{facets}},$elem49);
+            my $elem42 = undef;
+            $elem42 = new Blur::Facet();
+            $xfer += $elem42->read($input);
+            push(@{$self->{facets}},$elem42);
           }
           $xfer += $input->readListEnd();
         }
@@ -1586,9 +1564,9 @@ sub write {
     {
       $xfer += $output->writeListBegin(TType::STRUCT, scalar(@{$self->{facets}}));
       {
-        foreach my $iter50 (@{$self->{facets}}) 
+        foreach my $iter43 (@{$self->{facets}}) 
         {
-          $xfer += ${iter50}->write($output);
+          $xfer += ${iter43}->write($output);
         }
       }
       $xfer += $output->writeListEnd();
@@ -1819,18 +1797,18 @@ sub read {
       last; };
       /^2$/ && do{      if ($ftype == TType::MAP) {
         {
-          my $_size51 = 0;
+          my $_size44 = 0;
           $self->{shardInfo} = {};
-          my $_ktype52 = 0;
-          my $_vtype53 = 0;
-          $xfer += $input->readMapBegin(\$_ktype52, \$_vtype53, \$_size51);
-          for (my $_i55 = 0; $_i55 < $_size51; ++$_i55)
+          my $_ktype45 = 0;
+          my $_vtype46 = 0;
+          $xfer += $input->readMapBegin(\$_ktype45, \$_vtype46, \$_size44);
+          for (my $_i48 = 0; $_i48 < $_size44; ++$_i48)
           {
-            my $key56 = '';
-            my $val57 = 0;
-            $xfer += $input->readString(\$key56);
-            $xfer += $input->readI64(\$val57);
-            $self->{shardInfo}->{$key56} = $val57;
+            my $key49 = '';
+            my $val50 = 0;
+            $xfer += $input->readString(\$key49);
+            $xfer += $input->readI64(\$val50);
+            $self->{shardInfo}->{$key49} = $val50;
           }
           $xfer += $input->readMapEnd();
         }
@@ -1840,16 +1818,16 @@ sub read {
       last; };
       /^3$/ && do{      if ($ftype == TType::LIST) {
         {
-          my $_size58 = 0;
+          my $_size51 = 0;
           $self->{results} = [];
-          my $_etype61 = 0;
-          $xfer += $input->readListBegin(\$_etype61, \$_size58);
-          for (my $_i62 = 0; $_i62 < $_size58; ++$_i62)
+          my $_etype54 = 0;
+          $xfer += $input->readListBegin(\$_etype54, \$_size51);
+          for (my $_i55 = 0; $_i55 < $_size51; ++$_i55)
           {
-            my $elem63 = undef;
-            $elem63 = new Blur::BlurResult();
-            $xfer += $elem63->read($input);
-            push(@{$self->{results}},$elem63);
+            my $elem56 = undef;
+            $elem56 = new Blur::BlurResult();
+            $xfer += $elem56->read($input);
+            push(@{$self->{results}},$elem56);
           }
           $xfer += $input->readListEnd();
         }
@@ -1859,15 +1837,15 @@ sub read {
       last; };
       /^4$/ && do{      if ($ftype == TType::LIST) {
         {
-          my $_size64 = 0;
+          my $_size57 = 0;
           $self->{facetCounts} = [];
-          my $_etype67 = 0;
-          $xfer += $input->readListBegin(\$_etype67, \$_size64);
-          for (my $_i68 = 0; $_i68 < $_size64; ++$_i68)
+          my $_etype60 = 0;
+          $xfer += $input->readListBegin(\$_etype60, \$_size57);
+          for (my $_i61 = 0; $_i61 < $_size57; ++$_i61)
           {
-            my $elem69 = undef;
-            $xfer += $input->readI64(\$elem69);
-            push(@{$self->{facetCounts}},$elem69);
+            my $elem62 = undef;
+            $xfer += $input->readI64(\$elem62);
+            push(@{$self->{facetCounts}},$elem62);
           }
           $xfer += $input->readListEnd();
         }
@@ -1877,16 +1855,16 @@ sub read {
       last; };
       /^5$/ && do{      if ($ftype == TType::LIST) {
         {
-          my $_size70 = 0;
+          my $_size63 = 0;
           $self->{exceptions} = [];
-          my $_etype73 = 0;
-          $xfer += $input->readListBegin(\$_etype73, \$_size70);
-          for (my $_i74 = 0; $_i74 < $_size70; ++$_i74)
+          my $_etype66 = 0;
+          $xfer += $input->readListBegin(\$_etype66, \$_size63);
+          for (my $_i67 = 0; $_i67 < $_size63; ++$_i67)
           {
-            my $elem75 = undef;
-            $elem75 = new Blur::BlurException();
-            $xfer += $elem75->read($input);
-            push(@{$self->{exceptions}},$elem75);
+            my $elem68 = undef;
+            $elem68 = new Blur::BlurException();
+            $xfer += $elem68->read($input);
+            push(@{$self->{exceptions}},$elem68);
           }
           $xfer += $input->readListEnd();
         }
@@ -1923,10 +1901,10 @@ sub write {
     {
       $xfer += $output->writeMapBegin(TType::STRING, TType::I64, scalar(keys %{$self->{shardInfo}}));
       {
-        while( my ($kiter76,$viter77) = each %{$self->{shardInfo}}) 
+        while( my ($kiter69,$viter70) = each %{$self->{shardInfo}}) 
         {
-          $xfer += $output->writeString($kiter76);
-          $xfer += $output->writeI64($viter77);
+          $xfer += $output->writeString($kiter69);
+          $xfer += $output->writeI64($viter70);
         }
       }
       $xfer += $output->writeMapEnd();
@@ -1938,9 +1916,9 @@ sub write {
     {
       $xfer += $output->writeListBegin(TType::STRUCT, scalar(@{$self->{results}}));
       {
-        foreach my $iter78 (@{$self->{results}}) 
+        foreach my $iter71 (@{$self->{results}}) 
         {
-          $xfer += ${iter78}->write($output);
+          $xfer += ${iter71}->write($output);
         }
       }
       $xfer += $output->writeListEnd();
@@ -1952,9 +1930,9 @@ sub write {
     {
       $xfer += $output->writeListBegin(TType::I64, scalar(@{$self->{facetCounts}}));
       {
-        foreach my $iter79 (@{$self->{facetCounts}}) 
+        foreach my $iter72 (@{$self->{facetCounts}}) 
         {
-          $xfer += $output->writeI64($iter79);
+          $xfer += $output->writeI64($iter72);
         }
       }
       $xfer += $output->writeListEnd();
@@ -1966,9 +1944,9 @@ sub write {
     {
       $xfer += $output->writeListBegin(TType::STRUCT, scalar(@{$self->{exceptions}}));
       {
-        foreach my $iter80 (@{$self->{exceptions}}) 
+        foreach my $iter73 (@{$self->{exceptions}}) 
         {
-          $xfer += ${iter80}->write($output);
+          $xfer += ${iter73}->write($output);
         }
       }
       $xfer += $output->writeListEnd();
@@ -2147,16 +2125,16 @@ sub read {
       last; };
       /^5$/ && do{      if ($ftype == TType::LIST) {
         {
-          my $_size81 = 0;
+          my $_size74 = 0;
           $self->{recordMutations} = [];
-          my $_etype84 = 0;
-          $xfer += $input->readListBegin(\$_etype84, \$_size81);
-          for (my $_i85 = 0; $_i85 < $_size81; ++$_i85)
+          my $_etype77 = 0;
+          $xfer += $input->readListBegin(\$_etype77, \$_size74);
+          for (my $_i78 = 0; $_i78 < $_size74; ++$_i78)
           {
-            my $elem86 = undef;
-            $elem86 = new Blur::RecordMutation();
-            $xfer += $elem86->read($input);
-            push(@{$self->{recordMutations}},$elem86);
+            my $elem79 = undef;
+            $elem79 = new Blur::RecordMutation();
+            $xfer += $elem79->read($input);
+            push(@{$self->{recordMutations}},$elem79);
           }
           $xfer += $input->readListEnd();
         }
@@ -2207,9 +2185,9 @@ sub write {
     {
       $xfer += $output->writeListBegin(TType::STRUCT, scalar(@{$self->{recordMutations}}));
       {
-        foreach my $iter87 (@{$self->{recordMutations}}) 
+        foreach my $iter80 (@{$self->{recordMutations}}) 
         {
-          $xfer += ${iter87}->write($output);
+          $xfer += ${iter80}->write($output);
         }
       }
       $xfer += $output->writeListEnd();
@@ -2370,19 +2348,19 @@ sub read {
       last; };
       /^2$/ && do{      if ($ftype == TType::MAP) {
         {
-          my $_size88 = 0;
+          my $_size81 = 0;
           $self->{cpuTimes} = {};
-          my $_ktype89 = 0;
-          my $_vtype90 = 0;
-          $xfer += $input->readMapBegin(\$_ktype89, \$_vtype90, \$_size88);
-          for (my $_i92 = 0; $_i92 < $_size88; ++$_i92)
+          my $_ktype82 = 0;
+          my $_vtype83 = 0;
+          $xfer += $input->readMapBegin(\$_ktype82, \$_vtype83, \$_size81);
+          for (my $_i85 = 0; $_i85 < $_size81; ++$_i85)
           {
-            my $key93 = '';
-            my $val94 = new Blur::CpuTime();
-            $xfer += $input->readString(\$key93);
-            $val94 = new Blur::CpuTime();
-            $xfer += $val94->read($input);
-            $self->{cpuTimes}->{$key93} = $val94;
+            my $key86 = '';
+            my $val87 = new Blur::CpuTime();
+            $xfer += $input->readString(\$key86);
+            $val87 = new Blur::CpuTime();
+            $xfer += $val87->read($input);
+            $self->{cpuTimes}->{$key86} = $val87;
           }
           $xfer += $input->readMapEnd();
         }
@@ -2436,10 +2414,10 @@ sub write {
     {
       $xfer += $output->writeMapBegin(TType::STRING, TType::STRUCT, scalar(keys %{$self->{cpuTimes}}));
       {
-        while( my ($kiter95,$viter96) = each %{$self->{cpuTimes}}) 
+        while( my ($kiter88,$viter89) = each %{$self->{cpuTimes}}) 
         {
-          $xfer += $output->writeString($kiter95);
-          $xfer += ${viter96}->write($output);
+          $xfer += $output->writeString($kiter88);
+          $xfer += ${viter89}->write($output);
         }
       }
       $xfer += $output->writeMapEnd();
@@ -2643,30 +2621,30 @@ sub read {
       last; };
       /^2$/ && do{      if ($ftype == TType::MAP) {
         {
-          my $_size97 = 0;
+          my $_size90 = 0;
           $self->{columnFamilies} = {};
-          my $_ktype98 = 0;
-          my $_vtype99 = 0;
-          $xfer += $input->readMapBegin(\$_ktype98, \$_vtype99, \$_size97);
-          for (my $_i101 = 0; $_i101 < $_size97; ++$_i101)
+          my $_ktype91 = 0;
+          my $_vtype92 = 0;
+          $xfer += $input->readMapBegin(\$_ktype91, \$_vtype92, \$_size90);
+          for (my $_i94 = 0; $_i94 < $_size90; ++$_i94)
           {
-            my $key102 = '';
-            my $val103 = [];
-            $xfer += $input->readString(\$key102);
+            my $key95 = '';
+            my $val96 = [];
+            $xfer += $input->readString(\$key95);
             {
-              my $_size104 = 0;
-              $val103 = {};
-              my $_etype107 = 0;
-              $xfer += $input->readSetBegin(\$_etype107, \$_size104);
-              for (my $_i108 = 0; $_i108 < $_size104; ++$_i108)
+              my $_size97 = 0;
+              $val96 = {};
+              my $_etype100 = 0;
+              $xfer += $input->readSetBegin(\$_etype100, \$_size97);
+              for (my $_i101 = 0; $_i101 < $_size97; ++$_i101)
               {
-                my $elem109 = undef;
-                $xfer += $input->readString(\$elem109);
-                $val103->{$elem109} = 1;
+                my $elem102 = undef;
+                $xfer += $input->readString(\$elem102);
+                $val96->{$elem102} = 1;
               }
               $xfer += $input->readSetEnd();
             }
-            $self->{columnFamilies}->{$key102} = $val103;
+            $self->{columnFamilies}->{$key95} = $val96;
           }
           $xfer += $input->readMapEnd();
         }
@@ -2696,15 +2674,15 @@ sub write {
     {
       $xfer += $output->writeMapBegin(TType::STRING, TType::SET, scalar(keys %{$self->{columnFamilies}}));
       {
-        while( my ($kiter110,$viter111) = each %{$self->{columnFamilies}}) 
+        while( my ($kiter103,$viter104) = each %{$self->{columnFamilies}}) 
         {
-          $xfer += $output->writeString($kiter110);
+          $xfer += $output->writeString($kiter103);
           {
-            $xfer += $output->writeSetBegin(TType::STRING, scalar(@{${viter111}}));
+            $xfer += $output->writeSetBegin(TType::STRING, scalar(@{${viter104}}));
             {
-              foreach my $iter112 (@{${viter111}})
+              foreach my $iter105 (@{${viter104}})
               {
-                $xfer += $output->writeString($iter112);
+                $xfer += $output->writeString($iter105);
               }
             }
             $xfer += $output->writeSetEnd();
@@ -2842,19 +2820,19 @@ sub read {
       last; };
       /^3$/ && do{      if ($ftype == TType::MAP) {
         {
-          my $_size113 = 0;
+          my $_size106 = 0;
           $self->{alternateColumnDefinitions} = {};
-          my $_ktype114 = 0;
-          my $_vtype115 = 0;
-          $xfer += $input->readMapBegin(\$_ktype114, \$_vtype115, \$_size113);
-          for (my $_i117 = 0; $_i117 < $_size113; ++$_i117)
+          my $_ktype107 = 0;
+          my $_vtype108 = 0;
+          $xfer += $input->readMapBegin(\$_ktype107, \$_vtype108, \$_size106);
+          for (my $_i110 = 0; $_i110 < $_size106; ++$_i110)
           {
-            my $key118 = '';
-            my $val119 = new Blur::AlternateColumnDefinition();
-            $xfer += $input->readString(\$key118);
-            $val119 = new Blur::AlternateColumnDefinition();
-            $xfer += $val119->read($input);
-            $self->{alternateColumnDefinitions}->{$key118} = $val119;
+            my $key111 = '';
+            my $val112 = new Blur::AlternateColumnDefinition();
+            $xfer += $input->readString(\$key111);
+            $val112 = new Blur::AlternateColumnDefinition();
+            $xfer += $val112->read($input);
+            $self->{alternateColumnDefinitions}->{$key111} = $val112;
           }
           $xfer += $input->readMapEnd();
         }
@@ -2889,10 +2867,10 @@ sub write {
     {
       $xfer += $output->writeMapBegin(TType::STRING, TType::STRUCT, scalar(keys %{$self->{alternateColumnDefinitions}}));
       {
-        while( my ($kiter120,$viter121) = each %{$self->{alternateColumnDefinitions}})

+        while( my ($kiter113,$viter114) = each %{$self->{alternateColumnDefinitions}})

         {
-          $xfer += $output->writeString($kiter120);
-          $xfer += ${viter121}->write($output);
+          $xfer += $output->writeString($kiter113);
+          $xfer += ${viter114}->write($output);
         }
       }
       $xfer += $output->writeMapEnd();
@@ -2953,19 +2931,19 @@ sub read {
       last; };
       /^2$/ && do{      if ($ftype == TType::MAP) {
         {
-          my $_size122 = 0;
+          my $_size115 = 0;
           $self->{columnDefinitions} = {};
-          my $_ktype123 = 0;
-          my $_vtype124 = 0;
-          $xfer += $input->readMapBegin(\$_ktype123, \$_vtype124, \$_size122);
-          for (my $_i126 = 0; $_i126 < $_size122; ++$_i126)
+          my $_ktype116 = 0;
+          my $_vtype117 = 0;
+          $xfer += $input->readMapBegin(\$_ktype116, \$_vtype117, \$_size115);
+          for (my $_i119 = 0; $_i119 < $_size115; ++$_i119)
           {
-            my $key127 = '';
-            my $val128 = new Blur::ColumnDefinition();
-            $xfer += $input->readString(\$key127);
-            $val128 = new Blur::ColumnDefinition();
-            $xfer += $val128->read($input);
-            $self->{columnDefinitions}->{$key127} = $val128;
+            my $key120 = '';
+            my $val121 = new Blur::ColumnDefinition();
+            $xfer += $input->readString(\$key120);
+            $val121 = new Blur::ColumnDefinition();
+            $xfer += $val121->read($input);
+            $self->{columnDefinitions}->{$key120} = $val121;
           }
           $xfer += $input->readMapEnd();
         }
@@ -2995,10 +2973,10 @@ sub write {
     {
       $xfer += $output->writeMapBegin(TType::STRING, TType::STRUCT, scalar(keys %{$self->{columnDefinitions}}));
       {
-        while( my ($kiter129,$viter130) = each %{$self->{columnDefinitions}}) 
+        while( my ($kiter122,$viter123) = each %{$self->{columnDefinitions}}) 
         {
-          $xfer += $output->writeString($kiter129);
-          $xfer += ${viter130}->write($output);
+          $xfer += $output->writeString($kiter122);
+          $xfer += ${viter123}->write($output);
         }
       }
       $xfer += $output->writeMapEnd();
@@ -3069,19 +3047,19 @@ sub read {
       last; };
       /^3$/ && do{      if ($ftype == TType::MAP) {
         {
-          my $_size131 = 0;
+          my $_size124 = 0;
           $self->{columnFamilyDefinitions} = {};
-          my $_ktype132 = 0;
-          my $_vtype133 = 0;
-          $xfer += $input->readMapBegin(\$_ktype132, \$_vtype133, \$_size131);
-          for (my $_i135 = 0; $_i135 < $_size131; ++$_i135)
+          my $_ktype125 = 0;
+          my $_vtype126 = 0;
+          $xfer += $input->readMapBegin(\$_ktype125, \$_vtype126, \$_size124);
+          for (my $_i128 = 0; $_i128 < $_size124; ++$_i128)
           {
-            my $key136 = '';
-            my $val137 = new Blur::ColumnFamilyDefinition();
-            $xfer += $input->readString(\$key136);
-            $val137 = new Blur::ColumnFamilyDefinition();
-            $xfer += $val137->read($input);
-            $self->{columnFamilyDefinitions}->{$key136} = $val137;
+            my $key129 = '';
+            my $val130 = new Blur::ColumnFamilyDefinition();
+            $xfer += $input->readString(\$key129);
+            $val130 = new Blur::ColumnFamilyDefinition();
+            $xfer += $val130->read($input);
+            $self->{columnFamilyDefinitions}->{$key129} = $val130;
           }
           $xfer += $input->readMapEnd();
         }
@@ -3116,10 +3094,10 @@ sub write {
     {
       $xfer += $output->writeMapBegin(TType::STRING, TType::STRUCT, scalar(keys %{$self->{columnFamilyDefinitions}}));
       {
-        while( my ($kiter138,$viter139) = each %{$self->{columnFamilyDefinitions}}) 
+        while( my ($kiter131,$viter132) = each %{$self->{columnFamilyDefinitions}}) 
         {
-          $xfer += $output->writeString($kiter138);
-          $xfer += ${viter139}->write($output);
+          $xfer += $output->writeString($kiter131);
+          $xfer += ${viter132}->write($output);
         }
       }
       $xfer += $output->writeMapEnd();
@@ -3169,15 +3147,15 @@ sub read {
     {
       /^1$/ && do{      if ($ftype == TType::LIST) {
         {
-          my $_size140 = 0;
+          my $_size133 = 0;
           $self->{preCacheCols} = [];
-          my $_etype143 = 0;
-          $xfer += $input->readListBegin(\$_etype143, \$_size140);
-          for (my $_i144 = 0; $_i144 < $_size140; ++$_i144)
+          my $_etype136 = 0;
+          $xfer += $input->readListBegin(\$_etype136, \$_size133);
+          for (my $_i137 = 0; $_i137 < $_size133; ++$_i137)
           {
-            my $elem145 = undef;
-            $xfer += $input->readString(\$elem145);
-            push(@{$self->{preCacheCols}},$elem145);
+            my $elem138 = undef;
+            $xfer += $input->readString(\$elem138);
+            push(@{$self->{preCacheCols}},$elem138);
           }
           $xfer += $input->readListEnd();
         }
@@ -3202,9 +3180,9 @@ sub write {
     {
       $xfer += $output->writeListBegin(TType::STRING, scalar(@{$self->{preCacheCols}}));
       {
-        foreach my $iter146 (@{$self->{preCacheCols}}) 
+        foreach my $iter139 (@{$self->{preCacheCols}}) 
         {
-          $xfer += $output->writeString($iter146);
+          $xfer += $output->writeString($iter139);
         }
       }
       $xfer += $output->writeListEnd();
@@ -3367,15 +3345,15 @@ sub read {
       last; };
       /^11$/ && do{      if ($ftype == TType::SET) {
         {
-          my $_size147 = 0;
+          my $_size140 = 0;
           $self->{blockCachingFileTypes} = {};
-          my $_etype150 = 0;
-          $xfer += $input->readSetBegin(\$_etype150, \$_size147);
-          for (my $_i151 = 0; $_i151 < $_size147; ++$_i151)
+          my $_etype143 = 0;
+          $xfer += $input->readSetBegin(\$_etype143, \$_size140);
+          for (my $_i144 = 0; $_i144 < $_size140; ++$_i144)
           {
-            my $elem152 = undef;
-            $xfer += $input->readString(\$elem152);
-            $self->{blockCachingFileTypes}->{$elem152} = 1;
+            my $elem145 = undef;
+            $xfer += $input->readString(\$elem145);
+            $self->{blockCachingFileTypes}->{$elem145} = 1;
           }
           $xfer += $input->readSetEnd();
         }
@@ -3398,18 +3376,18 @@ sub read {
       last; };
       /^14$/ && do{      if ($ftype == TType::MAP) {
         {
-          my $_size153 = 0;
+          my $_size146 = 0;
           $self->{tableProperties} = {};
-          my $_ktype154 = 0;
-          my $_vtype155 = 0;
-          $xfer += $input->readMapBegin(\$_ktype154, \$_vtype155, \$_size153);
-          for (my $_i157 = 0; $_i157 < $_size153; ++$_i157)
+          my $_ktype147 = 0;
+          my $_vtype148 = 0;
+          $xfer += $input->readMapBegin(\$_ktype147, \$_vtype148, \$_size146);
+          for (my $_i150 = 0; $_i150 < $_size146; ++$_i150)
           {
-            my $key158 = '';
-            my $val159 = '';
-            $xfer += $input->readString(\$key158);
-            $xfer += $input->readString(\$val159);
-            $self->{tableProperties}->{$key158} = $val159;
+            my $key151 = '';
+            my $val152 = '';
+            $xfer += $input->readString(\$key151);
+            $xfer += $input->readString(\$val152);
+            $self->{tableProperties}->{$key151} = $val152;
           }
           $xfer += $input->readMapEnd();
         }
@@ -3484,9 +3462,9 @@ sub write {
     {
       $xfer += $output->writeSetBegin(TType::STRING, scalar(@{$self->{blockCachingFileTypes}}));
       {
-        foreach my $iter160 (@{$self->{blockCachingFileTypes}})
+        foreach my $iter153 (@{$self->{blockCachingFileTypes}})
         {
-          $xfer += $output->writeString($iter160);
+          $xfer += $output->writeString($iter153);
         }
       }
       $xfer += $output->writeSetEnd();
@@ -3508,10 +3486,10 @@ sub write {
     {
       $xfer += $output->writeMapBegin(TType::STRING, TType::STRING, scalar(keys %{$self->{tableProperties}}));
       {
-        while( my ($kiter161,$viter162) = each %{$self->{tableProperties}}) 
+        while( my ($kiter154,$viter155) = each %{$self->{tableProperties}}) 
         {
-          $xfer += $output->writeString($kiter161);
-          $xfer += $output->writeString($viter162);
+          $xfer += $output->writeString($kiter154);
+          $xfer += $output->writeString($viter155);
         }
       }
       $xfer += $output->writeMapEnd();

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/3dd4c2e7/distribution/src/main/scripts/interface/gen-rb/blur_types.rb
----------------------------------------------------------------------
diff --git a/distribution/src/main/scripts/interface/gen-rb/blur_types.rb b/distribution/src/main/scripts/interface/gen-rb/blur_types.rb
index 9ddefbe..cc2f45c 100644
--- a/distribution/src/main/scripts/interface/gen-rb/blur_types.rb
+++ b/distribution/src/main/scripts/interface/gen-rb/blur_types.rb
@@ -101,7 +101,6 @@ module Blur
     RECORDID = 1
     FAMILY = 2
     COLUMNS = 3
-    HIGHLIGHTEDCOLUMNS = 4
 
     FIELDS = {
       # Record id uniquely identifies a record within a single row.
@@ -109,9 +108,7 @@ module Blur
       # The family in which this record resides.
       FAMILY => {:type => ::Thrift::Types::STRING, :name => 'family'},
       # A list of columns, multiple columns with the same name are allowed.
-      COLUMNS => {:type => ::Thrift::Types::LIST, :name => 'columns', :element =>
{:type => ::Thrift::Types::STRUCT, :class => ::Blur::Column}},
-      # A list of the highlighted columns.
-      HIGHLIGHTEDCOLUMNS => {:type => ::Thrift::Types::LIST, :name => 'highlightedColumns',
:element => {:type => ::Thrift::Types::STRUCT, :class => ::Blur::Column}}
+      COLUMNS => {:type => ::Thrift::Types::LIST, :name => 'columns', :element =>
{:type => ::Thrift::Types::STRUCT, :class => ::Blur::Column}}
     }
 
     def struct_fields; FIELDS; end
@@ -185,7 +182,8 @@ module Blur
   class HighlightOptions
     include ::Thrift::Struct, ::Thrift::Struct_Union
     SIMPLEQUERY = 1
-    ONLYMATCHINGRECORDS = 2
+    PRETAG = 2
+    POSTTAG = 3
 
     FIELDS = {
       # The original query is required if used in the Blur.fetchRow call.  If
@@ -194,9 +192,10 @@ module Blur
 # null.  So that means if you use highlighting from the query call you can
 # leave this attribute null and it will default to the normal behavior.
       SIMPLEQUERY => {:type => ::Thrift::Types::STRUCT, :name => 'simpleQuery',
:class => ::Blur::SimpleQuery},
-      # Only returns the records within a Row that matched in the query.  If the BlurQuery
-# is not a superQuery then this option is not used.  Enabled by default.
-      ONLYMATCHINGRECORDS => {:type => ::Thrift::Types::BOOL, :name => 'onlyMatchingRecords',
:default => true}
+      # The pre tag is the tag that marks the beginning of the highlighting.
+      PRETAG => {:type => ::Thrift::Types::STRING, :name => 'preTag', :default =>
%q"<<<"},
+      # The post tag is the tag that marks the end of the highlighting.
+      POSTTAG => {:type => ::Thrift::Types::STRING, :name => 'postTag', :default
=> %q">>>"}
     }
 
     def struct_fields; FIELDS; end

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/3dd4c2e7/distribution/src/main/scripts/interface/genAndReplace.sh
----------------------------------------------------------------------
diff --git a/distribution/src/main/scripts/interface/genAndReplace.sh b/distribution/src/main/scripts/interface/genAndReplace.sh
index 6da9459..437b178 100755
--- a/distribution/src/main/scripts/interface/genAndReplace.sh
+++ b/distribution/src/main/scripts/interface/genAndReplace.sh
@@ -17,7 +17,7 @@
 
 
 
-rm ../../../../../../src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/*
+rm ../../../../../blur-thrift/src/main/java/org/apache/blur/thrift/generated/*
 rm -r gen-java/ gen-perl/ gen-rb/ gen-html/
 thrift --gen html --gen perl --gen java --gen rb --gen js Blur.thrift
 for f in gen-java/org/apache/blur/thrift/generated/*.java; do
@@ -28,4 +28,4 @@ for f in gen-java/org/apache/blur/thrift/generated/*.java; do
   rm $f.new1 $f.new2 $f.new3 $f
   mv $f.new4 $f
 done
-cp -r gen-java/* ../../../../../../src/blur-thrift/src/main/java/
+cp -r gen-java/* ../../../../../blur-thrift/src/main/java/


Mime
View raw message