You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucy.apache.org by ma...@apache.org on 2010/10/29 03:02:59 UTC
[lucy-commits] svn commit: r1028569 - in /incubator/lucy/trunk: core/KinoSearch/Index/
core/KinoSearch/Search/ perl/lib/KSx/Index/ perl/lib/KinoSearch/Index/
perl/t/ perl/xs/KinoSearch/Index/
Author: marvin
Date: Fri Oct 29 01:02:58 2010
New Revision: 1028569
URL: http://svn.apache.org/viewvc?rev=1028569&view=rev
Log:
Rename DocReader's Fetch() method to Fetch_Doc().
Modified:
incubator/lucy/trunk/core/KinoSearch/Index/DocReader.c
incubator/lucy/trunk/core/KinoSearch/Index/DocReader.cfh
incubator/lucy/trunk/core/KinoSearch/Search/IndexSearcher.c
incubator/lucy/trunk/perl/lib/KSx/Index/ByteBufDocReader.pm
incubator/lucy/trunk/perl/lib/KSx/Index/ZlibDocReader.pm
incubator/lucy/trunk/perl/lib/KinoSearch/Index/DocReader.pm
incubator/lucy/trunk/perl/lib/KinoSearch/Index/IndexReader.pm
incubator/lucy/trunk/perl/lib/KinoSearch/Index/PolyReader.pm
incubator/lucy/trunk/perl/lib/KinoSearch/Index/SegReader.pm
incubator/lucy/trunk/perl/t/204-doc_reader.t
incubator/lucy/trunk/perl/t/221-sort_writer.t
incubator/lucy/trunk/perl/xs/KinoSearch/Index/DocReader.c
Modified: incubator/lucy/trunk/core/KinoSearch/Index/DocReader.c
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/core/KinoSearch/Index/DocReader.c?rev=1028569&r1=1028568&r2=1028569&view=diff
==============================================================================
--- incubator/lucy/trunk/core/KinoSearch/Index/DocReader.c (original)
+++ incubator/lucy/trunk/core/KinoSearch/Index/DocReader.c Fri Oct 29 01:02:58 2010
@@ -86,7 +86,7 @@ PolyDocReader_destroy(PolyDocReader *sel
}
HitDoc*
-PolyDocReader_fetch(PolyDocReader *self, int32_t doc_id)
+PolyDocReader_fetch_doc(PolyDocReader *self, int32_t doc_id)
{
uint32_t seg_tick = PolyReader_sub_tick(self->offsets, doc_id);
int32_t offset = I32Arr_Get(self->offsets, seg_tick);
@@ -96,7 +96,7 @@ PolyDocReader_fetch(PolyDocReader *self,
THROW(ERR, "Invalid doc_id: %i32", doc_id);
}
else {
- hit_doc = DocReader_Fetch(doc_reader, doc_id - offset);
+ hit_doc = DocReader_Fetch_Doc(doc_reader, doc_id - offset);
HitDoc_Set_Doc_ID(hit_doc, doc_id);
}
return hit_doc;
Modified: incubator/lucy/trunk/core/KinoSearch/Index/DocReader.cfh
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/core/KinoSearch/Index/DocReader.cfh?rev=1028569&r1=1028568&r2=1028569&view=diff
==============================================================================
--- incubator/lucy/trunk/core/KinoSearch/Index/DocReader.cfh (original)
+++ incubator/lucy/trunk/core/KinoSearch/Index/DocReader.cfh Fri Oct 29 01:02:58 2010
@@ -29,10 +29,12 @@ class KinoSearch::Index::DocReader inher
Snapshot *snapshot = NULL, VArray *segments = NULL,
int32_t seg_tick = -1);
- /** Returns the document identified by <code>doc_id</code>.
+ /** Retrieve the document identified by <code>doc_id</code>.
+ *
+ * @return a HitDoc.
*/
public abstract incremented HitDoc*
- Fetch(DocReader *self, int32_t doc_id);
+ Fetch_Doc(DocReader *self, int32_t doc_id);
/** Returns a DocReader which divvies up requests to its sub-readers
* according to the offset range.
@@ -58,7 +60,7 @@ class KinoSearch::Index::PolyDocReader i
init(PolyDocReader *self, VArray *readers, I32Array *offsets);
public incremented HitDoc*
- Fetch(PolyDocReader *self, int32_t doc_id);
+ Fetch_Doc(PolyDocReader *self, int32_t doc_id);
public void
Close(PolyDocReader *self);
@@ -82,7 +84,7 @@ class KinoSearch::Index::DefaultDocReade
Snapshot *snapshot, VArray *segments, int32_t seg_tick);
public incremented HitDoc*
- Fetch(DefaultDocReader *self, int32_t doc_id);
+ Fetch_Doc(DefaultDocReader *self, int32_t doc_id);
/** Read the raw byte content for the specified doc into the supplied
* buffer.
Modified: incubator/lucy/trunk/core/KinoSearch/Search/IndexSearcher.c
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/core/KinoSearch/Search/IndexSearcher.c?rev=1028569&r1=1028568&r2=1028569&view=diff
==============================================================================
--- incubator/lucy/trunk/core/KinoSearch/Search/IndexSearcher.c (original)
+++ incubator/lucy/trunk/core/KinoSearch/Search/IndexSearcher.c Fri Oct 29 01:02:58 2010
@@ -87,7 +87,7 @@ HitDoc*
IxSearcher_fetch_doc(IndexSearcher *self, int32_t doc_id)
{
if (!self->doc_reader) { THROW(ERR, "No DocReader"); }
- return DocReader_Fetch(self->doc_reader, doc_id);
+ return DocReader_Fetch_Doc(self->doc_reader, doc_id);
}
DocVector*
Modified: incubator/lucy/trunk/perl/lib/KSx/Index/ByteBufDocReader.pm
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/perl/lib/KSx/Index/ByteBufDocReader.pm?rev=1028569&r1=1028568&r2=1028569&view=diff
==============================================================================
--- incubator/lucy/trunk/perl/lib/KSx/Index/ByteBufDocReader.pm (original)
+++ incubator/lucy/trunk/perl/lib/KSx/Index/ByteBufDocReader.pm Fri Oct 29 01:02:58 2010
@@ -51,7 +51,7 @@ sub new {
return $self;
}
-sub fetch {
+sub fetch_doc {
my ( $self, $doc_id ) = @_;
my $field = $field{$$self};
my %fields = ( $field => '' );
Modified: incubator/lucy/trunk/perl/lib/KSx/Index/ZlibDocReader.pm
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/perl/lib/KSx/Index/ZlibDocReader.pm?rev=1028569&r1=1028568&r2=1028569&view=diff
==============================================================================
--- incubator/lucy/trunk/perl/lib/KSx/Index/ZlibDocReader.pm (original)
+++ incubator/lucy/trunk/perl/lib/KSx/Index/ZlibDocReader.pm Fri Oct 29 01:02:58 2010
@@ -60,7 +60,7 @@ sub new {
return $self;
}
-sub fetch {
+sub fetch_doc {
my ( $self, $doc_id ) = @_;
my $dat_in = $dat_in{$$self};
my $ix_in = $ix_in{$$self};
Modified: incubator/lucy/trunk/perl/lib/KinoSearch/Index/DocReader.pm
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/perl/lib/KinoSearch/Index/DocReader.pm?rev=1028569&r1=1028568&r2=1028569&view=diff
==============================================================================
--- incubator/lucy/trunk/perl/lib/KinoSearch/Index/DocReader.pm (original)
+++ incubator/lucy/trunk/perl/lib/KinoSearch/Index/DocReader.pm Fri Oct 29 01:02:58 2010
@@ -24,17 +24,17 @@ __BINDING__
my $synopsis = <<'END_SYNOPSIS';
my $doc_reader = $seg_reader->obtain("KinoSearch::Index::DocReader");
- my $doc = $doc_reader->fetch( doc_id => $doc_id );
+ my $doc = $doc_reader->fetch_doc($doc_id);
END_SYNOPSIS
Clownfish::Binding::Perl::Class->register(
parcel => "KinoSearch",
class_name => "KinoSearch::Index::DocReader",
bind_constructors => ["new"],
- bind_methods => [qw( Fetch )],
+ bind_methods => [qw( Fetch_Doc )],
make_pod => {
synopsis => $synopsis,
- methods => [qw( fetch aggregator )],
+ methods => [qw( fetch_doc aggregator )],
},
);
Clownfish::Binding::Perl::Class->register(
Modified: incubator/lucy/trunk/perl/lib/KinoSearch/Index/IndexReader.pm
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/perl/lib/KinoSearch/Index/IndexReader.pm?rev=1028569&r1=1028568&r2=1028569&view=diff
==============================================================================
--- incubator/lucy/trunk/perl/lib/KinoSearch/Index/IndexReader.pm (original)
+++ incubator/lucy/trunk/perl/lib/KinoSearch/Index/IndexReader.pm Fri Oct 29 01:02:58 2010
@@ -53,7 +53,7 @@ my $synopsis = <<'END_SYNOPSIS';
print "Segment $seg_name ($num_docs documents):\n";
my $doc_reader = $seg_reader->obtain("KinoSearch::Index::DocReader");
for my $doc_id ( 1 .. $num_docs ) {
- my $doc = $doc_reader->fetch($doc_id);
+ my $doc = $doc_reader->fetch_doc($doc_id);
print " $doc_id: $doc->{title}\n";
}
}
Modified: incubator/lucy/trunk/perl/lib/KinoSearch/Index/PolyReader.pm
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/perl/lib/KinoSearch/Index/PolyReader.pm?rev=1028569&r1=1028568&r2=1028569&view=diff
==============================================================================
--- incubator/lucy/trunk/perl/lib/KinoSearch/Index/PolyReader.pm (original)
+++ incubator/lucy/trunk/perl/lib/KinoSearch/Index/PolyReader.pm Fri Oct 29 01:02:58 2010
@@ -28,7 +28,7 @@ my $synopsis = <<'END_SYNOPSIS';
);
my $doc_reader = $polyreader->obtain("KinoSearch::Index::DocReader");
for my $doc_id ( 1 .. $polyreader->doc_max ) {
- my $doc = $doc_reader->fetch($doc_id);
+ my $doc = $doc_reader->fetch_doc($doc_id);
print " $doc_id: $doc->{title}\n";
}
END_SYNOPSIS
Modified: incubator/lucy/trunk/perl/lib/KinoSearch/Index/SegReader.pm
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/perl/lib/KinoSearch/Index/SegReader.pm?rev=1028569&r1=1028568&r2=1028569&view=diff
==============================================================================
--- incubator/lucy/trunk/perl/lib/KinoSearch/Index/SegReader.pm (original)
+++ incubator/lucy/trunk/perl/lib/KinoSearch/Index/SegReader.pm Fri Oct 29 01:02:58 2010
@@ -33,7 +33,7 @@ my $synopsis = <<'END_SYNOPSIS';
print "Segment $seg_name ($num_docs documents):\n";
my $doc_reader = $seg_reader->obtain("KinoSearch::Index::DocReader");
for my $doc_id ( 1 .. $num_docs ) {
- my $doc = $doc_reader->fetch( doc_id => $doc_id );
+ my $doc = $doc_reader->fetch_doc($doc_id);
print " $doc_id: $doc->{title}\n";
}
}
Modified: incubator/lucy/trunk/perl/t/204-doc_reader.t
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/perl/t/204-doc_reader.t?rev=1028569&r1=1028568&r2=1028569&view=diff
==============================================================================
--- incubator/lucy/trunk/perl/t/204-doc_reader.t (original)
+++ incubator/lucy/trunk/perl/t/204-doc_reader.t Fri Oct 29 01:02:58 2010
@@ -80,7 +80,7 @@ my $doc_reader = KinoSearch::Index::Defa
seg_tick => 0,
);
-my $doc = $doc_reader->fetch(0);
+my $doc = $doc_reader->fetch_doc(0);
is( $doc->{text}, $val, "text" );
is( $doc->{bin}, $bin_val, "bin" );
Modified: incubator/lucy/trunk/perl/t/221-sort_writer.t
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/perl/t/221-sort_writer.t?rev=1028569&r1=1028568&r2=1028569&view=diff
==============================================================================
--- incubator/lucy/trunk/perl/t/221-sort_writer.t (original)
+++ incubator/lucy/trunk/perl/t/221-sort_writer.t Fri Oct 29 01:02:58 2010
@@ -120,7 +120,7 @@ for my $field (qw( name speed weight hom
my $sort_cache = $sort_reader->fetch_sort_cache($field);
for ( 1 .. $seg_reader->doc_max ) {
is( $sort_cache->value( ord => $sort_cache->ordinal($_) ),
- $doc_reader->fetch($_)->{$field},
+ $doc_reader->fetch_doc($_)->{$field},
"correct cached value doc $_ "
);
}
@@ -167,7 +167,7 @@ for my $field (qw( name speed weight hom
my $sort_cache = $sort_reader->fetch_sort_cache($field);
for ( 1 .. $seg_reader->doc_max ) {
is( $sort_cache->value( ord => $sort_cache->ordinal($_) ),
- $doc_reader->fetch($_)->{$field},
+ $doc_reader->fetch_doc($_)->{$field},
"correct cached value field $field doc $_ "
);
}
Modified: incubator/lucy/trunk/perl/xs/KinoSearch/Index/DocReader.c
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/perl/xs/KinoSearch/Index/DocReader.c?rev=1028569&r1=1028568&r2=1028569&view=diff
==============================================================================
--- incubator/lucy/trunk/perl/xs/KinoSearch/Index/DocReader.c (original)
+++ incubator/lucy/trunk/perl/xs/KinoSearch/Index/DocReader.c Fri Oct 29 01:02:58 2010
@@ -30,7 +30,7 @@
#include "KinoSearch/Store/InStream.h"
kino_HitDoc*
-kino_DefDocReader_fetch(kino_DefaultDocReader *self, int32_t doc_id)
+kino_DefDocReader_fetch_doc(kino_DefaultDocReader *self, int32_t doc_id)
{
kino_Schema *const schema = self->schema;
kino_InStream *const dat_in = self->dat_in;