You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucy.apache.org by lo...@apache.org on 2012/01/18 06:53:13 UTC
[lucy-commits] svn commit: r1232753 [1/3] - in
/incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding: Analysis.pm Docs.pm
Document.pm Highlight.pm Index.pm Index/Posting.pm Lucy.pm Object.pm
Plan.pm Search.pm Search/Collector.pm Store.pm Test/Util.pm Util.pm
Author: logie
Date: Wed Jan 18 05:53:13 2012
New Revision: 1232753
URL: http://svn.apache.org/viewvc?rev=1232753&view=rev
Log:
LUCY-208
Tidied code with perl tidy.
Modified:
incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Analysis.pm
incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Docs.pm
incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Document.pm
incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Highlight.pm
incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Index.pm
incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Index/Posting.pm
incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Lucy.pm
incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Object.pm
incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Plan.pm
incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Search.pm
incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Search/Collector.pm
incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Store.pm
incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Test/Util.pm
incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Util.pm
Modified: incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Analysis.pm
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Analysis.pm?rev=1232753&r1=1232752&r2=1232753&view=diff
==============================================================================
--- incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Analysis.pm (original)
+++ incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Analysis.pm Wed Jan 18 05:53:13 2012
@@ -14,35 +14,34 @@
# limitations under the License.
package Lucy::Build::Binding::Analysis;
-
sub bind_all {
- my $class = shift;
- $class->bind_analyzer;
- $class->bind_casefolder;
- $class->bind_easyanalyzer;
- $class->bind_inversion;
- $class->bind_normalizer;
- $class->bind_polyanalyzer;
- $class->bind_regextokenizer;
- $class->bind_snowballstemmer;
- $class->bind_snowballstopfilter;
- $class->bind_standardtokenizer;
- $class->bind_token;
+ my $class = shift;
+ $class->bind_analyzer;
+ $class->bind_casefolder;
+ $class->bind_easyanalyzer;
+ $class->bind_inversion;
+ $class->bind_normalizer;
+ $class->bind_polyanalyzer;
+ $class->bind_regextokenizer;
+ $class->bind_snowballstemmer;
+ $class->bind_snowballstopfilter;
+ $class->bind_standardtokenizer;
+ $class->bind_token;
}
sub bind_analyzer {
- Clownfish::CFC::Binding::Perl::Class->register(
- parcel => "Lucy",
- class_name => "Lucy::Analysis::Analyzer",
- bind_methods => [qw( Transform Transform_Text Split )],
- bind_constructors => ["new"],
- make_pod => { synopsis => " # Abstract base class.\n", }
-);
+ Clownfish::CFC::Binding::Perl::Class->register(
+ parcel => "Lucy",
+ class_name => "Lucy::Analysis::Analyzer",
+ bind_methods => [qw( Transform Transform_Text Split )],
+ bind_constructors => ["new"],
+ make_pod => { synopsis => " # Abstract base class.\n", }
+ );
}
sub bind_casefolder {
- my $synopsis = <<'END_SYNOPSIS';
+ my $synopsis = <<'END_SYNOPSIS';
my $case_folder = Lucy::Analysis::CaseFolder->new;
my $polyanalyzer = Lucy::Analysis::PolyAnalyzer->new(
@@ -50,24 +49,24 @@ sub bind_casefolder {
);
END_SYNOPSIS
-my $constructor = <<'END_CONSTRUCTOR';
+ my $constructor = <<'END_CONSTRUCTOR';
my $case_folder = Lucy::Analysis::CaseFolder->new;
END_CONSTRUCTOR
-Clownfish::CFC::Binding::Perl::Class->register(
- parcel => "Lucy",
- class_name => "Lucy::Analysis::CaseFolder",
- bind_constructors => ["new"],
- make_pod => {
- synopsis => $synopsis,
- constructor => { sample => $constructor },
- },
-);
+ Clownfish::CFC::Binding::Perl::Class->register(
+ parcel => "Lucy",
+ class_name => "Lucy::Analysis::CaseFolder",
+ bind_constructors => ["new"],
+ make_pod => {
+ synopsis => $synopsis,
+ constructor => { sample => $constructor },
+ },
+ );
}
sub bind_easyanalyzer {
- my $synopsis = <<'END_SYNOPSIS';
+ my $synopsis = <<'END_SYNOPSIS';
my $schema = Lucy::Plan::Schema->new;
my $analyzer = Lucy::Analysis::EasyAnalyzer->new(
language => 'en',
@@ -79,26 +78,26 @@ sub bind_easyanalyzer {
$schema->spec_field( name => 'content', type => $type );
END_SYNOPSIS
-my $constructor = <<'END_CONSTRUCTOR';
+ my $constructor = <<'END_CONSTRUCTOR';
my $analyzer = Lucy::Analysis::EasyAnalyzer->new(
language => 'es',
);
END_CONSTRUCTOR
-Clownfish::CFC::Binding::Perl::Class->register(
- parcel => "Lucy",
- class_name => "Lucy::Analysis::EasyAnalyzer",
- bind_constructors => ["new"],
- make_pod => {
- synopsis => $synopsis,
- constructor => { sample => $constructor },
- },
-);
+ Clownfish::CFC::Binding::Perl::Class->register(
+ parcel => "Lucy",
+ class_name => "Lucy::Analysis::EasyAnalyzer",
+ bind_constructors => ["new"],
+ make_pod => {
+ synopsis => $synopsis,
+ constructor => { sample => $constructor },
+ },
+ );
}
sub bind_inversion {
- my $xs = <<'END_XS';
+ my $xs = <<'END_XS';
MODULE = Lucy PACKAGE = Lucy::Analysis::Inversion
SV*
@@ -130,17 +129,17 @@ CODE:
OUTPUT: RETVAL
END_XS
-Clownfish::CFC::Binding::Perl::Class->register(
- parcel => "Lucy",
- class_name => "Lucy::Analysis::Inversion",
- bind_methods => [qw( Append Reset Invert Next )],
- xs_code => $xs,
-);
+ Clownfish::CFC::Binding::Perl::Class->register(
+ parcel => "Lucy",
+ class_name => "Lucy::Analysis::Inversion",
+ bind_methods => [qw( Append Reset Invert Next )],
+ xs_code => $xs,
+ );
}
sub bind_normalizer {
- my $synopsis = <<'END_SYNOPSIS';
+ my $synopsis = <<'END_SYNOPSIS';
my $normalizer = Lucy::Analysis::Normalizer->new;
my $polyanalyzer = Lucy::Analysis::PolyAnalyzer->new(
@@ -148,7 +147,7 @@ sub bind_normalizer {
);
END_SYNOPSIS
-my $constructor = <<'END_CONSTRUCTOR';
+ my $constructor = <<'END_CONSTRUCTOR';
my $normalizer = Lucy::Analysis::Normalizer->new(
normalization_form => 'NFKC',
case_fold => 1,
@@ -156,20 +155,20 @@ my $constructor = <<'END_CONSTRUCTOR';
);
END_CONSTRUCTOR
-Clownfish::CFC::Binding::Perl::Class->register(
- parcel => "Lucy",
- class_name => "Lucy::Analysis::Normalizer",
- bind_constructors => ["new"],
- make_pod => {
- synopsis => $synopsis,
- constructor => { sample => $constructor }
- },
-);
+ Clownfish::CFC::Binding::Perl::Class->register(
+ parcel => "Lucy",
+ class_name => "Lucy::Analysis::Normalizer",
+ bind_constructors => ["new"],
+ make_pod => {
+ synopsis => $synopsis,
+ constructor => { sample => $constructor }
+ },
+ );
}
sub bind_polyanalyzer {
- my $synopsis = <<'END_SYNOPSIS';
+ my $synopsis = <<'END_SYNOPSIS';
my $schema = Lucy::Plan::Schema->new;
my $polyanalyzer = Lucy::Analysis::PolyAnalyzer->new(
language => 'en',
@@ -181,7 +180,7 @@ sub bind_polyanalyzer {
$schema->spec_field( name => 'content', type => $type );
END_SYNOPSIS
-my $constructor = <<'END_CONSTRUCTOR';
+ my $constructor = <<'END_CONSTRUCTOR';
my $analyzer = Lucy::Analysis::PolyAnalyzer->new(
language => 'es',
);
@@ -195,22 +194,22 @@ my $constructor = <<'END_CONSTRUCTOR';
analyzers => [ $case_folder, $whitespace_tokenizer, $stemmer, ], );
END_CONSTRUCTOR
-Clownfish::CFC::Binding::Perl::Class->register(
- parcel => "Lucy",
- class_name => "Lucy::Analysis::PolyAnalyzer",
- bind_constructors => ["new"],
- bind_methods => [qw( Get_Analyzers )],
- make_pod => {
- methods => [qw( get_analyzers )],
- synopsis => $synopsis,
- constructor => { sample => $constructor },
- },
-);
+ Clownfish::CFC::Binding::Perl::Class->register(
+ parcel => "Lucy",
+ class_name => "Lucy::Analysis::PolyAnalyzer",
+ bind_constructors => ["new"],
+ bind_methods => [qw( Get_Analyzers )],
+ make_pod => {
+ methods => [qw( get_analyzers )],
+ synopsis => $synopsis,
+ constructor => { sample => $constructor },
+ },
+ );
}
sub bind_regextokenizer {
- my $synopsis = <<'END_SYNOPSIS';
+ my $synopsis = <<'END_SYNOPSIS';
my $whitespace_tokenizer
= Lucy::Analysis::RegexTokenizer->new( pattern => '\S+' );
@@ -226,26 +225,26 @@ sub bind_regextokenizer {
analyzers => [ $case_folder, $word_char_tokenizer, $stemmer ], );
END_SYNOPSIS
-my $constructor = <<'END_CONSTRUCTOR';
+ my $constructor = <<'END_CONSTRUCTOR';
my $word_char_tokenizer = Lucy::Analysis::RegexTokenizer->new(
pattern => '\w+', # required
);
END_CONSTRUCTOR
-Clownfish::CFC::Binding::Perl::Class->register(
- parcel => "Lucy",
- class_name => "Lucy::Analysis::RegexTokenizer",
- bind_constructors => ["_new"],
- make_pod => {
- constructor => { sample => $constructor },
- synopsis => $synopsis,
- },
-);
+ Clownfish::CFC::Binding::Perl::Class->register(
+ parcel => "Lucy",
+ class_name => "Lucy::Analysis::RegexTokenizer",
+ bind_constructors => ["_new"],
+ make_pod => {
+ constructor => { sample => $constructor },
+ synopsis => $synopsis,
+ },
+ );
}
sub bind_snowballstemmer {
- my $synopsis = <<'END_SYNOPSIS';
+ my $synopsis = <<'END_SYNOPSIS';
my $stemmer = Lucy::Analysis::SnowballStemmer->new( language => 'es' );
my $polyanalyzer = Lucy::Analysis::PolyAnalyzer->new(
@@ -256,24 +255,24 @@ This class is a wrapper around the Snowb
the same languages.
END_SYNOPSIS
-my $constructor = <<'END_CONSTRUCTOR';
+ my $constructor = <<'END_CONSTRUCTOR';
my $stemmer = Lucy::Analysis::SnowballStemmer->new( language => 'es' );
END_CONSTRUCTOR
-Clownfish::CFC::Binding::Perl::Class->register(
- parcel => "Lucy",
- class_name => "Lucy::Analysis::SnowballStemmer",
- bind_constructors => ["new"],
- make_pod => {
- synopsis => $synopsis,
- constructor => { sample => $constructor }
- },
-);
+ Clownfish::CFC::Binding::Perl::Class->register(
+ parcel => "Lucy",
+ class_name => "Lucy::Analysis::SnowballStemmer",
+ bind_constructors => ["new"],
+ make_pod => {
+ synopsis => $synopsis,
+ constructor => { sample => $constructor }
+ },
+ );
}
sub bind_snowballstopfilter {
- my $synopsis = <<'END_SYNOPSIS';
+ my $synopsis = <<'END_SYNOPSIS';
my $stopfilter = Lucy::Analysis::SnowballStopFilter->new(
language => 'fr',
);
@@ -282,7 +281,7 @@ sub bind_snowballstopfilter {
);
END_SYNOPSIS
-my $constructor = <<'END_CONSTRUCTOR';
+ my $constructor = <<'END_CONSTRUCTOR';
my $stopfilter = Lucy::Analysis::SnowballStopFilter->new(
language => 'de',
);
@@ -293,20 +292,20 @@ my $constructor = <<'END_CONSTRUCTOR';
);
END_CONSTRUCTOR
-Clownfish::CFC::Binding::Perl::Class->register(
- parcel => "Lucy",
- class_name => "Lucy::Analysis::SnowballStopFilter",
- bind_constructors => ["new"],
- make_pod => {
- synopsis => $synopsis,
- constructor => { sample => $constructor }
- },
-);
+ Clownfish::CFC::Binding::Perl::Class->register(
+ parcel => "Lucy",
+ class_name => "Lucy::Analysis::SnowballStopFilter",
+ bind_constructors => ["new"],
+ make_pod => {
+ synopsis => $synopsis,
+ constructor => { sample => $constructor }
+ },
+ );
}
sub bind_standardtokenizer {
- my $synopsis = <<'END_SYNOPSIS';
+ my $synopsis = <<'END_SYNOPSIS';
my $tokenizer = Lucy::Analysis::StandardTokenizer->new;
# Then... once you have a tokenizer, put it into a PolyAnalyzer:
@@ -314,24 +313,24 @@ sub bind_standardtokenizer {
analyzers => [ $case_folder, $tokenizer, $stemmer ], );
END_SYNOPSIS
-my $constructor = <<'END_CONSTRUCTOR';
+ my $constructor = <<'END_CONSTRUCTOR';
my $tokenizer = Lucy::Analysis::StandardTokenizer->new;
END_CONSTRUCTOR
-Clownfish::CFC::Binding::Perl::Class->register(
- parcel => "Lucy",
- class_name => "Lucy::Analysis::StandardTokenizer",
- bind_constructors => ["new"],
- make_pod => {
- constructor => { sample => $constructor },
- synopsis => $synopsis,
- },
-);
+ Clownfish::CFC::Binding::Perl::Class->register(
+ parcel => "Lucy",
+ class_name => "Lucy::Analysis::StandardTokenizer",
+ bind_constructors => ["new"],
+ make_pod => {
+ constructor => { sample => $constructor },
+ synopsis => $synopsis,
+ },
+ );
}
sub bind_token {
- my $xs = <<'END_XS';
+ my $xs = <<'END_XS';
MODULE = Lucy PACKAGE = Lucy::Analysis::Token
SV*
@@ -387,19 +386,19 @@ PPCODE:
}
END_XS
-Clownfish::CFC::Binding::Perl::Class->register(
- parcel => "Lucy",
- class_name => "Lucy::Analysis::Token",
- bind_methods => [
- qw(
- Get_Start_Offset
- Get_End_Offset
- Get_Boost
- Get_Pos_Inc
- )
- ],
- xs_code => $xs,
-);
+ Clownfish::CFC::Binding::Perl::Class->register(
+ parcel => "Lucy",
+ class_name => "Lucy::Analysis::Token",
+ bind_methods => [
+ qw(
+ Get_Start_Offset
+ Get_End_Offset
+ Get_Boost
+ Get_Pos_Inc
+ )
+ ],
+ xs_code => $xs,
+ );
}
1;
Modified: incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Docs.pm
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Docs.pm?rev=1232753&r1=1232752&r2=1232753&view=diff
==============================================================================
--- incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Docs.pm (original)
+++ incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Docs.pm Wed Jan 18 05:53:13 2012
@@ -14,24 +14,23 @@
# limitations under the License.
package Lucy::Build::Binding::Docs;
-
sub bind_all {
- my $class = shift;
- $class->bind_devguide;
- $class->bind_filelocking;
+ my $class = shift;
+ $class->bind_devguide;
+ $class->bind_filelocking;
}
sub bind_devguide {
- Clownfish::CFC::Binding::Perl::Class->register(
- parcel => "Lucy",
- class_name => "Lucy::Docs::DevGuide",
- make_pod => {},
-);
+ Clownfish::CFC::Binding::Perl::Class->register(
+ parcel => "Lucy",
+ class_name => "Lucy::Docs::DevGuide",
+ make_pod => {},
+ );
}
sub bind_filelocking {
- my $synopsis = <<'END_SYNOPSIS';
+ my $synopsis = <<'END_SYNOPSIS';
use Sys::Hostname qw( hostname );
my $hostname = hostname() or die "Can't get unique hostname";
my $manager = Lucy::Index::IndexManager->new( host => $hostname );
@@ -50,11 +49,11 @@ sub bind_filelocking {
my $searcher = Lucy::Search::IndexSearcher->new( index => $reader );
END_SYNOPSIS
-Clownfish::CFC::Binding::Perl::Class->register(
- parcel => "Lucy",
- class_name => "Lucy::Docs::FileLocking",
- make_pod => { synopsis => $synopsis, },
-);
+ Clownfish::CFC::Binding::Perl::Class->register(
+ parcel => "Lucy",
+ class_name => "Lucy::Docs::FileLocking",
+ make_pod => { synopsis => $synopsis, },
+ );
}
Modified: incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Document.pm
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Document.pm?rev=1232753&r1=1232752&r2=1232753&view=diff
==============================================================================
--- incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Document.pm (original)
+++ incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Document.pm Wed Jan 18 05:53:13 2012
@@ -14,15 +14,14 @@
# limitations under the License.
package Lucy::Build::Binding::Document;
-
sub bind_all {
- my $class = shift;
- $class->bind_doc;
- $class->bind_hitdoc;
+ my $class = shift;
+ $class->bind_doc;
+ $class->bind_hitdoc;
}
sub bind_doc {
- my $xs_code = <<'END_XS_CODE';
+ my $xs_code = <<'END_XS_CODE';
MODULE = Lucy PACKAGE = Lucy::Document::Doc
SV*
@@ -74,7 +73,7 @@ PPCODE:
lucy_Doc_set_fields(self, fields);
END_XS_CODE
-my $synopsis = <<'END_SYNOPSIS';
+ my $synopsis = <<'END_SYNOPSIS';
my $doc = Lucy::Document::Doc->new(
fields => { foo => 'foo foo', bar => 'bar bar' },
);
@@ -86,28 +85,28 @@ Doc objects allow access to field values
print "foo: $doc->{foo}\n";
END_SYNOPSIS
-my $constructor = <<'END_CONSTRUCTOR';
+ my $constructor = <<'END_CONSTRUCTOR';
my $doc = Lucy::Document::Doc->new(
fields => { foo => 'foo foo', bar => 'bar bar' },
);
END_CONSTRUCTOR
-Clownfish::CFC::Binding::Perl::Class->register(
- parcel => "Lucy",
- class_name => "Lucy::Document::Doc",
- xs_code => $xs_code,
- bind_methods => [qw( Set_Doc_ID Get_Doc_ID )],
- make_pod => {
- methods => [qw( set_doc_id get_doc_id get_fields )],
- synopsis => $synopsis,
- constructor => { sample => $constructor },
- }
-);
+ Clownfish::CFC::Binding::Perl::Class->register(
+ parcel => "Lucy",
+ class_name => "Lucy::Document::Doc",
+ xs_code => $xs_code,
+ bind_methods => [qw( Set_Doc_ID Get_Doc_ID )],
+ make_pod => {
+ methods => [qw( set_doc_id get_doc_id get_fields )],
+ synopsis => $synopsis,
+ constructor => { sample => $constructor },
+ }
+ );
}
sub bind_hitdoc {
- my $xs_code = <<'END_XS_CODE';
+ my $xs_code = <<'END_XS_CODE';
MODULE = Lucy PACKAGE = Lucy::Document::HitDoc
SV*
@@ -146,7 +145,7 @@ CODE:
OUTPUT: RETVAL
END_XS_CODE
-my $synopsis = <<'END_SYNOPSIS';
+ my $synopsis = <<'END_SYNOPSIS';
while ( my $hit_doc = $hits->next ) {
print "$hit_doc->{title}\n";
print $hit_doc->get_score . "\n";
@@ -154,16 +153,16 @@ my $synopsis = <<'END_SYNOPSIS';
}
END_SYNOPSIS
-Clownfish::CFC::Binding::Perl::Class->register(
- parcel => "Lucy",
- class_name => "Lucy::Document::HitDoc",
- bind_methods => [qw( Set_Score Get_Score )],
- xs_code => $xs_code,
- make_pod => {
- methods => [qw( set_score get_score )],
- synopsis => $synopsis,
- },
-);
+ Clownfish::CFC::Binding::Perl::Class->register(
+ parcel => "Lucy",
+ class_name => "Lucy::Document::HitDoc",
+ bind_methods => [qw( Set_Score Get_Score )],
+ xs_code => $xs_code,
+ make_pod => {
+ methods => [qw( set_score get_score )],
+ synopsis => $synopsis,
+ },
+ );
}
Modified: incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Highlight.pm
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Highlight.pm?rev=1232753&r1=1232752&r2=1232753&view=diff
==============================================================================
--- incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Highlight.pm (original)
+++ incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Highlight.pm Wed Jan 18 05:53:13 2012
@@ -14,43 +14,42 @@
# limitations under the License.
package Lucy::Build::Binding::Highlight;
-
sub bind_all {
- my $class = shift;
- $class->bind_heatmap;
- $class->bind_highlighter;
+ my $class = shift;
+ $class->bind_heatmap;
+ $class->bind_highlighter;
}
sub bind_heatmap {
- my $constructor = <<'END_CONSTRUCTOR';
+ my $constructor = <<'END_CONSTRUCTOR';
my $heat_map = Lucy::Highlight::HeatMap->new(
spans => \@highlight_spans,
window => 100,
);
END_CONSTRUCTOR
-Clownfish::CFC::Binding::Perl::Class->register(
- parcel => "Lucy",
- class_name => "Lucy::Highlight::HeatMap",
- bind_methods => [
- qw(
- Calc_Proximity_Boost
- Generate_Proximity_Boosts
- Flatten_Spans
- Get_Spans
- )
- ],
- bind_constructors => ["new"],
- #make_pod => {
- # synopsis => " # TODO.\n",
- # constructor => { sample => $constructor },
- #},
-);
+ Clownfish::CFC::Binding::Perl::Class->register(
+ parcel => "Lucy",
+ class_name => "Lucy::Highlight::HeatMap",
+ bind_methods => [
+ qw(
+ Calc_Proximity_Boost
+ Generate_Proximity_Boosts
+ Flatten_Spans
+ Get_Spans
+ )
+ ],
+ bind_constructors => ["new"],
+ #make_pod => {
+ # synopsis => " # TODO.\n",
+ # constructor => { sample => $constructor },
+ #},
+ );
}
sub bind_highlighter {
- my $synopsis = <<'END_SYNOPSIS';
+ my $synopsis = <<'END_SYNOPSIS';
my $highlighter = Lucy::Highlight::Highlighter->new(
searcher => $searcher,
query => $query,
@@ -63,7 +62,7 @@ sub bind_highlighter {
}
END_SYNOPSIS
-my $constructor = <<'END_CONSTRUCTOR';
+ my $constructor = <<'END_CONSTRUCTOR';
my $highlighter = Lucy::Highlight::Highlighter->new(
searcher => $searcher, # required
query => $query, # required
@@ -72,51 +71,51 @@ my $constructor = <<'END_CONSTRUCTOR';
);
END_CONSTRUCTOR
-Clownfish::CFC::Binding::Perl::Class->register(
- parcel => "Lucy",
- class_name => "Lucy::Highlight::Highlighter",
- bind_methods => [
- qw(
- Highlight
- Encode
- Create_Excerpt
- _find_best_fragment|Find_Best_Fragment
- _raw_excerpt|Raw_Excerpt
- _highlight_excerpt|Highlight_Excerpt
- Find_Sentences
- Set_Pre_Tag
- Get_Pre_Tag
- Set_Post_Tag
- Get_Post_Tag
- Get_Searcher
- Get_Query
- Get_Compiler
- Get_Excerpt_Length
- Get_Field
- )
- ],
- bind_constructors => ["new"],
- make_pod => {
- synopsis => $synopsis,
- constructor => { sample => $constructor },
- methods => [
+ Clownfish::CFC::Binding::Perl::Class->register(
+ parcel => "Lucy",
+ class_name => "Lucy::Highlight::Highlighter",
+ bind_methods => [
qw(
- create_excerpt
- highlight
- encode
- set_pre_tag
- get_pre_tag
- set_post_tag
- get_post_tag
- get_searcher
- get_query
- get_compiler
- get_excerpt_length
- get_field
+ Highlight
+ Encode
+ Create_Excerpt
+ _find_best_fragment|Find_Best_Fragment
+ _raw_excerpt|Raw_Excerpt
+ _highlight_excerpt|Highlight_Excerpt
+ Find_Sentences
+ Set_Pre_Tag
+ Get_Pre_Tag
+ Set_Post_Tag
+ Get_Post_Tag
+ Get_Searcher
+ Get_Query
+ Get_Compiler
+ Get_Excerpt_Length
+ Get_Field
)
- ]
- },
-);
+ ],
+ bind_constructors => ["new"],
+ make_pod => {
+ synopsis => $synopsis,
+ constructor => { sample => $constructor },
+ methods => [
+ qw(
+ create_excerpt
+ highlight
+ encode
+ set_pre_tag
+ get_pre_tag
+ set_post_tag
+ get_post_tag
+ get_searcher
+ get_query
+ get_compiler
+ get_excerpt_length
+ get_field
+ )
+ ]
+ },
+ );
}
Modified: incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Index.pm
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Index.pm?rev=1232753&r1=1232752&r2=1232753&view=diff
==============================================================================
--- incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Index.pm (original)
+++ incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Index.pm Wed Jan 18 05:53:13 2012
@@ -14,94 +14,93 @@
# limitations under the License.
package Lucy::Build::Binding::Index;
-
sub bind_all {
- my $class = shift;
- $class->bind_backgroundmerger;
- $class->bind_datareader;
- $class->bind_datawriter;
- $class->bind_deletionsreader;
- $class->bind_deletionswriter;
- $class->bind_docreader;
- $class->bind_docvector;
- $class->bind_docwriter;
- $class->bind_filepurger;
- $class->bind_highlightreader;
- $class->bind_highlightwriter;
- $class->bind_indexmanager;
- $class->bind_indexreader;
- $class->bind_indexer;
- $class->bind_inverter;
- $class->bind_lexicon;
- $class->bind_lexiconreader;
- $class->bind_lexiconwriter;
- $class->bind_polylexicon;
- $class->bind_polyreader;
- $class->bind_posting;
- $class->bind_postinglist;
- $class->bind_postinglistreader;
- $class->bind_postinglistwriter;
- $class->bind_seglexicon;
- $class->bind_segpostinglist;
- $class->bind_segreader;
- $class->bind_segwriter;
- $class->bind_segment;
- $class->bind_similarity;
- $class->bind_snapshot;
- $class->bind_sortcache;
- $class->bind_sortreader;
- $class->bind_sortwriter;
- $class->bind_terminfo;
- $class->bind_termvector;
+ my $class = shift;
+ $class->bind_backgroundmerger;
+ $class->bind_datareader;
+ $class->bind_datawriter;
+ $class->bind_deletionsreader;
+ $class->bind_deletionswriter;
+ $class->bind_docreader;
+ $class->bind_docvector;
+ $class->bind_docwriter;
+ $class->bind_filepurger;
+ $class->bind_highlightreader;
+ $class->bind_highlightwriter;
+ $class->bind_indexmanager;
+ $class->bind_indexreader;
+ $class->bind_indexer;
+ $class->bind_inverter;
+ $class->bind_lexicon;
+ $class->bind_lexiconreader;
+ $class->bind_lexiconwriter;
+ $class->bind_polylexicon;
+ $class->bind_polyreader;
+ $class->bind_posting;
+ $class->bind_postinglist;
+ $class->bind_postinglistreader;
+ $class->bind_postinglistwriter;
+ $class->bind_seglexicon;
+ $class->bind_segpostinglist;
+ $class->bind_segreader;
+ $class->bind_segwriter;
+ $class->bind_segment;
+ $class->bind_similarity;
+ $class->bind_snapshot;
+ $class->bind_sortcache;
+ $class->bind_sortreader;
+ $class->bind_sortwriter;
+ $class->bind_terminfo;
+ $class->bind_termvector;
}
sub bind_backgroundmerger {
- my $synopsis = <<'END_SYNOPSIS';
+ my $synopsis = <<'END_SYNOPSIS';
my $bg_merger = Lucy::Index::BackgroundMerger->new(
index => '/path/to/index',
);
$bg_merger->commit;
END_SYNOPSIS
-my $constructor = <<'END_CONSTRUCTOR';
+ my $constructor = <<'END_CONSTRUCTOR';
my $bg_merger = Lucy::Index::BackgroundMerger->new(
index => '/path/to/index', # required
manager => $manager # default: created internally
);
END_CONSTRUCTOR
-Clownfish::CFC::Binding::Perl::Class->register(
- parcel => "Lucy",
- class_name => "Lucy::Index::BackgroundMerger",
- bind_methods => [
- qw(
- Commit
- Prepare_Commit
- Optimize
- )
- ],
- bind_constructors => ["new"],
- make_pod => {
- methods => [
+ Clownfish::CFC::Binding::Perl::Class->register(
+ parcel => "Lucy",
+ class_name => "Lucy::Index::BackgroundMerger",
+ bind_methods => [
qw(
- commit
- prepare_commit
- optimize
+ Commit
+ Prepare_Commit
+ Optimize
)
],
- synopsis => $synopsis,
- constructors => [ { sample => $constructor } ],
- },
-);
+ bind_constructors => ["new"],
+ make_pod => {
+ methods => [
+ qw(
+ commit
+ prepare_commit
+ optimize
+ )
+ ],
+ synopsis => $synopsis,
+ constructors => [ { sample => $constructor } ],
+ },
+ );
}
sub bind_datareader {
- my $synopsis = <<'END_SYNOPSIS';
+ my $synopsis = <<'END_SYNOPSIS';
# Abstract base class.
END_SYNOPSIS
-my $constructor = <<'END_CONSTRUCTOR';
+ my $constructor = <<'END_CONSTRUCTOR';
my $reader = MyDataReader->new(
schema => $seg_reader->get_schema, # default undef
folder => $seg_reader->get_folder, # default undef
@@ -111,47 +110,47 @@ my $constructor = <<'END_CONSTRUCTOR';
);
END_CONSTRUCTOR
-Clownfish::CFC::Binding::Perl::Class->register(
- parcel => "Lucy",
- class_name => "Lucy::Index::DataReader",
- bind_methods => [
- qw(
- Get_Schema
- Get_Folder
- Get_Segments
- Get_Snapshot
- Get_Seg_Tick
- Get_Segment
- Aggregator
- Close
- )
- ],
- bind_constructors => ["new"],
- make_pod => {
- synopsis => $synopsis,
- constructor => { sample => $constructor, },
- methods => [
+ Clownfish::CFC::Binding::Perl::Class->register(
+ parcel => "Lucy",
+ class_name => "Lucy::Index::DataReader",
+ bind_methods => [
qw(
- get_schema
- get_folder
- get_snapshot
- get_segments
- get_segment
- get_seg_tick
- aggregator
+ Get_Schema
+ Get_Folder
+ Get_Segments
+ Get_Snapshot
+ Get_Seg_Tick
+ Get_Segment
+ Aggregator
+ Close
)
- ]
- },
-);
+ ],
+ bind_constructors => ["new"],
+ make_pod => {
+ synopsis => $synopsis,
+ constructor => { sample => $constructor, },
+ methods => [
+ qw(
+ get_schema
+ get_folder
+ get_snapshot
+ get_segments
+ get_segment
+ get_seg_tick
+ aggregator
+ )
+ ]
+ },
+ );
}
sub bind_datawriter {
- my $synopsis = <<END_SYNOPSIS;
+ my $synopsis = <<END_SYNOPSIS;
# Abstract base class.
END_SYNOPSIS
-my $constructor = <<'END_CONSTRUCTOR';
+ my $constructor = <<'END_CONSTRUCTOR';
my $writer = MyDataWriter->new(
snapshot => $snapshot, # required
segment => $segment, # required
@@ -159,68 +158,68 @@ my $constructor = <<'END_CONSTRUCTOR';
);
END_CONSTRUCTOR
-Clownfish::CFC::Binding::Perl::Class->register(
- parcel => "Lucy",
- class_name => "Lucy::Index::DataWriter",
- bind_methods => [
- qw(
- Add_Inverted_Doc
- Add_Segment
- Delete_Segment
- Merge_Segment
- Finish
- Format
- Metadata
- Get_Snapshot
- Get_Segment
- Get_PolyReader
- Get_Schema
- Get_Folder
- )
- ],
- bind_constructors => ["new"],
- make_pod => {
- synopsis => $synopsis,
- constructor => { sample => $constructor },
- methods => [
+ Clownfish::CFC::Binding::Perl::Class->register(
+ parcel => "Lucy",
+ class_name => "Lucy::Index::DataWriter",
+ bind_methods => [
qw(
- add_inverted_doc
- add_segment
- delete_segment
- merge_segment
- finish
- format
- metadata
- get_snapshot
- get_segment
- get_polyreader
- get_schema
- get_folder
+ Add_Inverted_Doc
+ Add_Segment
+ Delete_Segment
+ Merge_Segment
+ Finish
+ Format
+ Metadata
+ Get_Snapshot
+ Get_Segment
+ Get_PolyReader
+ Get_Schema
+ Get_Folder
)
],
- },
-);
+ bind_constructors => ["new"],
+ make_pod => {
+ synopsis => $synopsis,
+ constructor => { sample => $constructor },
+ methods => [
+ qw(
+ add_inverted_doc
+ add_segment
+ delete_segment
+ merge_segment
+ finish
+ format
+ metadata
+ get_snapshot
+ get_segment
+ get_polyreader
+ get_schema
+ get_folder
+ )
+ ],
+ },
+ );
}
sub bind_deletionsreader {
- Clownfish::CFC::Binding::Perl::Class->register(
- parcel => "Lucy",
- class_name => "Lucy::Index::DeletionsReader",
- bind_constructors => ['new'],
- bind_methods => [qw( Iterator Del_Count )],
-);
-Clownfish::CFC::Binding::Perl::Class->register(
- parcel => "Lucy",
- class_name => "Lucy::Index::DefaultDeletionsReader",
- bind_constructors => ['new'],
- bind_methods => [qw( Read_Deletions )],
-);
+ Clownfish::CFC::Binding::Perl::Class->register(
+ parcel => "Lucy",
+ class_name => "Lucy::Index::DeletionsReader",
+ bind_constructors => ['new'],
+ bind_methods => [qw( Iterator Del_Count )],
+ );
+ Clownfish::CFC::Binding::Perl::Class->register(
+ parcel => "Lucy",
+ class_name => "Lucy::Index::DefaultDeletionsReader",
+ bind_constructors => ['new'],
+ bind_methods => [qw( Read_Deletions )],
+ );
}
sub bind_deletionswriter {
- my $synopsis = <<'END_SYNOPSIS';
+ my $synopsis = <<'END_SYNOPSIS';
my $polyreader = $del_writer->get_polyreader;
my $seg_readers = $polyreader->seg_readers;
for my $seg_reader (@$seg_readers) {
@@ -229,118 +228,118 @@ sub bind_deletionswriter {
}
END_SYNOPSIS
-Clownfish::CFC::Binding::Perl::Class->register(
- parcel => "Lucy",
- class_name => "Lucy::Index::DeletionsWriter",
- bind_methods => [
- qw(
- Generate_Doc_Map
- Delete_By_Term
- Delete_By_Query
- Delete_By_Doc_ID
- Updated
- Seg_Deletions
- Seg_Del_Count
- )
- ],
- make_pod => {
- synopsis => $synopsis,
- methods => [
+ Clownfish::CFC::Binding::Perl::Class->register(
+ parcel => "Lucy",
+ class_name => "Lucy::Index::DeletionsWriter",
+ bind_methods => [
qw(
- delete_by_term
- delete_by_query
- updated
- seg_del_count
+ Generate_Doc_Map
+ Delete_By_Term
+ Delete_By_Query
+ Delete_By_Doc_ID
+ Updated
+ Seg_Deletions
+ Seg_Del_Count
)
],
- },
-);
-Clownfish::CFC::Binding::Perl::Class->register(
- parcel => "Lucy",
- class_name => "Lucy::Index::DefaultDeletionsWriter",
- bind_constructors => ["new"],
-);
+ make_pod => {
+ synopsis => $synopsis,
+ methods => [
+ qw(
+ delete_by_term
+ delete_by_query
+ updated
+ seg_del_count
+ )
+ ],
+ },
+ );
+ Clownfish::CFC::Binding::Perl::Class->register(
+ parcel => "Lucy",
+ class_name => "Lucy::Index::DefaultDeletionsWriter",
+ bind_constructors => ["new"],
+ );
}
sub bind_docreader {
- my $synopsis = <<'END_SYNOPSIS';
+ my $synopsis = <<'END_SYNOPSIS';
my $doc_reader = $seg_reader->obtain("Lucy::Index::DocReader");
my $doc = $doc_reader->fetch_doc($doc_id);
END_SYNOPSIS
-Clownfish::CFC::Binding::Perl::Class->register(
- parcel => "Lucy",
- class_name => "Lucy::Index::DocReader",
- bind_constructors => ["new"],
- bind_methods => [qw( Fetch_Doc )],
- make_pod => {
- synopsis => $synopsis,
- methods => [qw( fetch_doc aggregator )],
- },
-);
-Clownfish::CFC::Binding::Perl::Class->register(
- parcel => "Lucy",
- class_name => "Lucy::Index::DefaultDocReader",
- bind_constructors => ["new"],
-);
+ Clownfish::CFC::Binding::Perl::Class->register(
+ parcel => "Lucy",
+ class_name => "Lucy::Index::DocReader",
+ bind_constructors => ["new"],
+ bind_methods => [qw( Fetch_Doc )],
+ make_pod => {
+ synopsis => $synopsis,
+ methods => [qw( fetch_doc aggregator )],
+ },
+ );
+ Clownfish::CFC::Binding::Perl::Class->register(
+ parcel => "Lucy",
+ class_name => "Lucy::Index::DefaultDocReader",
+ bind_constructors => ["new"],
+ );
}
sub bind_docvector {
- Clownfish::CFC::Binding::Perl::Class->register(
- parcel => "Lucy",
- class_name => "Lucy::Index::DocVector",
- bind_methods => [qw( Term_Vector Field_Buf Add_Field_Buf )],
- bind_constructors => ["new"],
-);
+ Clownfish::CFC::Binding::Perl::Class->register(
+ parcel => "Lucy",
+ class_name => "Lucy::Index::DocVector",
+ bind_methods => [qw( Term_Vector Field_Buf Add_Field_Buf )],
+ bind_constructors => ["new"],
+ );
}
sub bind_docwriter {
- Clownfish::CFC::Binding::Perl::Class->register(
- parcel => "Lucy",
- class_name => "Lucy::Index::DocWriter",
- bind_constructors => ["new"],
-);
+ Clownfish::CFC::Binding::Perl::Class->register(
+ parcel => "Lucy",
+ class_name => "Lucy::Index::DocWriter",
+ bind_constructors => ["new"],
+ );
}
sub bind_filepurger {
- Clownfish::CFC::Binding::Perl::Class->register(
- parcel => "Lucy",
- class_name => "Lucy::Index::FilePurger",
- bind_methods => [qw( Purge )],
- bind_constructors => ["new"],
-);
+ Clownfish::CFC::Binding::Perl::Class->register(
+ parcel => "Lucy",
+ class_name => "Lucy::Index::FilePurger",
+ bind_methods => [qw( Purge )],
+ bind_constructors => ["new"],
+ );
}
sub bind_highlightreader {
- Clownfish::CFC::Binding::Perl::Class->register(
- parcel => "Lucy",
- class_name => "Lucy::Index::HighlightReader",
- bind_constructors => ["new"],
-);
-Clownfish::CFC::Binding::Perl::Class->register(
- parcel => "Lucy",
- class_name => "Lucy::Index::DefaultHighlightReader",
- bind_constructors => ["new"],
-);
+ Clownfish::CFC::Binding::Perl::Class->register(
+ parcel => "Lucy",
+ class_name => "Lucy::Index::HighlightReader",
+ bind_constructors => ["new"],
+ );
+ Clownfish::CFC::Binding::Perl::Class->register(
+ parcel => "Lucy",
+ class_name => "Lucy::Index::DefaultHighlightReader",
+ bind_constructors => ["new"],
+ );
}
sub bind_highlightwriter {
- Clownfish::CFC::Binding::Perl::Class->register(
- parcel => "Lucy",
- class_name => "Lucy::Index::HighlightWriter",
- bind_constructors => ["new"],
-);
+ Clownfish::CFC::Binding::Perl::Class->register(
+ parcel => "Lucy",
+ class_name => "Lucy::Index::HighlightWriter",
+ bind_constructors => ["new"],
+ );
}
sub bind_indexmanager {
- my $synopsis = <<'END_SYNOPSIS';
+ my $synopsis = <<'END_SYNOPSIS';
use Sys::Hostname qw( hostname );
my $hostname = hostname() or die "Can't get unique hostname";
my $manager = Lucy::Index::IndexManager->new(
@@ -361,65 +360,65 @@ sub bind_indexmanager {
my $searcher = Lucy::Search::IndexSearcher->new( index => $reader );
END_SYNOPSIS
-my $constructor = <<'END_CONSTRUCTOR';
+ my $constructor = <<'END_CONSTRUCTOR';
my $manager = Lucy::Index::IndexManager->new(
host => $hostname, # default: ""
);
END_CONSTRUCTOR
-Clownfish::CFC::Binding::Perl::Class->register(
- parcel => "Lucy",
- class_name => "Lucy::Index::IndexManager",
- bind_constructors => ["new"],
- bind_methods => [
- qw(
- Recycle
- Make_Write_Lock
- Make_Deletion_Lock
- Make_Merge_Lock
- Make_Snapshot_Read_Lock
- Highest_Seg_Num
- Make_Snapshot_Filename
- Set_Folder
- Get_Folder
- Get_Host
- Set_Write_Lock_Timeout
- Get_Write_Lock_Timeout
- Set_Write_Lock_Interval
- Get_Write_Lock_Interval
- Set_Merge_Lock_Timeout
- Get_Merge_Lock_Timeout
- Set_Merge_Lock_Interval
- Get_Merge_Lock_Interval
- Set_Deletion_Lock_Timeout
- Get_Deletion_Lock_Timeout
- Set_Deletion_Lock_Interval
- Get_Deletion_Lock_Interval
- )
- ],
- make_pod => {
- methods => [
+ Clownfish::CFC::Binding::Perl::Class->register(
+ parcel => "Lucy",
+ class_name => "Lucy::Index::IndexManager",
+ bind_constructors => ["new"],
+ bind_methods => [
qw(
- make_write_lock
- recycle
- set_folder
- get_folder
- get_host
- set_write_lock_timeout
- get_write_lock_timeout
- set_write_lock_interval
- get_write_lock_interval
+ Recycle
+ Make_Write_Lock
+ Make_Deletion_Lock
+ Make_Merge_Lock
+ Make_Snapshot_Read_Lock
+ Highest_Seg_Num
+ Make_Snapshot_Filename
+ Set_Folder
+ Get_Folder
+ Get_Host
+ Set_Write_Lock_Timeout
+ Get_Write_Lock_Timeout
+ Set_Write_Lock_Interval
+ Get_Write_Lock_Interval
+ Set_Merge_Lock_Timeout
+ Get_Merge_Lock_Timeout
+ Set_Merge_Lock_Interval
+ Get_Merge_Lock_Interval
+ Set_Deletion_Lock_Timeout
+ Get_Deletion_Lock_Timeout
+ Set_Deletion_Lock_Interval
+ Get_Deletion_Lock_Interval
)
],
- synopsis => $synopsis,
- constructor => { sample => $constructor },
- },
-);
+ make_pod => {
+ methods => [
+ qw(
+ make_write_lock
+ recycle
+ set_folder
+ get_folder
+ get_host
+ set_write_lock_timeout
+ get_write_lock_timeout
+ set_write_lock_interval
+ get_write_lock_interval
+ )
+ ],
+ synopsis => $synopsis,
+ constructor => { sample => $constructor },
+ },
+ );
}
sub bind_indexreader {
- my $xs_code = <<'END_XS_CODE';
+ my $xs_code = <<'END_XS_CODE';
MODULE = Lucy PACKAGE = Lucy::Index::IndexReader
void
@@ -440,7 +439,7 @@ CODE:
OUTPUT: RETVAL
END_XS_CODE
-my $synopsis = <<'END_SYNOPSIS';
+ my $synopsis = <<'END_SYNOPSIS';
my $reader = Lucy::Index::IndexReader->open(
index => '/path/to/index',
);
@@ -457,7 +456,7 @@ my $synopsis = <<'END_SYNOPSIS';
}
END_SYNOPSIS
-my $constructor = <<'END_CONSTRUCTOR';
+ my $constructor = <<'END_CONSTRUCTOR';
my $reader = Lucy::Index::IndexReader->open(
index => '/path/to/index', # required
snapshot => $snapshot,
@@ -465,47 +464,47 @@ my $constructor = <<'END_CONSTRUCTOR';
);
END_CONSTRUCTOR
-Clownfish::CFC::Binding::Perl::Class->register(
- parcel => "Lucy",
- class_name => "Lucy::Index::IndexReader",
- xs_code => $xs_code,
- bind_methods => [
- qw( Doc_Max
- Doc_Count
- Del_Count
- Fetch
- Obtain
- Seg_Readers
- _offsets|Offsets
- Get_Components
- )
- ],
- bind_constructors => ['open|do_open'],
- make_pod => {
- synopsis => $synopsis,
- constructor => {
- name => 'open',
- func => 'do_open',
- sample => $constructor,
- },
- methods => [
- qw(
- doc_max
- doc_count
- del_count
- seg_readers
- offsets
- fetch
- obtain
+ Clownfish::CFC::Binding::Perl::Class->register(
+ parcel => "Lucy",
+ class_name => "Lucy::Index::IndexReader",
+ xs_code => $xs_code,
+ bind_methods => [
+ qw( Doc_Max
+ Doc_Count
+ Del_Count
+ Fetch
+ Obtain
+ Seg_Readers
+ _offsets|Offsets
+ Get_Components
)
- ]
- },
-);
+ ],
+ bind_constructors => ['open|do_open'],
+ make_pod => {
+ synopsis => $synopsis,
+ constructor => {
+ name => 'open',
+ func => 'do_open',
+ sample => $constructor,
+ },
+ methods => [
+ qw(
+ doc_max
+ doc_count
+ del_count
+ seg_readers
+ offsets
+ fetch
+ obtain
+ )
+ ]
+ },
+ );
}
sub bind_indexer {
- my $xs_code = <<'END_XS_CODE';
+ my $xs_code = <<'END_XS_CODE';
MODULE = Lucy PACKAGE = Lucy::Index::Indexer
int32_t
@@ -572,7 +571,7 @@ PPCODE:
}
END_XS_CODE
-my $synopsis = <<'END_SYNOPSIS';
+ my $synopsis = <<'END_SYNOPSIS';
my $indexer = Lucy::Index::Indexer->new(
schema => $schema,
index => '/path/to/index',
@@ -587,7 +586,7 @@ my $synopsis = <<'END_SYNOPSIS';
$indexer->commit;
END_SYNOPSIS
-my $constructor = <<'END_NEW';
+ my $constructor = <<'END_NEW';
==head2 new( I<[labeled params]> )
my $indexer = Lucy::Index::Indexer->new(
@@ -627,9 +626,9 @@ B<manager> - An IndexManager.
==back
END_NEW
-# Override is necessary because there's no standard way to explain
-# hash/hashref across multiple host languages.
-my $add_doc_pod = <<'END_ADD_DOC_POD';
+ # Override is necessary because there's no standard way to explain
+ # hash/hashref across multiple host languages.
+ my $add_doc_pod = <<'END_ADD_DOC_POD';
==head2 add_doc(...)
$indexer->add_doc($doc);
@@ -657,65 +656,65 @@ B<boost> - A floating point weight which
END_ADD_DOC_POD
-Clownfish::CFC::Binding::Perl::Class->register(
- parcel => "Lucy",
- class_name => "Lucy::Index::Indexer",
- xs_code => $xs_code,
- bind_methods => [
- qw(
- Delete_By_Term
- Delete_By_Query
- Add_Index
- Commit
- Prepare_Commit
- Optimize
- )
- ],
- bind_constructors => ["_new|init"],
- make_pod => {
- methods => [
- { name => 'add_doc', pod => $add_doc_pod },
+ Clownfish::CFC::Binding::Perl::Class->register(
+ parcel => "Lucy",
+ class_name => "Lucy::Index::Indexer",
+ xs_code => $xs_code,
+ bind_methods => [
qw(
- add_index
- optimize
- commit
- prepare_commit
- delete_by_term
- delete_by_query
+ Delete_By_Term
+ Delete_By_Query
+ Add_Index
+ Commit
+ Prepare_Commit
+ Optimize
)
],
- synopsis => $synopsis,
- constructors => [ { pod => $constructor } ],
- },
-);
+ bind_constructors => ["_new|init"],
+ make_pod => {
+ methods => [
+ { name => 'add_doc', pod => $add_doc_pod },
+ qw(
+ add_index
+ optimize
+ commit
+ prepare_commit
+ delete_by_term
+ delete_by_query
+ )
+ ],
+ synopsis => $synopsis,
+ constructors => [ { pod => $constructor } ],
+ },
+ );
}
sub bind_inverter {
- Clownfish::CFC::Binding::Perl::Class->register(
- parcel => "Lucy",
- class_name => "Lucy::Index::Inverter",
- bind_constructors => ["new"],
- bind_methods => [
- qw(
- Get_Doc
- Iterate
- Next
- Clear
- Get_Field_Name
- Get_Value
- Get_Type
- Get_Analyzer
- Get_Similarity
- Get_Inversion
- )
- ],
-);
+ Clownfish::CFC::Binding::Perl::Class->register(
+ parcel => "Lucy",
+ class_name => "Lucy::Index::Inverter",
+ bind_constructors => ["new"],
+ bind_methods => [
+ qw(
+ Get_Doc
+ Iterate
+ Next
+ Clear
+ Get_Field_Name
+ Get_Value
+ Get_Type
+ Get_Analyzer
+ Get_Similarity
+ Get_Inversion
+ )
+ ],
+ );
}
sub bind_lexicon {
- my $synopsis = <<'END_SYNOPSIS';
+ my $synopsis = <<'END_SYNOPSIS';
my $lex_reader = $seg_reader->obtain('Lucy::Index::LexiconReader');
my $lexicon = $lex_reader->lexicon( field => 'content' );
while ( $lexicon->next ) {
@@ -723,63 +722,63 @@ sub bind_lexicon {
}
END_SYNOPSIS
-Clownfish::CFC::Binding::Perl::Class->register(
- parcel => "Lucy",
- class_name => "Lucy::Index::Lexicon",
- bind_methods => [qw( Seek Next Reset Get_Term Get_Field )],
- bind_constructors => ["new"],
- make_pod => {
- synopsis => $synopsis,
- methods => [qw( seek next get_term reset )],
- },
-);
+ Clownfish::CFC::Binding::Perl::Class->register(
+ parcel => "Lucy",
+ class_name => "Lucy::Index::Lexicon",
+ bind_methods => [qw( Seek Next Reset Get_Term Get_Field )],
+ bind_constructors => ["new"],
+ make_pod => {
+ synopsis => $synopsis,
+ methods => [qw( seek next get_term reset )],
+ },
+ );
}
sub bind_lexiconreader {
- my $synopsis = <<'END_SYNOPSIS';
+ my $synopsis = <<'END_SYNOPSIS';
my $lex_reader = $seg_reader->obtain("Lucy::Index::LexiconReader");
my $lexicon = $lex_reader->lexicon( field => 'title' );
END_SYNOPSIS
-Clownfish::CFC::Binding::Perl::Class->register(
- parcel => "Lucy",
- class_name => "Lucy::Index::LexiconReader",
- bind_methods => [qw( Lexicon Doc_Freq Fetch_Term_Info )],
- bind_constructors => ["new"],
- make_pod => {
- synopsis => $synopsis,
- methods => [qw( lexicon doc_freq )],
- },
-);
-Clownfish::CFC::Binding::Perl::Class->register(
- parcel => "Lucy",
- class_name => "Lucy::Index::DefaultLexiconReader",
- bind_constructors => ["new"],
-);
+ Clownfish::CFC::Binding::Perl::Class->register(
+ parcel => "Lucy",
+ class_name => "Lucy::Index::LexiconReader",
+ bind_methods => [qw( Lexicon Doc_Freq Fetch_Term_Info )],
+ bind_constructors => ["new"],
+ make_pod => {
+ synopsis => $synopsis,
+ methods => [qw( lexicon doc_freq )],
+ },
+ );
+ Clownfish::CFC::Binding::Perl::Class->register(
+ parcel => "Lucy",
+ class_name => "Lucy::Index::DefaultLexiconReader",
+ bind_constructors => ["new"],
+ );
}
sub bind_lexiconwriter {
- Clownfish::CFC::Binding::Perl::Class->register(
- parcel => "Lucy",
- class_name => "Lucy::Index::LexiconWriter",
- bind_constructors => ["new"],
-);
+ Clownfish::CFC::Binding::Perl::Class->register(
+ parcel => "Lucy",
+ class_name => "Lucy::Index::LexiconWriter",
+ bind_constructors => ["new"],
+ );
}
sub bind_polylexicon {
- Clownfish::CFC::Binding::Perl::Class->register(
- parcel => "Lucy",
- class_name => "Lucy::Index::PolyLexicon",
- bind_constructors => ["new"],
-);
+ Clownfish::CFC::Binding::Perl::Class->register(
+ parcel => "Lucy",
+ class_name => "Lucy::Index::PolyLexicon",
+ bind_constructors => ["new"],
+ );
}
sub bind_polyreader {
- my $synopsis = <<'END_SYNOPSIS';
+ my $synopsis = <<'END_SYNOPSIS';
my $polyreader = Lucy::Index::IndexReader->open(
index => '/path/to/index',
);
@@ -790,7 +789,7 @@ sub bind_polyreader {
}
END_SYNOPSIS
-my $xs_code = <<'END_XS_CODE';
+ my $xs_code = <<'END_XS_CODE';
MODULE = Lucy PACKAGE = Lucy::Index::PolyReader
uint32_t
@@ -803,31 +802,31 @@ OUTPUT: RETVAL
END_XS_CODE
-Clownfish::CFC::Binding::Perl::Class->register(
- parcel => "Lucy",
- class_name => "Lucy::Index::PolyReader",
- bind_constructors => [ 'new', 'open|do_open' ],
- bind_methods => [qw( Get_Seg_Readers )],
- make_pod => { synopsis => $synopsis },
- xs_code => $xs_code,
-);
+ Clownfish::CFC::Binding::Perl::Class->register(
+ parcel => "Lucy",
+ class_name => "Lucy::Index::PolyReader",
+ bind_constructors => [ 'new', 'open|do_open' ],
+ bind_methods => [qw( Get_Seg_Readers )],
+ make_pod => { synopsis => $synopsis },
+ xs_code => $xs_code,
+ );
}
sub bind_posting {
- Clownfish::CFC::Binding::Perl::Class->register(
- parcel => "Lucy",
- class_name => "Lucy::Index::Posting",
- bind_methods => [qw( Get_Doc_ID )],
-# make_pod => {
-# synopsis => " # Abstract base class.\n",
-# },
-);
+ Clownfish::CFC::Binding::Perl::Class->register(
+ parcel => "Lucy",
+ class_name => "Lucy::Index::Posting",
+ bind_methods => [qw( Get_Doc_ID )],
+ # make_pod => {
+ # synopsis => " # Abstract base class.\n",
+ # },
+ );
}
sub bind_postinglist {
- my $synopsis = <<'END_SYNOPSIS';
+ my $synopsis = <<'END_SYNOPSIS';
my $posting_list_reader
= $seg_reader->obtain("Lucy::Index::PostingListReader");
my $posting_list = $posting_list_reader->posting_list(
@@ -839,36 +838,36 @@ sub bind_postinglist {
}
END_SYNOPSIS
-Clownfish::CFC::Binding::Perl::Class->register(
- parcel => "Lucy",
- class_name => "Lucy::Index::PostingList",
- bind_methods => [
- qw(
- Seek
- Get_Posting
- Get_Doc_Freq
- Make_Matcher
- )
- ],
- bind_constructors => ["new"],
- make_pod => {
- synopsis => $synopsis,
- methods => [
+ Clownfish::CFC::Binding::Perl::Class->register(
+ parcel => "Lucy",
+ class_name => "Lucy::Index::PostingList",
+ bind_methods => [
qw(
- next
- advance
- get_doc_id
- get_doc_freq
- seek
+ Seek
+ Get_Posting
+ Get_Doc_Freq
+ Make_Matcher
)
],
- },
-);
+ bind_constructors => ["new"],
+ make_pod => {
+ synopsis => $synopsis,
+ methods => [
+ qw(
+ next
+ advance
+ get_doc_id
+ get_doc_freq
+ seek
+ )
+ ],
+ },
+ );
}
sub bind_postinglistreader {
- my $synopsis = <<'END_SYNOPSIS';
+ my $synopsis = <<'END_SYNOPSIS';
my $posting_list_reader
= $seg_reader->obtain("Lucy::Index::PostingListReader");
my $posting_list = $posting_list_reader->posting_list(
@@ -877,26 +876,26 @@ sub bind_postinglistreader {
);
END_SYNOPSIS
-Clownfish::CFC::Binding::Perl::Class->register(
- parcel => "Lucy",
- class_name => "Lucy::Index::PostingListReader",
- bind_constructors => ["new"],
- bind_methods => [qw( Posting_List Get_Lex_Reader )],
- make_pod => {
- synopsis => $synopsis,
- methods => [qw( posting_list )],
- },
-);
-Clownfish::CFC::Binding::Perl::Class->register(
- parcel => "Lucy",
- class_name => "Lucy::Index::DefaultPostingListReader",
- bind_constructors => ["new"],
-);
+ Clownfish::CFC::Binding::Perl::Class->register(
+ parcel => "Lucy",
+ class_name => "Lucy::Index::PostingListReader",
+ bind_constructors => ["new"],
+ bind_methods => [qw( Posting_List Get_Lex_Reader )],
+ make_pod => {
+ synopsis => $synopsis,
+ methods => [qw( posting_list )],
+ },
+ );
+ Clownfish::CFC::Binding::Perl::Class->register(
+ parcel => "Lucy",
+ class_name => "Lucy::Index::DefaultPostingListReader",
+ bind_constructors => ["new"],
+ );
}
sub bind_postinglistwriter {
- my $xs_code = <<'END_XS';
+ my $xs_code = <<'END_XS';
MODULE = Lucy PACKAGE = Lucy::Index::PostingListWriter
void
@@ -906,37 +905,37 @@ PPCODE:
lucy_PListWriter_set_default_mem_thresh(mem_thresh);
END_XS
-Clownfish::CFC::Binding::Perl::Class->register(
- parcel => "Lucy",
- class_name => "Lucy::Index::PostingListWriter",
- xs_code => $xs_code,
- bind_constructors => ["new"],
-);
+ Clownfish::CFC::Binding::Perl::Class->register(
+ parcel => "Lucy",
+ class_name => "Lucy::Index::PostingListWriter",
+ xs_code => $xs_code,
+ bind_constructors => ["new"],
+ );
}
sub bind_seglexicon {
- Clownfish::CFC::Binding::Perl::Class->register(
- parcel => "Lucy",
- class_name => "Lucy::Index::SegLexicon",
- bind_methods => [qw( Get_Term_Info Get_Field_Num )],
- bind_constructors => ["new"],
-);
+ Clownfish::CFC::Binding::Perl::Class->register(
+ parcel => "Lucy",
+ class_name => "Lucy::Index::SegLexicon",
+ bind_methods => [qw( Get_Term_Info Get_Field_Num )],
+ bind_constructors => ["new"],
+ );
}
sub bind_segpostinglist {
- Clownfish::CFC::Binding::Perl::Class->register(
- parcel => "Lucy",
- class_name => "Lucy::Index::SegPostingList",
- bind_methods => [qw( Get_Post_Stream Get_Count )],
- bind_constructors => ["new"],
-);
+ Clownfish::CFC::Binding::Perl::Class->register(
+ parcel => "Lucy",
+ class_name => "Lucy::Index::SegPostingList",
+ bind_methods => [qw( Get_Post_Stream Get_Count )],
+ bind_constructors => ["new"],
+ );
}
sub bind_segreader {
- my $synopsis = <<'END_SYNOPSIS';
+ my $synopsis = <<'END_SYNOPSIS';
my $polyreader = Lucy::Index::IndexReader->open(
index => '/path/to/index',
);
@@ -953,47 +952,47 @@ sub bind_segreader {
}
END_SYNOPSIS
-Clownfish::CFC::Binding::Perl::Class->register(
- parcel => "Lucy",
- class_name => "Lucy::Index::SegReader",
- bind_methods => [qw( Get_Seg_Name Get_Seg_Num Register )],
- bind_constructors => ["new"],
- make_pod => {
- synopsis => $synopsis,
- methods => [qw( Get_Seg_Name Get_Seg_Num )],
- },
-);
+ Clownfish::CFC::Binding::Perl::Class->register(
+ parcel => "Lucy",
+ class_name => "Lucy::Index::SegReader",
+ bind_methods => [qw( Get_Seg_Name Get_Seg_Num Register )],
+ bind_constructors => ["new"],
+ make_pod => {
+ synopsis => $synopsis,
+ methods => [qw( Get_Seg_Name Get_Seg_Num )],
+ },
+ );
}
sub bind_segwriter {
- Clownfish::CFC::Binding::Perl::Class->register(
- parcel => "Lucy",
- class_name => "Lucy::Index::SegWriter",
- bind_constructors => ["new"],
- bind_methods => [
- qw(
- Add_Writer
- Register
- Fetch
- )
- ],
- make_pod => {
- methods => [
+ Clownfish::CFC::Binding::Perl::Class->register(
+ parcel => "Lucy",
+ class_name => "Lucy::Index::SegWriter",
+ bind_constructors => ["new"],
+ bind_methods => [
qw(
- add_doc
- add_writer
- register
- fetch
+ Add_Writer
+ Register
+ Fetch
)
],
- }
-);
+ make_pod => {
+ methods => [
+ qw(
+ add_doc
+ add_writer
+ register
+ fetch
+ )
+ ],
+ }
+ );
}
sub bind_segment {
- my $synopsis = <<'END_SYNOPSIS';
+ my $synopsis = <<'END_SYNOPSIS';
# Index-time.
package MyDataWriter;
use base qw( Lucy::Index::DataWriter );
@@ -1025,47 +1024,47 @@ sub bind_segment {
}
END_SYNOPSIS
-Clownfish::CFC::Binding::Perl::Class->register(
- parcel => "Lucy",
- class_name => "Lucy::Index::Segment",
- bind_methods => [
- qw(
- Add_Field
- _store_metadata|Store_Metadata
- Fetch_Metadata
- Field_Num
- Field_Name
- Get_Name
- Get_Number
- Set_Count
- Get_Count
- Write_File
- Read_File
- )
- ],
- bind_constructors => ["new"],
- make_pod => {
- synopsis => $synopsis,
- methods => [
+ Clownfish::CFC::Binding::Perl::Class->register(
+ parcel => "Lucy",
+ class_name => "Lucy::Index::Segment",
+ bind_methods => [
qw(
- add_field
- store_metadata
- fetch_metadata
- field_num
- field_name
- get_name
- get_number
- set_count
- get_count
+ Add_Field
+ _store_metadata|Store_Metadata
+ Fetch_Metadata
+ Field_Num
+ Field_Name
+ Get_Name
+ Get_Number
+ Set_Count
+ Get_Count
+ Write_File
+ Read_File
)
],
- },
-);
+ bind_constructors => ["new"],
+ make_pod => {
+ synopsis => $synopsis,
+ methods => [
+ qw(
+ add_field
+ store_metadata
+ fetch_metadata
+ field_num
+ field_name
+ get_name
+ get_number
+ set_count
+ get_count
+ )
+ ],
+ },
+ );
}
sub bind_similarity {
- my $xs_code = <<'END_XS_CODE';
+ my $xs_code = <<'END_XS_CODE';
MODULE = Lucy PACKAGE = Lucy::Index::Similarity
SV*
@@ -1077,7 +1076,7 @@ CODE:
OUTPUT: RETVAL
END_XS_CODE
-my $synopsis = <<'END_SYNOPSIS';
+ my $synopsis = <<'END_SYNOPSIS';
package MySimilarity;
sub length_norm { return 1.0 } # disable length normalization
@@ -1088,81 +1087,81 @@ my $synopsis = <<'END_SYNOPSIS';
sub make_similarity { MySimilarity->new }
END_SYNOPSIS
-my $constructor = qq| my \$sim = Lucy::Index::Similarity->new;\n|;
+ my $constructor = qq| my \$sim = Lucy::Index::Similarity->new;\n|;
-Clownfish::CFC::Binding::Perl::Class->register(
- parcel => "Lucy",
- class_name => "Lucy::Index::Similarity",
- xs_code => $xs_code,
- bind_methods => [
- qw( IDF
- TF
- Encode_Norm
- Decode_Norm
- Query_Norm
- Length_Norm
- Coord )
- ],
- bind_constructors => ["new"],
- make_pod => {
- synopsis => $synopsis,
- constructor => { sample => $constructor },
- methods => [qw( length_norm )],
- }
-);
+ Clownfish::CFC::Binding::Perl::Class->register(
+ parcel => "Lucy",
+ class_name => "Lucy::Index::Similarity",
+ xs_code => $xs_code,
+ bind_methods => [
+ qw( IDF
+ TF
+ Encode_Norm
+ Decode_Norm
+ Query_Norm
+ Length_Norm
+ Coord )
+ ],
+ bind_constructors => ["new"],
+ make_pod => {
+ synopsis => $synopsis,
+ constructor => { sample => $constructor },
+ methods => [qw( length_norm )],
+ }
+ );
}
sub bind_snapshot {
- my $synopsis = <<'END_SYNOPSIS';
+ my $synopsis = <<'END_SYNOPSIS';
my $snapshot = Lucy::Index::Snapshot->new;
$snapshot->read_file( folder => $folder ); # load most recent snapshot
my $files = $snapshot->list;
print "$_\n" for @$files;
END_SYNOPSIS
-my $constructor = <<'END_CONSTRUCTOR';
+ my $constructor = <<'END_CONSTRUCTOR';
my $snapshot = Lucy::Index::Snapshot->new;
END_CONSTRUCTOR
-Clownfish::CFC::Binding::Perl::Class->register(
- parcel => "Lucy",
- class_name => "Lucy::Index::Snapshot",
- bind_methods => [
- qw(
- List
- Num_Entries
- Add_Entry
- Delete_Entry
- Read_File
- Write_File
- Set_Path
- Get_Path
- )
- ],
- bind_constructors => ["new"],
- make_pod => {
- synopsis => $synopsis,
- constructor => { sample => $constructor },
- methods => [
+ Clownfish::CFC::Binding::Perl::Class->register(
+ parcel => "Lucy",
+ class_name => "Lucy::Index::Snapshot",
+ bind_methods => [
qw(
- list
- num_entries
- add_entry
- delete_entry
- read_file
- write_file
- set_path
- get_path
+ List
+ Num_Entries
+ Add_Entry
+ Delete_Entry
+ Read_File
+ Write_File
+ Set_Path
+ Get_Path
)
],
- },
-);
+ bind_constructors => ["new"],
+ make_pod => {
+ synopsis => $synopsis,
+ constructor => { sample => $constructor },
+ methods => [
+ qw(
+ list
+ num_entries
+ add_entry
+ delete_entry
+ read_file
+ write_file
+ set_path
+ get_path
+ )
+ ],
+ },
+ );
}
sub bind_sortcache {
- my $xs_code = <<'END_XS_CODE';
+ my $xs_code = <<'END_XS_CODE';
MODULE = Lucy PACKAGE = Lucy::Index::SortCache
SV*
@@ -1189,32 +1188,32 @@ CODE:
OUTPUT: RETVAL
END_XS_CODE
-Clownfish::CFC::Binding::Perl::Class->register(
- parcel => "Lucy",
- class_name => "Lucy::Index::SortCache",
- xs_code => $xs_code,
- bind_methods => [qw( Ordinal Find )],
-);
+ Clownfish::CFC::Binding::Perl::Class->register(
+ parcel => "Lucy",
+ class_name => "Lucy::Index::SortCache",
+ xs_code => $xs_code,
+ bind_methods => [qw( Ordinal Find )],
+ );
}
sub bind_sortreader {
- Clownfish::CFC::Binding::Perl::Class->register(
- parcel => "Lucy",
- class_name => "Lucy::Index::SortReader",
- bind_constructors => ["new"],
- bind_methods => [qw( Fetch_Sort_Cache )],
-);
-Clownfish::CFC::Binding::Perl::Class->register(
- parcel => "Lucy",
- class_name => "Lucy::Index::DefaultSortReader",
- bind_constructors => ["new"],
-);
+ Clownfish::CFC::Binding::Perl::Class->register(
+ parcel => "Lucy",
+ class_name => "Lucy::Index::SortReader",
+ bind_constructors => ["new"],
+ bind_methods => [qw( Fetch_Sort_Cache )],
+ );
+ Clownfish::CFC::Binding::Perl::Class->register(
+ parcel => "Lucy",
+ class_name => "Lucy::Index::DefaultSortReader",
+ bind_constructors => ["new"],
+ );
}
sub bind_sortwriter {
- my $xs_code = <<'END_XS';
+ my $xs_code = <<'END_XS';
MODULE = Lucy PACKAGE = Lucy::Index::SortWriter
void
@@ -1224,50 +1223,50 @@ PPCODE:
lucy_SortWriter_set_default_mem_thresh(mem_thresh);
END_XS
-Clownfish::CFC::Binding::Perl::Class->register(
- parcel => "Lucy",
- class_name => "Lucy::Index::SortWriter",
- xs_code => $xs_code,
- bind_constructors => ["new"],
-);
+ Clownfish::CFC::Binding::Perl::Class->register(
+ parcel => "Lucy",
+ class_name => "Lucy::Index::SortWriter",
+ xs_code => $xs_code,
+ bind_constructors => ["new"],
+ );
}
sub bind_terminfo {
- Clownfish::CFC::Binding::Perl::Class->register(
- parcel => "Lucy",
- class_name => "Lucy::Index::TermInfo",
- bind_methods => [
- qw(
- Get_Doc_Freq
- Get_Lex_FilePos
- Get_Post_FilePos
- Get_Skip_FilePos
- Set_Doc_Freq
- Set_Lex_FilePos
- Set_Post_FilePos
- Set_Skip_FilePos
- Reset
- )
- ],
- bind_constructors => ["new"],
-);
+ Clownfish::CFC::Binding::Perl::Class->register(
+ parcel => "Lucy",
+ class_name => "Lucy::Index::TermInfo",
+ bind_methods => [
+ qw(
+ Get_Doc_Freq
+ Get_Lex_FilePos
+ Get_Post_FilePos
+ Get_Skip_FilePos
+ Set_Doc_Freq
+ Set_Lex_FilePos
+ Set_Post_FilePos
+ Set_Skip_FilePos
+ Reset
+ )
+ ],
+ bind_constructors => ["new"],
+ );
}
sub bind_termvector {
- Clownfish::CFC::Binding::Perl::Class->register(
- parcel => "Lucy",
- class_name => "Lucy::Index::TermVector",
- bind_constructors => ["new"],
- bind_methods => [
- qw(
- Get_Positions
- Get_Start_Offsets
- Get_End_Offsets
- )
- ],
-);
+ Clownfish::CFC::Binding::Perl::Class->register(
+ parcel => "Lucy",
+ class_name => "Lucy::Index::TermVector",
+ bind_constructors => ["new"],
+ bind_methods => [
+ qw(
+ Get_Positions
+ Get_Start_Offsets
+ Get_End_Offsets
+ )
+ ],
+ );
}
Modified: incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Index/Posting.pm
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Index/Posting.pm?rev=1232753&r1=1232752&r2=1232753&view=diff
==============================================================================
--- incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Index/Posting.pm (original)
+++ incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Index/Posting.pm Wed Jan 18 05:53:13 2012
@@ -14,16 +14,15 @@
# limitations under the License.
package Lucy::Build::Binding::Index::Posting;
-
sub bind_all {
- my $class = shift;
- $class->bind_matchposting;
- $class->bind_richposting;
- $class->bind_scoreposting;
+ my $class = shift;
+ $class->bind_matchposting;
+ $class->bind_richposting;
+ $class->bind_scoreposting;
}
sub bind_matchposting {
- my $synopsis = <<'END_SYNOPSIS';
+ my $synopsis = <<'END_SYNOPSIS';
# MatchPosting is used indirectly, by specifying in FieldType subclass.
package MySchema::Category;
use base qw( Lucy::Plan::FullTextType );
@@ -33,20 +32,20 @@ sub bind_matchposting {
}
END_SYNOPSIS
-Clownfish::CFC::Binding::Perl::Class->register(
- parcel => "Lucy",
- class_name => "Lucy::Index::Posting::MatchPosting",
- bind_constructors => ["new"],
- bind_methods => [qw( Get_Freq )],
-# make_pod => {
-# synopsis => $synopsis,
-# }
-);
+ Clownfish::CFC::Binding::Perl::Class->register(
+ parcel => "Lucy",
+ class_name => "Lucy::Index::Posting::MatchPosting",
+ bind_constructors => ["new"],
+ bind_methods => [qw( Get_Freq )],
+ # make_pod => {
+ # synopsis => $synopsis,
+ # }
+ );
}
sub bind_richposting {
- my $synopsis = <<'END_SYNOPSIS';
+ my $synopsis = <<'END_SYNOPSIS';
# RichPosting is used indirectly, by specifying in FieldType subclass.
package MySchema::Category;
use base qw( Lucy::Plan::FullTextType );
@@ -56,19 +55,19 @@ sub bind_richposting {
}
END_SYNOPSIS
-Clownfish::CFC::Binding::Perl::Class->register(
- parcel => "Lucy",
- class_name => "Lucy::Index::Posting::RichPosting",
- bind_constructors => ["new"],
-# make_pod => {
-# synopsis => $synopsis,
-# }
-);
+ Clownfish::CFC::Binding::Perl::Class->register(
+ parcel => "Lucy",
+ class_name => "Lucy::Index::Posting::RichPosting",
+ bind_constructors => ["new"],
+ # make_pod => {
+ # synopsis => $synopsis,
+ # }
+ );
}
sub bind_scoreposting {
- my $xs_code = <<'END_XS_CODE';
+ my $xs_code = <<'END_XS_CODE';
MODULE = Lucy PACKAGE = Lucy::Index::Posting::ScorePosting
SV*
@@ -90,7 +89,7 @@ CODE:
OUTPUT: RETVAL
END_XS_CODE
-my $synopsis = <<'END_SYNOPSIS';
+ my $synopsis = <<'END_SYNOPSIS';
# ScorePosting is used indirectly, by specifying in FieldType subclass.
package MySchema::Category;
use base qw( Lucy::Plan::FullTextType );
@@ -101,15 +100,15 @@ my $synopsis = <<'END_SYNOPSIS';
# }
END_SYNOPSIS
-Clownfish::CFC::Binding::Perl::Class->register(
- parcel => "Lucy",
- class_name => "Lucy::Index::Posting::ScorePosting",
- xs_code => $xs_code,
- bind_constructors => ["new"],
-# make_pod => {
-# synopsis => $synopsis,
-# }
-);
+ Clownfish::CFC::Binding::Perl::Class->register(
+ parcel => "Lucy",
+ class_name => "Lucy::Index::Posting::ScorePosting",
+ xs_code => $xs_code,
+ bind_constructors => ["new"],
+ # make_pod => {
+ # synopsis => $synopsis,
+ # }
+ );
}
Modified: incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Lucy.pm
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Lucy.pm?rev=1232753&r1=1232752&r2=1232753&view=diff
==============================================================================
--- incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Lucy.pm (original)
+++ incubator/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Lucy.pm Wed Jan 18 05:53:13 2012
@@ -14,15 +14,14 @@
# limitations under the License.
package Lucy::Build::Binding::Lucy;
-
sub bind_all {
- my $class = shift;
- $class->bind_lucy;
- $class->bind_test;
+ my $class = shift;
+ $class->bind_lucy;
+ $class->bind_test;
}
sub bind_lucy {
- my $xs_code = <<'END_XS_CODE';
+ my $xs_code = <<'END_XS_CODE';
MODULE = Lucy PACKAGE = Lucy
BOOT:
@@ -62,16 +61,16 @@ CODE:
OUTPUT: RETVAL
END_XS_CODE
-Clownfish::CFC::Binding::Perl::Class->register(
- parcel => "Lucy",
- class_name => "Lucy",
- xs_code => $xs_code,
-);
+ Clownfish::CFC::Binding::Perl::Class->register(
+ parcel => "Lucy",
+ class_name => "Lucy",
+ xs_code => $xs_code,
+ );
}
sub bind_test {
- my $xs_code = <<'END_XS_CODE';
+ my $xs_code = <<'END_XS_CODE';
MODULE = Lucy PACKAGE = Lucy::Test::TestUtils
SV*
@@ -301,17 +300,17 @@ PPCODE:
lucy_TestQPSyntax_run_tests(index);
END_XS_CODE
-Clownfish::CFC::Binding::Perl::Class->register(
- parcel => "Lucy",
- class_name => "Lucy::Test::TestSchema",
- bind_constructors => ["new"],
-);
-
-Clownfish::CFC::Binding::Perl::Class->register(
- parcel => "Lucy",
- class_name => "Lucy::Test",
- xs_code => $xs_code,
-);
+ Clownfish::CFC::Binding::Perl::Class->register(
+ parcel => "Lucy",
+ class_name => "Lucy::Test::TestSchema",
+ bind_constructors => ["new"],
+ );
+
+ Clownfish::CFC::Binding::Perl::Class->register(
+ parcel => "Lucy",
+ class_name => "Lucy::Test",
+ xs_code => $xs_code,
+ );
}
1;