Author: creamyg
Date: 2008-08-02 14:21:06 -0700 (Sat, 02 Aug 2008)
New Revision: 3693
Added:
trunk/c_src/KinoSearch/FieldSpec/
trunk/c_src/KinoSearch/FieldSpec/TextField.bp
trunk/c_src/KinoSearch/FieldSpec/TextField.c
trunk/perl/lib/KinoSearch/FieldSpec/TextField.pm
Modified:
trunk/c_src/KinoSearch/Schema.c
trunk/devel/benchmarks/indexers/BenchmarkingIndexer.pm
trunk/perl/MANIFEST
trunk/perl/lib/KSx/Search/LongFieldSim.pm
trunk/perl/lib/KinoSearch.pm
trunk/perl/lib/KinoSearch/Docs/FileFormat.pod
trunk/perl/lib/KinoSearch/FieldSpec/text.pm
trunk/perl/lib/KinoSearch/Posting/MatchPosting.pm
trunk/perl/lib/KinoSearch/Posting/RichPosting.pm
trunk/perl/lib/KinoSearch/Posting/ScorePosting.pm
trunk/perl/lib/KinoSearch/Schema.pm
trunk/perl/lib/KinoSearch/Schema/FieldSpec.pm
trunk/perl/sample/USConSchema.pm
trunk/perl/t/204-doc_reader.t
trunk/perl/t/214-spec_field.t
trunk/perl/t/216-schema.t
trunk/perl/t/217-multi_lexicon.t
trunk/perl/t/303-highlighter.t
trunk/perl/t/504-similarity.t
trunk/perl/t/510-remote_search.t
trunk/perl/t/511-sort_spec.t
trunk/perl/t/515-range_query.t
trunk/perl/t/602-boosts.t
trunk/perl/t/605-store_pos_boost.t
trunk/perl/t/607-queryparser_multi_field.t
trunk/perl/t/611-queryparser_syntax.t
Log:
Add TextField. Deprecate but don't remove KinoSearch::FieldSpec::text.
Added: trunk/c_src/KinoSearch/FieldSpec/TextField.bp
===================================================================
--- trunk/c_src/KinoSearch/FieldSpec/TextField.bp (rev 0)
+++ trunk/c_src/KinoSearch/FieldSpec/TextField.bp 2008-08-02 21:21:06 UTC (rev 3693)
@@ -0,0 +1,57 @@
+parcel KinoSearch cnick Kino;
+
+/** Default behaviors for text fields.
+ *
+ * KinoSearch::FieldSpec::TextField is an implementation of
+ * L<KinoSearch::FieldSpec> tuned for ease of use with text fields. It has
+ * the following properties:
+ *
+ * indexed TRUE
+ * stored TRUE
+ * analyzed TRUE
+ * vectorized TRUE
+ * binary FALSE
+ * compressed FALSE
+ *
+ * It is common to use this class as a base class and override one or more of
+ * those.
+ *
+ * Also, the Posting() method returns a
+ * L<ScorePosting|KinoSearch::Posting::ScorePosting> by default.
+ */
+class KinoSearch::FieldSpec::TextField extends KinoSearch::FieldSpec {
+
+ static TextField*
+ init(TextField *self);
+
+ static incremented TextField*
+ new();
+
+ public bool_t
+ Indexed(TextField *self);
+
+ public bool_t
+ Stored(TextField *self);
+
+ public bool_t
+ Analyzed(TextField *self);
+
+ public bool_t
+ Vectorized(TextField *self);
+
+ public bool_t
+ Binary(TextField *self);
+
+ public bool_t
+ Compressed(TextField *self);
+
+ public incremented ScorePosting*
+ Posting(TextField *self, Similarity *similarity);
+}
+
+/* Copyright 2007-2008 Marvin Humphrey
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * under the same terms as Perl itself.
+ */
+
Added: trunk/c_src/KinoSearch/FieldSpec/TextField.c
===================================================================
--- trunk/c_src/KinoSearch/FieldSpec/TextField.c (rev 0)
+++ trunk/c_src/KinoSearch/FieldSpec/TextField.c 2008-08-02 21:21:06 UTC (rev 3693)
@@ -0,0 +1,74 @@
+#include "KinoSearch/Util/ToolSet.h"
+
+#include "KinoSearch/FieldSpec/TextField.h"
+#include "KinoSearch/Posting/ScorePosting.h"
+#include "KinoSearch/Search/Similarity.h"
+
+TextField*
+TextField_new()
+{
+ TextField *self = (TextField*)CREATE(NULL, TEXTFIELD);
+ return TextField_init(self);
+}
+
+TextField*
+TextField_init(TextField *self)
+{
+ return (TextField*)FSpec_init((FieldSpec*)self);
+}
+
+bool_t
+TextField_indexed(TextField *self)
+{
+ UNUSED_VAR(self);
+ return true;
+}
+
+bool_t
+TextField_stored(TextField *self)
+{
+ UNUSED_VAR(self);
+ return true;
+}
+
+bool_t
+TextField_analyzed(TextField *self)
+{
+ UNUSED_VAR(self);
+ return true;
+}
+
+bool_t
+TextField_vectorized(TextField *self)
+{
+ UNUSED_VAR(self);
+ return true;
+}
+
+bool_t
+TextField_binary(TextField *self)
+{
+ UNUSED_VAR(self);
+ return false;
+}
+
+bool_t
+TextField_compressed(TextField *self)
+{
+ UNUSED_VAR(self);
+ return false;
+}
+
+ScorePosting*
+TextField_posting(TextField *self, Similarity *sim)
+{
+ UNUSED_VAR(self);
+ return ScorePost_new(sim);
+}
+
+/* Copyright 2007-2008 Marvin Humphrey
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * under the same terms as Perl itself.
+ */
+
Modified: trunk/c_src/KinoSearch/Schema.c
===================================================================
--- trunk/c_src/KinoSearch/Schema.c 2008-08-02 20:45:43 UTC (rev 3692)
+++ trunk/c_src/KinoSearch/Schema.c 2008-08-02 21:21:06 UTC (rev 3693)
@@ -63,7 +63,7 @@
}
if (fspec_class_is_lcword) {
if (CB_Equals_Str(field_spec_class, "text", 4)) {
- char *name = "KinoSearch::FieldSpec::text";
+ char *name = "KinoSearch::FieldSpec::TextField";
CB_Copy_Str(fs_class, name, strlen(name));
}
else {
Modified: trunk/devel/benchmarks/indexers/BenchmarkingIndexer.pm
===================================================================
--- trunk/devel/benchmarks/indexers/BenchmarkingIndexer.pm 2008-08-02 20:45:43 UTC (rev 3692)
+++ trunk/devel/benchmarks/indexers/BenchmarkingIndexer.pm 2008-08-02 21:21:06 UTC (rev 3693)
@@ -107,13 +107,13 @@
}
package BenchSchema::unstored;
-use base qw( KinoSearch::FieldSpec::text );
+use base qw( KinoSearch::FieldSpec::TextField );
sub vectorized {0}
sub stored {0}
package BenchSchema::unvectorized;
-use base qw( KinoSearch::FieldSpec::text );
+use base qw( KinoSearch::FieldSpec::TextField );
sub vectorized {0}
Modified: trunk/perl/MANIFEST
===================================================================
--- trunk/perl/MANIFEST 2008-08-02 20:45:43 UTC (rev 3692)
+++ trunk/perl/MANIFEST 2008-08-02 21:21:06 UTC (rev 3693)
@@ -70,6 +70,7 @@
lib/KinoSearch/Docs/Tutorial/Simple.pod
lib/KinoSearch/FieldSpec.pm
lib/KinoSearch/FieldSpec/text.pm
+lib/KinoSearch/FieldSpec/TextField.pm
lib/KinoSearch/Highlight/HeatMap.pm
lib/KinoSearch/Highlight/Highlighter.pm
lib/KinoSearch/Index/DelDocs.pm
Modified: trunk/perl/lib/KSx/Search/LongFieldSim.pm
===================================================================
--- trunk/perl/lib/KSx/Search/LongFieldSim.pm 2008-08-02 20:45:43 UTC (rev 3692)
+++ trunk/perl/lib/KSx/Search/LongFieldSim.pm 2008-08-02 21:21:06 UTC (rev 3693)
@@ -23,7 +23,7 @@
=head1 SYNOPSIS
package MySchema::body;
- use base qw( KinoSearch::FieldSpec::text );
+ use base qw( KinoSearch::FieldSpec::TextField );
use KSx::Search::LongFieldSim;
sub similarity { KSx::Search::LongFieldSim->new }
Modified: trunk/perl/lib/KinoSearch/Docs/FileFormat.pod
===================================================================
--- trunk/perl/lib/KinoSearch/Docs/FileFormat.pod 2008-08-02 20:45:43 UTC (rev 3692)
+++ trunk/perl/lib/KinoSearch/Docs/FileFormat.pod 2008-08-02 21:21:06 UTC (rev 3693)
@@ -113,7 +113,7 @@
files and you had two fields, only one of which was indexed...
package MySchema::UnIndexed;
- use base qw( KinoSearch::FieldSpec::text );
+ use base qw( KinoSearch::FieldSpec::TextField );
sub indexed {0}
sub analyzed {0}
Added: trunk/perl/lib/KinoSearch/FieldSpec/TextField.pm
===================================================================
--- trunk/perl/lib/KinoSearch/FieldSpec/TextField.pm (rev 0)
+++ trunk/perl/lib/KinoSearch/FieldSpec/TextField.pm 2008-08-02 21:21:06 UTC (rev 3693)
@@ -0,0 +1,50 @@
+use KinoSearch;
+
+1;
+
+__END__
+
+__AUTO_XS__
+
+my $synopsis = <<'END_SYNOPSIS';
+Arrange for your subclass of KinoSearch::Schema to load
+KinoSearch::FieldSpec::TextField via its alias, 'text'...
+
+ package MySchema;
+ use base qw( KinoSearch::Schema );
+
+ our %fields = (
+ title => 'text', # alias for KinoSearch::FieldSpec::TextField
+ content => 'text',
+ );
+
+... or define a custom subclass and use it instead:
+
+ package MySchema::UnAnalyzed;
+ use base qw( KinoSearch::FieldSpec::TextField )
+ sub analyzed { 0 }
+
+ package MySchema;
+ use base qw( KinoSearch::Schema );
+
+ our %fields = (
+ title => 'text',
+ url => 'MySchema::UnAnalyzed',
+ );
+END_SYNOPSIS
+
+{ "KinoSearch::FieldSpec::TextField" => {
+ make_constructors => ["new"],
+ make_pod => {
+ synopsis => $synopsis,
+ },
+ }
+}
+
+__COPYRIGHT__
+
+Copyright 2005-2008 Marvin Humphrey
+
+This program is free software; you can redistribute it and/or modify
+under the same terms as Perl itself.
+
Modified: trunk/perl/lib/KinoSearch/FieldSpec/text.pm
===================================================================
--- trunk/perl/lib/KinoSearch/FieldSpec/text.pm 2008-08-02 20:45:43 UTC (rev 3692)
+++ trunk/perl/lib/KinoSearch/FieldSpec/text.pm 2008-08-02 21:21:06 UTC (rev 3693)
@@ -8,53 +8,15 @@
=head1 NAME
-KinoSearch::FieldSpec::text - Default behaviors for text fields
+KinoSearch::FieldSpec::text - Deprecated. Use
+KinoSearch::FieldSpec::TextField instead.
-=head1 SYNOPSIS
-
-Arrange for your subclass of KinoSearch::Schema to load
-KinoSearch::FieldSpec::text via its alias, 'text'...
-
- package MySchema;
- use base qw( KinoSearch::Schema );
-
- our %fields = (
- title => 'text', # alias for KinoSearch::FieldSpec::text
- content => 'text',
- );
-
-... or define a custom subclass and use it instead:
-
- package MySchema::UnAnalyzed;
- use base qw( KinoSearch::FieldSpec::text )
- sub analyzed { 0 }
-
- package MySchema;
- use base qw( KinoSearch::Schema );
-
- our %fields = (
- title => 'text',
- url => 'MySchema::UnAnalyzed',
- );
-
=head1 DESCRIPTION
-KinoSearch::FieldSpec::text is an implementation of L<KinoSearch::FieldSpec>
-tuned for ease of use with text fields. It has the following properties:
+KinoSearch::FieldSpec::text has been replaced by
+L<KinoSearch::FieldSpec::TextField> and is retained only for backwards
+compatibility.
- indexed TRUE
- stored TRUE
- analyzed TRUE
- vectorized TRUE
- binary FALSE
- compressed FALSE
-
-It is common to use this class as a base class and override one or more of
-those.
-
-Also, the posting() method returns a
-L<ScorePosting|KinoSearch::Posting::ScorePosting> by default.
-
=head1 COPYRIGHT
Copyright 2005-2008 Marvin Humphrey
Modified: trunk/perl/lib/KinoSearch/Posting/MatchPosting.pm
===================================================================
--- trunk/perl/lib/KinoSearch/Posting/MatchPosting.pm 2008-08-02 20:45:43 UTC (rev 3692)
+++ trunk/perl/lib/KinoSearch/Posting/MatchPosting.pm 2008-08-02 21:21:06 UTC (rev 3693)
@@ -9,7 +9,7 @@
my $synopsis = <<'END_SYNOPSIS';
# MatchPosting is used indirectly, by specifying in FieldSpec subclass.
package MySchema::Category;
- use base qw( KinoSearch::FieldSpec::text );
+ use base qw( KinoSearch::FieldSpec::TextField );
sub posting {
my $self = shift;
return KinoSearch::Posting::MatchPosting->new(@_);
Modified: trunk/perl/lib/KinoSearch/Posting/RichPosting.pm
===================================================================
--- trunk/perl/lib/KinoSearch/Posting/RichPosting.pm 2008-08-02 20:45:43 UTC (rev 3692)
+++ trunk/perl/lib/KinoSearch/Posting/RichPosting.pm 2008-08-02 21:21:06 UTC (rev 3693)
@@ -9,7 +9,7 @@
my $synopsis = <<'END_SYNOPSIS';
# RichPosting is used indirectly, by specifying in FieldSpec subclass.
package MySchema::Category;
- use base qw( KinoSearch::FieldSpec::text );
+ use base qw( KinoSearch::FieldSpec::TextField );
sub posting {
my $self = shift;
return KinoSearch::Posting::RichPosting->new(@_);
Modified: trunk/perl/lib/KinoSearch/Posting/ScorePosting.pm
===================================================================
--- trunk/perl/lib/KinoSearch/Posting/ScorePosting.pm 2008-08-02 20:45:43 UTC (rev 3692)
+++ trunk/perl/lib/KinoSearch/Posting/ScorePosting.pm 2008-08-02 21:21:06 UTC (rev 3693)
@@ -9,7 +9,7 @@
my $synopsis = <<'END_SYNOPSIS';
# ScorePosting is used indirectly, by specifying in FieldSpec subclass.
package MySchema::Category;
- use base qw( KinoSearch::FieldSpec::text );
+ use base qw( KinoSearch::FieldSpec::TextField );
# (It's the default, so you don't need to spec it.)
# sub posting {
# my $self = shift;
Modified: trunk/perl/lib/KinoSearch/Schema/FieldSpec.pm
===================================================================
--- trunk/perl/lib/KinoSearch/Schema/FieldSpec.pm 2008-08-02 20:45:43 UTC (rev 3692)
+++ trunk/perl/lib/KinoSearch/Schema/FieldSpec.pm 2008-08-02 21:21:06 UTC (rev 3693)
@@ -14,7 +14,7 @@
=head1 DESCRIPTION
-This module has been deprecated in favor of KinoSearch::FieldSpec::text and
+This module has been deprecated in favor of KinoSearch::FieldSpec::TextField and
will be removed shortly.
=head1 COPYRIGHT
Modified: trunk/perl/lib/KinoSearch/Schema.pm
===================================================================
--- trunk/perl/lib/KinoSearch/Schema.pm 2008-08-02 20:45:43 UTC (rev 3692)
+++ trunk/perl/lib/KinoSearch/Schema.pm 2008-08-02 21:21:06 UTC (rev 3693)
@@ -126,11 +126,11 @@
=back
At present, there is only one natively supported type: C<text>. The FieldSpec
-subclass which determines its behavior is L<KinoSearch::FieldSpec::text>.
+subclass which determines its behavior is L<KinoSearch::FieldSpec::TextField>.
However, all lower-case-only names are reserved.
package UnAnalyzedField;
- use base qw( KinoSearch::FieldSpec::text );
+ use base qw( KinoSearch::FieldSpec::TextField );
sub analyzed { 0 }
package MySchema;
Modified: trunk/perl/lib/KinoSearch.pm
===================================================================
--- trunk/perl/lib/KinoSearch.pm 2008-08-02 20:45:43 UTC (rev 3692)
+++ trunk/perl/lib/KinoSearch.pm 2008-08-02 21:21:06 UTC (rev 3693)
@@ -317,28 +317,6 @@
}
{
- package KinoSearch::FieldSpec::text;
- BEGIN { our @ISA = 'KinoSearch::FieldSpec' }
- use KinoSearch::Util::ToolSet qw( confess a_isa_b );
-
- sub indexed {1}
- sub stored {1}
- sub analyzed {1}
- sub vectorized {1}
- sub binary {0}
- sub compressed {0}
-
- sub posting {
- shift;
- my %args = @_ == 1 ? ( similarity => $_[0] ) : (@_);
- confess("missing required argument 'similarity'")
- unless a_isa_b( $args{similarity},
- "KinoSearch::Search::Similarity" );
- return KinoSearch::Posting::ScorePosting->new(%args);
- }
-}
-
-{
package KinoSearch::Highlight::HeatMap;
use KinoSearch::Util::ToolSet qw( to_kino to_perl );
@@ -890,11 +868,11 @@
sub all_fields { shift->_all_fields->to_perl }
-}
+ package KinoSearch::FieldSpec::text;
+ BEGIN { our @ISA = qw( KinoSearch::FieldSpec::TextField ) }
-{
package KinoSearch::Schema::FieldSpec;
- BEGIN { our @ISA = qw( KinoSearch::FieldSpec::text ) }
+ BEGIN { our @ISA = qw( KinoSearch::FieldSpec::TextField ) }
}
{
Modified: trunk/perl/sample/USConSchema.pm
===================================================================
--- trunk/perl/sample/USConSchema.pm 2008-08-02 20:45:43 UTC (rev 3692)
+++ trunk/perl/sample/USConSchema.pm 2008-08-02 21:21:06 UTC (rev 3693)
@@ -2,7 +2,7 @@
use warnings;
package USConSchema::UnIndexedField;
-use base 'KinoSearch::FieldSpec::text';
+use base 'KinoSearch::FieldSpec::TextField';
sub indexed {0}
package USConSchema;
Modified: trunk/perl/t/204-doc_reader.t
===================================================================
--- trunk/perl/t/204-doc_reader.t 2008-08-02 20:45:43 UTC (rev 3692)
+++ trunk/perl/t/204-doc_reader.t 2008-08-02 21:21:06 UTC (rev 3693)
@@ -8,23 +8,23 @@
sub transform { $_[1] }
package MySchema::textcomp;
-use base qw( KinoSearch::FieldSpec::text );
+use base qw( KinoSearch::FieldSpec::TextField );
sub compressed {1}
package MySchema::bin;
-use base qw( KinoSearch::FieldSpec::text );
+use base qw( KinoSearch::FieldSpec::TextField );
sub binary {1}
package MySchema::bincomp;
-use base qw( KinoSearch::FieldSpec::text );
+use base qw( KinoSearch::FieldSpec::TextField );
sub binary {1}
sub compressed {1}
package MySchema::unstored;
-use base qw( KinoSearch::FieldSpec::text );
+use base qw( KinoSearch::FieldSpec::TextField );
sub stored {0}
Modified: trunk/perl/t/214-spec_field.t
===================================================================
--- trunk/perl/t/214-spec_field.t 2008-08-02 20:45:43 UTC (rev 3692)
+++ trunk/perl/t/214-spec_field.t 2008-08-02 21:21:06 UTC (rev 3693)
@@ -2,24 +2,24 @@
use warnings;
package MySchema::analyzed;
-use base qw( KinoSearch::FieldSpec::text );
+use base qw( KinoSearch::FieldSpec::TextField );
package MySchema::polyanalyzed;
-use base qw( KinoSearch::FieldSpec::text );
+use base qw( KinoSearch::FieldSpec::TextField );
use KinoSearch::Analysis::PolyAnalyzer;
sub analyzer { KinoSearch::Analysis::PolyAnalyzer->new( language => 'en' ) }
package MySchema::unanalyzed;
-use base qw( KinoSearch::FieldSpec::text );
+use base qw( KinoSearch::FieldSpec::TextField );
sub analyzed {0}
sub analyzer { die "shouldn't get an analyzer for unanalyzed field" }
package MySchema::unindexedbutanalyzed;
-use base qw( KinoSearch::FieldSpec::text );
+use base qw( KinoSearch::FieldSpec::TextField );
sub indexed {0}
package MySchema::unanalyzedunindexed;
-use base qw( KinoSearch::FieldSpec::text );
+use base qw( KinoSearch::FieldSpec::TextField );
sub indexed {0}
sub analyzed {0}
Modified: trunk/perl/t/216-schema.t
===================================================================
--- trunk/perl/t/216-schema.t 2008-08-02 20:45:43 UTC (rev 3692)
+++ trunk/perl/t/216-schema.t 2008-08-02 21:21:06 UTC (rev 3693)
@@ -3,7 +3,7 @@
use lib 'buildlib';
package lowcaseonly;
-use base qw( KinoSearch::FieldSpec::text );
+use base qw( KinoSearch::FieldSpec::TextField );
package NoFieldsSchema;
use base qw( KinoSearch::Schema );
Modified: trunk/perl/t/217-multi_lexicon.t
===================================================================
--- trunk/perl/t/217-multi_lexicon.t 2008-08-02 20:45:43 UTC (rev 3692)
+++ trunk/perl/t/217-multi_lexicon.t 2008-08-02 21:21:06 UTC (rev 3693)
@@ -6,7 +6,7 @@
use warnings;
package MySchema::UnAnalyzed;
-use base qw( KinoSearch::FieldSpec::text );
+use base qw( KinoSearch::FieldSpec::TextField );
sub analyzed {0}
package MySchema;
Modified: trunk/perl/t/303-highlighter.t
===================================================================
--- trunk/perl/t/303-highlighter.t 2008-08-02 20:45:43 UTC (rev 3692)
+++ trunk/perl/t/303-highlighter.t 2008-08-02 21:21:06 UTC (rev 3693)
@@ -3,7 +3,7 @@
use lib 'buildlib';
package MySchema::alt;
-use base qw( KinoSearch::FieldSpec::text );
+use base qw( KinoSearch::FieldSpec::TextField );
sub boost {0.1}
package MySchema;
Modified: trunk/perl/t/504-similarity.t
===================================================================
--- trunk/perl/t/504-similarity.t 2008-08-02 20:45:43 UTC (rev 3692)
+++ trunk/perl/t/504-similarity.t 2008-08-02 21:21:06 UTC (rev 3693)
@@ -2,7 +2,7 @@
use warnings;
package MySchema::LongField;
-use base qw( KinoSearch::FieldSpec::text );
+use base qw( KinoSearch::FieldSpec::TextField );
use KSx::Search::LongFieldSim;
sub similarity { KSx::Search::LongFieldSim->new }
Modified: trunk/perl/t/510-remote_search.t
===================================================================
--- trunk/perl/t/510-remote_search.t 2008-08-02 20:45:43 UTC (rev 3692)
+++ trunk/perl/t/510-remote_search.t 2008-08-02 21:21:06 UTC (rev 3693)
@@ -17,7 +17,7 @@
}
package SortSchema::UnAnalyzed;
-use base qw( KinoSearch::FieldSpec::text );
+use base qw( KinoSearch::FieldSpec::TextField );
sub analyzed {0}
package SortSchema;
Modified: trunk/perl/t/511-sort_spec.t
===================================================================
--- trunk/perl/t/511-sort_spec.t 2008-08-02 20:45:43 UTC (rev 3692)
+++ trunk/perl/t/511-sort_spec.t 2008-08-02 21:21:06 UTC (rev 3693)
@@ -6,7 +6,7 @@
use List::Util qw( shuffle );
package SortSchema::UnAnalyzed;
-use base qw( KinoSearch::FieldSpec::text );
+use base qw( KinoSearch::FieldSpec::TextField );
sub analyzed {0}
package SortSchema;
Modified: trunk/perl/t/515-range_query.t
===================================================================
--- trunk/perl/t/515-range_query.t 2008-08-02 20:45:43 UTC (rev 3692)
+++ trunk/perl/t/515-range_query.t 2008-08-02 21:21:06 UTC (rev 3693)
@@ -6,7 +6,7 @@
use List::Util qw( shuffle );
package RangeSchema::UnAnalyzed;
-use base qw( KinoSearch::FieldSpec::text );
+use base qw( KinoSearch::FieldSpec::TextField );
sub analyzed {0}
package RangeSchema;
Modified: trunk/perl/t/602-boosts.t
===================================================================
--- trunk/perl/t/602-boosts.t 2008-08-02 20:45:43 UTC (rev 3692)
+++ trunk/perl/t/602-boosts.t 2008-08-02 21:21:06 UTC (rev 3693)
@@ -14,7 +14,7 @@
sub analyzer { KinoSearch::Analysis::Tokenizer->new }
package BoostedField;
-use base qw( KinoSearch::FieldSpec::text );
+use base qw( KinoSearch::FieldSpec::TextField );
sub boost {100}
package BoostedFieldSchema;
Modified: trunk/perl/t/605-store_pos_boost.t
===================================================================
--- trunk/perl/t/605-store_pos_boost.t 2008-08-02 20:45:43 UTC (rev 3692)
+++ trunk/perl/t/605-store_pos_boost.t 2008-08-02 21:21:06 UTC (rev 3693)
@@ -36,7 +36,7 @@
}
package MySchema::boosted;
-use base qw( KinoSearch::FieldSpec::text );
+use base qw( KinoSearch::FieldSpec::TextField );
use KinoSearch::Posting::RichPosting;
sub posting {
Modified: trunk/perl/t/607-queryparser_multi_field.t
===================================================================
--- trunk/perl/t/607-queryparser_multi_field.t 2008-08-02 20:45:43 UTC (rev 3692)
+++ trunk/perl/t/607-queryparser_multi_field.t 2008-08-02 21:21:06 UTC (rev 3693)
@@ -3,7 +3,7 @@
use lib 'buildlib';
package UnAnalyzed;
-use base qw( KinoSearch::FieldSpec::text );
+use base qw( KinoSearch::FieldSpec::TextField );
sub analyzed {0}
Modified: trunk/perl/t/611-queryparser_syntax.t
===================================================================
--- trunk/perl/t/611-queryparser_syntax.t 2008-08-02 20:45:43 UTC (rev 3692)
+++ trunk/perl/t/611-queryparser_syntax.t 2008-08-02 21:21:06 UTC (rev 3693)
@@ -3,7 +3,7 @@
use lib 'buildlib';
package FancyField;
-use base qw( KinoSearch::FieldSpec::text );
+use base qw( KinoSearch::FieldSpec::TextField );
use KinoSearch::Analysis::PolyAnalyzer;
use KinoSearch::Analysis::Tokenizer;
use KinoSearch::Analysis::Stopalizer;
_______________________________________________
kinosearch-commits mailing list
kinosearch-commits@rectangular.com
http://www.rectangular.com/mailman/listinfo/kinosearch-commits
Date: 2008-08-02 14:21:06 -0700 (Sat, 02 Aug 2008)
New Revision: 3693
Added:
trunk/c_src/KinoSearch/FieldSpec/
trunk/c_src/KinoSearch/FieldSpec/TextField.bp
trunk/c_src/KinoSearch/FieldSpec/TextField.c
trunk/perl/lib/KinoSearch/FieldSpec/TextField.pm
Modified:
trunk/c_src/KinoSearch/Schema.c
trunk/devel/benchmarks/indexers/BenchmarkingIndexer.pm
trunk/perl/MANIFEST
trunk/perl/lib/KSx/Search/LongFieldSim.pm
trunk/perl/lib/KinoSearch.pm
trunk/perl/lib/KinoSearch/Docs/FileFormat.pod
trunk/perl/lib/KinoSearch/FieldSpec/text.pm
trunk/perl/lib/KinoSearch/Posting/MatchPosting.pm
trunk/perl/lib/KinoSearch/Posting/RichPosting.pm
trunk/perl/lib/KinoSearch/Posting/ScorePosting.pm
trunk/perl/lib/KinoSearch/Schema.pm
trunk/perl/lib/KinoSearch/Schema/FieldSpec.pm
trunk/perl/sample/USConSchema.pm
trunk/perl/t/204-doc_reader.t
trunk/perl/t/214-spec_field.t
trunk/perl/t/216-schema.t
trunk/perl/t/217-multi_lexicon.t
trunk/perl/t/303-highlighter.t
trunk/perl/t/504-similarity.t
trunk/perl/t/510-remote_search.t
trunk/perl/t/511-sort_spec.t
trunk/perl/t/515-range_query.t
trunk/perl/t/602-boosts.t
trunk/perl/t/605-store_pos_boost.t
trunk/perl/t/607-queryparser_multi_field.t
trunk/perl/t/611-queryparser_syntax.t
Log:
Add TextField. Deprecate but don't remove KinoSearch::FieldSpec::text.
Added: trunk/c_src/KinoSearch/FieldSpec/TextField.bp
===================================================================
--- trunk/c_src/KinoSearch/FieldSpec/TextField.bp (rev 0)
+++ trunk/c_src/KinoSearch/FieldSpec/TextField.bp 2008-08-02 21:21:06 UTC (rev 3693)
@@ -0,0 +1,57 @@
+parcel KinoSearch cnick Kino;
+
+/** Default behaviors for text fields.
+ *
+ * KinoSearch::FieldSpec::TextField is an implementation of
+ * L<KinoSearch::FieldSpec> tuned for ease of use with text fields. It has
+ * the following properties:
+ *
+ * indexed TRUE
+ * stored TRUE
+ * analyzed TRUE
+ * vectorized TRUE
+ * binary FALSE
+ * compressed FALSE
+ *
+ * It is common to use this class as a base class and override one or more of
+ * those.
+ *
+ * Also, the Posting() method returns a
+ * L<ScorePosting|KinoSearch::Posting::ScorePosting> by default.
+ */
+class KinoSearch::FieldSpec::TextField extends KinoSearch::FieldSpec {
+
+ static TextField*
+ init(TextField *self);
+
+ static incremented TextField*
+ new();
+
+ public bool_t
+ Indexed(TextField *self);
+
+ public bool_t
+ Stored(TextField *self);
+
+ public bool_t
+ Analyzed(TextField *self);
+
+ public bool_t
+ Vectorized(TextField *self);
+
+ public bool_t
+ Binary(TextField *self);
+
+ public bool_t
+ Compressed(TextField *self);
+
+ public incremented ScorePosting*
+ Posting(TextField *self, Similarity *similarity);
+}
+
+/* Copyright 2007-2008 Marvin Humphrey
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * under the same terms as Perl itself.
+ */
+
Added: trunk/c_src/KinoSearch/FieldSpec/TextField.c
===================================================================
--- trunk/c_src/KinoSearch/FieldSpec/TextField.c (rev 0)
+++ trunk/c_src/KinoSearch/FieldSpec/TextField.c 2008-08-02 21:21:06 UTC (rev 3693)
@@ -0,0 +1,74 @@
+#include "KinoSearch/Util/ToolSet.h"
+
+#include "KinoSearch/FieldSpec/TextField.h"
+#include "KinoSearch/Posting/ScorePosting.h"
+#include "KinoSearch/Search/Similarity.h"
+
+TextField*
+TextField_new()
+{
+ TextField *self = (TextField*)CREATE(NULL, TEXTFIELD);
+ return TextField_init(self);
+}
+
+TextField*
+TextField_init(TextField *self)
+{
+ return (TextField*)FSpec_init((FieldSpec*)self);
+}
+
+bool_t
+TextField_indexed(TextField *self)
+{
+ UNUSED_VAR(self);
+ return true;
+}
+
+bool_t
+TextField_stored(TextField *self)
+{
+ UNUSED_VAR(self);
+ return true;
+}
+
+bool_t
+TextField_analyzed(TextField *self)
+{
+ UNUSED_VAR(self);
+ return true;
+}
+
+bool_t
+TextField_vectorized(TextField *self)
+{
+ UNUSED_VAR(self);
+ return true;
+}
+
+bool_t
+TextField_binary(TextField *self)
+{
+ UNUSED_VAR(self);
+ return false;
+}
+
+bool_t
+TextField_compressed(TextField *self)
+{
+ UNUSED_VAR(self);
+ return false;
+}
+
+ScorePosting*
+TextField_posting(TextField *self, Similarity *sim)
+{
+ UNUSED_VAR(self);
+ return ScorePost_new(sim);
+}
+
+/* Copyright 2007-2008 Marvin Humphrey
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * under the same terms as Perl itself.
+ */
+
Modified: trunk/c_src/KinoSearch/Schema.c
===================================================================
--- trunk/c_src/KinoSearch/Schema.c 2008-08-02 20:45:43 UTC (rev 3692)
+++ trunk/c_src/KinoSearch/Schema.c 2008-08-02 21:21:06 UTC (rev 3693)
@@ -63,7 +63,7 @@
}
if (fspec_class_is_lcword) {
if (CB_Equals_Str(field_spec_class, "text", 4)) {
- char *name = "KinoSearch::FieldSpec::text";
+ char *name = "KinoSearch::FieldSpec::TextField";
CB_Copy_Str(fs_class, name, strlen(name));
}
else {
Modified: trunk/devel/benchmarks/indexers/BenchmarkingIndexer.pm
===================================================================
--- trunk/devel/benchmarks/indexers/BenchmarkingIndexer.pm 2008-08-02 20:45:43 UTC (rev 3692)
+++ trunk/devel/benchmarks/indexers/BenchmarkingIndexer.pm 2008-08-02 21:21:06 UTC (rev 3693)
@@ -107,13 +107,13 @@
}
package BenchSchema::unstored;
-use base qw( KinoSearch::FieldSpec::text );
+use base qw( KinoSearch::FieldSpec::TextField );
sub vectorized {0}
sub stored {0}
package BenchSchema::unvectorized;
-use base qw( KinoSearch::FieldSpec::text );
+use base qw( KinoSearch::FieldSpec::TextField );
sub vectorized {0}
Modified: trunk/perl/MANIFEST
===================================================================
--- trunk/perl/MANIFEST 2008-08-02 20:45:43 UTC (rev 3692)
+++ trunk/perl/MANIFEST 2008-08-02 21:21:06 UTC (rev 3693)
@@ -70,6 +70,7 @@
lib/KinoSearch/Docs/Tutorial/Simple.pod
lib/KinoSearch/FieldSpec.pm
lib/KinoSearch/FieldSpec/text.pm
+lib/KinoSearch/FieldSpec/TextField.pm
lib/KinoSearch/Highlight/HeatMap.pm
lib/KinoSearch/Highlight/Highlighter.pm
lib/KinoSearch/Index/DelDocs.pm
Modified: trunk/perl/lib/KSx/Search/LongFieldSim.pm
===================================================================
--- trunk/perl/lib/KSx/Search/LongFieldSim.pm 2008-08-02 20:45:43 UTC (rev 3692)
+++ trunk/perl/lib/KSx/Search/LongFieldSim.pm 2008-08-02 21:21:06 UTC (rev 3693)
@@ -23,7 +23,7 @@
=head1 SYNOPSIS
package MySchema::body;
- use base qw( KinoSearch::FieldSpec::text );
+ use base qw( KinoSearch::FieldSpec::TextField );
use KSx::Search::LongFieldSim;
sub similarity { KSx::Search::LongFieldSim->new }
Modified: trunk/perl/lib/KinoSearch/Docs/FileFormat.pod
===================================================================
--- trunk/perl/lib/KinoSearch/Docs/FileFormat.pod 2008-08-02 20:45:43 UTC (rev 3692)
+++ trunk/perl/lib/KinoSearch/Docs/FileFormat.pod 2008-08-02 21:21:06 UTC (rev 3693)
@@ -113,7 +113,7 @@
files and you had two fields, only one of which was indexed...
package MySchema::UnIndexed;
- use base qw( KinoSearch::FieldSpec::text );
+ use base qw( KinoSearch::FieldSpec::TextField );
sub indexed {0}
sub analyzed {0}
Added: trunk/perl/lib/KinoSearch/FieldSpec/TextField.pm
===================================================================
--- trunk/perl/lib/KinoSearch/FieldSpec/TextField.pm (rev 0)
+++ trunk/perl/lib/KinoSearch/FieldSpec/TextField.pm 2008-08-02 21:21:06 UTC (rev 3693)
@@ -0,0 +1,50 @@
+use KinoSearch;
+
+1;
+
+__END__
+
+__AUTO_XS__
+
+my $synopsis = <<'END_SYNOPSIS';
+Arrange for your subclass of KinoSearch::Schema to load
+KinoSearch::FieldSpec::TextField via its alias, 'text'...
+
+ package MySchema;
+ use base qw( KinoSearch::Schema );
+
+ our %fields = (
+ title => 'text', # alias for KinoSearch::FieldSpec::TextField
+ content => 'text',
+ );
+
+... or define a custom subclass and use it instead:
+
+ package MySchema::UnAnalyzed;
+ use base qw( KinoSearch::FieldSpec::TextField )
+ sub analyzed { 0 }
+
+ package MySchema;
+ use base qw( KinoSearch::Schema );
+
+ our %fields = (
+ title => 'text',
+ url => 'MySchema::UnAnalyzed',
+ );
+END_SYNOPSIS
+
+{ "KinoSearch::FieldSpec::TextField" => {
+ make_constructors => ["new"],
+ make_pod => {
+ synopsis => $synopsis,
+ },
+ }
+}
+
+__COPYRIGHT__
+
+Copyright 2005-2008 Marvin Humphrey
+
+This program is free software; you can redistribute it and/or modify
+under the same terms as Perl itself.
+
Modified: trunk/perl/lib/KinoSearch/FieldSpec/text.pm
===================================================================
--- trunk/perl/lib/KinoSearch/FieldSpec/text.pm 2008-08-02 20:45:43 UTC (rev 3692)
+++ trunk/perl/lib/KinoSearch/FieldSpec/text.pm 2008-08-02 21:21:06 UTC (rev 3693)
@@ -8,53 +8,15 @@
=head1 NAME
-KinoSearch::FieldSpec::text - Default behaviors for text fields
+KinoSearch::FieldSpec::text - Deprecated. Use
+KinoSearch::FieldSpec::TextField instead.
-=head1 SYNOPSIS
-
-Arrange for your subclass of KinoSearch::Schema to load
-KinoSearch::FieldSpec::text via its alias, 'text'...
-
- package MySchema;
- use base qw( KinoSearch::Schema );
-
- our %fields = (
- title => 'text', # alias for KinoSearch::FieldSpec::text
- content => 'text',
- );
-
-... or define a custom subclass and use it instead:
-
- package MySchema::UnAnalyzed;
- use base qw( KinoSearch::FieldSpec::text )
- sub analyzed { 0 }
-
- package MySchema;
- use base qw( KinoSearch::Schema );
-
- our %fields = (
- title => 'text',
- url => 'MySchema::UnAnalyzed',
- );
-
=head1 DESCRIPTION
-KinoSearch::FieldSpec::text is an implementation of L<KinoSearch::FieldSpec>
-tuned for ease of use with text fields. It has the following properties:
+KinoSearch::FieldSpec::text has been replaced by
+L<KinoSearch::FieldSpec::TextField> and is retained only for backwards
+compatibility.
- indexed TRUE
- stored TRUE
- analyzed TRUE
- vectorized TRUE
- binary FALSE
- compressed FALSE
-
-It is common to use this class as a base class and override one or more of
-those.
-
-Also, the posting() method returns a
-L<ScorePosting|KinoSearch::Posting::ScorePosting> by default.
-
=head1 COPYRIGHT
Copyright 2005-2008 Marvin Humphrey
Modified: trunk/perl/lib/KinoSearch/Posting/MatchPosting.pm
===================================================================
--- trunk/perl/lib/KinoSearch/Posting/MatchPosting.pm 2008-08-02 20:45:43 UTC (rev 3692)
+++ trunk/perl/lib/KinoSearch/Posting/MatchPosting.pm 2008-08-02 21:21:06 UTC (rev 3693)
@@ -9,7 +9,7 @@
my $synopsis = <<'END_SYNOPSIS';
# MatchPosting is used indirectly, by specifying in FieldSpec subclass.
package MySchema::Category;
- use base qw( KinoSearch::FieldSpec::text );
+ use base qw( KinoSearch::FieldSpec::TextField );
sub posting {
my $self = shift;
return KinoSearch::Posting::MatchPosting->new(@_);
Modified: trunk/perl/lib/KinoSearch/Posting/RichPosting.pm
===================================================================
--- trunk/perl/lib/KinoSearch/Posting/RichPosting.pm 2008-08-02 20:45:43 UTC (rev 3692)
+++ trunk/perl/lib/KinoSearch/Posting/RichPosting.pm 2008-08-02 21:21:06 UTC (rev 3693)
@@ -9,7 +9,7 @@
my $synopsis = <<'END_SYNOPSIS';
# RichPosting is used indirectly, by specifying in FieldSpec subclass.
package MySchema::Category;
- use base qw( KinoSearch::FieldSpec::text );
+ use base qw( KinoSearch::FieldSpec::TextField );
sub posting {
my $self = shift;
return KinoSearch::Posting::RichPosting->new(@_);
Modified: trunk/perl/lib/KinoSearch/Posting/ScorePosting.pm
===================================================================
--- trunk/perl/lib/KinoSearch/Posting/ScorePosting.pm 2008-08-02 20:45:43 UTC (rev 3692)
+++ trunk/perl/lib/KinoSearch/Posting/ScorePosting.pm 2008-08-02 21:21:06 UTC (rev 3693)
@@ -9,7 +9,7 @@
my $synopsis = <<'END_SYNOPSIS';
# ScorePosting is used indirectly, by specifying in FieldSpec subclass.
package MySchema::Category;
- use base qw( KinoSearch::FieldSpec::text );
+ use base qw( KinoSearch::FieldSpec::TextField );
# (It's the default, so you don't need to spec it.)
# sub posting {
# my $self = shift;
Modified: trunk/perl/lib/KinoSearch/Schema/FieldSpec.pm
===================================================================
--- trunk/perl/lib/KinoSearch/Schema/FieldSpec.pm 2008-08-02 20:45:43 UTC (rev 3692)
+++ trunk/perl/lib/KinoSearch/Schema/FieldSpec.pm 2008-08-02 21:21:06 UTC (rev 3693)
@@ -14,7 +14,7 @@
=head1 DESCRIPTION
-This module has been deprecated in favor of KinoSearch::FieldSpec::text and
+This module has been deprecated in favor of KinoSearch::FieldSpec::TextField and
will be removed shortly.
=head1 COPYRIGHT
Modified: trunk/perl/lib/KinoSearch/Schema.pm
===================================================================
--- trunk/perl/lib/KinoSearch/Schema.pm 2008-08-02 20:45:43 UTC (rev 3692)
+++ trunk/perl/lib/KinoSearch/Schema.pm 2008-08-02 21:21:06 UTC (rev 3693)
@@ -126,11 +126,11 @@
=back
At present, there is only one natively supported type: C<text>. The FieldSpec
-subclass which determines its behavior is L<KinoSearch::FieldSpec::text>.
+subclass which determines its behavior is L<KinoSearch::FieldSpec::TextField>.
However, all lower-case-only names are reserved.
package UnAnalyzedField;
- use base qw( KinoSearch::FieldSpec::text );
+ use base qw( KinoSearch::FieldSpec::TextField );
sub analyzed { 0 }
package MySchema;
Modified: trunk/perl/lib/KinoSearch.pm
===================================================================
--- trunk/perl/lib/KinoSearch.pm 2008-08-02 20:45:43 UTC (rev 3692)
+++ trunk/perl/lib/KinoSearch.pm 2008-08-02 21:21:06 UTC (rev 3693)
@@ -317,28 +317,6 @@
}
{
- package KinoSearch::FieldSpec::text;
- BEGIN { our @ISA = 'KinoSearch::FieldSpec' }
- use KinoSearch::Util::ToolSet qw( confess a_isa_b );
-
- sub indexed {1}
- sub stored {1}
- sub analyzed {1}
- sub vectorized {1}
- sub binary {0}
- sub compressed {0}
-
- sub posting {
- shift;
- my %args = @_ == 1 ? ( similarity => $_[0] ) : (@_);
- confess("missing required argument 'similarity'")
- unless a_isa_b( $args{similarity},
- "KinoSearch::Search::Similarity" );
- return KinoSearch::Posting::ScorePosting->new(%args);
- }
-}
-
-{
package KinoSearch::Highlight::HeatMap;
use KinoSearch::Util::ToolSet qw( to_kino to_perl );
@@ -890,11 +868,11 @@
sub all_fields { shift->_all_fields->to_perl }
-}
+ package KinoSearch::FieldSpec::text;
+ BEGIN { our @ISA = qw( KinoSearch::FieldSpec::TextField ) }
-{
package KinoSearch::Schema::FieldSpec;
- BEGIN { our @ISA = qw( KinoSearch::FieldSpec::text ) }
+ BEGIN { our @ISA = qw( KinoSearch::FieldSpec::TextField ) }
}
{
Modified: trunk/perl/sample/USConSchema.pm
===================================================================
--- trunk/perl/sample/USConSchema.pm 2008-08-02 20:45:43 UTC (rev 3692)
+++ trunk/perl/sample/USConSchema.pm 2008-08-02 21:21:06 UTC (rev 3693)
@@ -2,7 +2,7 @@
use warnings;
package USConSchema::UnIndexedField;
-use base 'KinoSearch::FieldSpec::text';
+use base 'KinoSearch::FieldSpec::TextField';
sub indexed {0}
package USConSchema;
Modified: trunk/perl/t/204-doc_reader.t
===================================================================
--- trunk/perl/t/204-doc_reader.t 2008-08-02 20:45:43 UTC (rev 3692)
+++ trunk/perl/t/204-doc_reader.t 2008-08-02 21:21:06 UTC (rev 3693)
@@ -8,23 +8,23 @@
sub transform { $_[1] }
package MySchema::textcomp;
-use base qw( KinoSearch::FieldSpec::text );
+use base qw( KinoSearch::FieldSpec::TextField );
sub compressed {1}
package MySchema::bin;
-use base qw( KinoSearch::FieldSpec::text );
+use base qw( KinoSearch::FieldSpec::TextField );
sub binary {1}
package MySchema::bincomp;
-use base qw( KinoSearch::FieldSpec::text );
+use base qw( KinoSearch::FieldSpec::TextField );
sub binary {1}
sub compressed {1}
package MySchema::unstored;
-use base qw( KinoSearch::FieldSpec::text );
+use base qw( KinoSearch::FieldSpec::TextField );
sub stored {0}
Modified: trunk/perl/t/214-spec_field.t
===================================================================
--- trunk/perl/t/214-spec_field.t 2008-08-02 20:45:43 UTC (rev 3692)
+++ trunk/perl/t/214-spec_field.t 2008-08-02 21:21:06 UTC (rev 3693)
@@ -2,24 +2,24 @@
use warnings;
package MySchema::analyzed;
-use base qw( KinoSearch::FieldSpec::text );
+use base qw( KinoSearch::FieldSpec::TextField );
package MySchema::polyanalyzed;
-use base qw( KinoSearch::FieldSpec::text );
+use base qw( KinoSearch::FieldSpec::TextField );
use KinoSearch::Analysis::PolyAnalyzer;
sub analyzer { KinoSearch::Analysis::PolyAnalyzer->new( language => 'en' ) }
package MySchema::unanalyzed;
-use base qw( KinoSearch::FieldSpec::text );
+use base qw( KinoSearch::FieldSpec::TextField );
sub analyzed {0}
sub analyzer { die "shouldn't get an analyzer for unanalyzed field" }
package MySchema::unindexedbutanalyzed;
-use base qw( KinoSearch::FieldSpec::text );
+use base qw( KinoSearch::FieldSpec::TextField );
sub indexed {0}
package MySchema::unanalyzedunindexed;
-use base qw( KinoSearch::FieldSpec::text );
+use base qw( KinoSearch::FieldSpec::TextField );
sub indexed {0}
sub analyzed {0}
Modified: trunk/perl/t/216-schema.t
===================================================================
--- trunk/perl/t/216-schema.t 2008-08-02 20:45:43 UTC (rev 3692)
+++ trunk/perl/t/216-schema.t 2008-08-02 21:21:06 UTC (rev 3693)
@@ -3,7 +3,7 @@
use lib 'buildlib';
package lowcaseonly;
-use base qw( KinoSearch::FieldSpec::text );
+use base qw( KinoSearch::FieldSpec::TextField );
package NoFieldsSchema;
use base qw( KinoSearch::Schema );
Modified: trunk/perl/t/217-multi_lexicon.t
===================================================================
--- trunk/perl/t/217-multi_lexicon.t 2008-08-02 20:45:43 UTC (rev 3692)
+++ trunk/perl/t/217-multi_lexicon.t 2008-08-02 21:21:06 UTC (rev 3693)
@@ -6,7 +6,7 @@
use warnings;
package MySchema::UnAnalyzed;
-use base qw( KinoSearch::FieldSpec::text );
+use base qw( KinoSearch::FieldSpec::TextField );
sub analyzed {0}
package MySchema;
Modified: trunk/perl/t/303-highlighter.t
===================================================================
--- trunk/perl/t/303-highlighter.t 2008-08-02 20:45:43 UTC (rev 3692)
+++ trunk/perl/t/303-highlighter.t 2008-08-02 21:21:06 UTC (rev 3693)
@@ -3,7 +3,7 @@
use lib 'buildlib';
package MySchema::alt;
-use base qw( KinoSearch::FieldSpec::text );
+use base qw( KinoSearch::FieldSpec::TextField );
sub boost {0.1}
package MySchema;
Modified: trunk/perl/t/504-similarity.t
===================================================================
--- trunk/perl/t/504-similarity.t 2008-08-02 20:45:43 UTC (rev 3692)
+++ trunk/perl/t/504-similarity.t 2008-08-02 21:21:06 UTC (rev 3693)
@@ -2,7 +2,7 @@
use warnings;
package MySchema::LongField;
-use base qw( KinoSearch::FieldSpec::text );
+use base qw( KinoSearch::FieldSpec::TextField );
use KSx::Search::LongFieldSim;
sub similarity { KSx::Search::LongFieldSim->new }
Modified: trunk/perl/t/510-remote_search.t
===================================================================
--- trunk/perl/t/510-remote_search.t 2008-08-02 20:45:43 UTC (rev 3692)
+++ trunk/perl/t/510-remote_search.t 2008-08-02 21:21:06 UTC (rev 3693)
@@ -17,7 +17,7 @@
}
package SortSchema::UnAnalyzed;
-use base qw( KinoSearch::FieldSpec::text );
+use base qw( KinoSearch::FieldSpec::TextField );
sub analyzed {0}
package SortSchema;
Modified: trunk/perl/t/511-sort_spec.t
===================================================================
--- trunk/perl/t/511-sort_spec.t 2008-08-02 20:45:43 UTC (rev 3692)
+++ trunk/perl/t/511-sort_spec.t 2008-08-02 21:21:06 UTC (rev 3693)
@@ -6,7 +6,7 @@
use List::Util qw( shuffle );
package SortSchema::UnAnalyzed;
-use base qw( KinoSearch::FieldSpec::text );
+use base qw( KinoSearch::FieldSpec::TextField );
sub analyzed {0}
package SortSchema;
Modified: trunk/perl/t/515-range_query.t
===================================================================
--- trunk/perl/t/515-range_query.t 2008-08-02 20:45:43 UTC (rev 3692)
+++ trunk/perl/t/515-range_query.t 2008-08-02 21:21:06 UTC (rev 3693)
@@ -6,7 +6,7 @@
use List::Util qw( shuffle );
package RangeSchema::UnAnalyzed;
-use base qw( KinoSearch::FieldSpec::text );
+use base qw( KinoSearch::FieldSpec::TextField );
sub analyzed {0}
package RangeSchema;
Modified: trunk/perl/t/602-boosts.t
===================================================================
--- trunk/perl/t/602-boosts.t 2008-08-02 20:45:43 UTC (rev 3692)
+++ trunk/perl/t/602-boosts.t 2008-08-02 21:21:06 UTC (rev 3693)
@@ -14,7 +14,7 @@
sub analyzer { KinoSearch::Analysis::Tokenizer->new }
package BoostedField;
-use base qw( KinoSearch::FieldSpec::text );
+use base qw( KinoSearch::FieldSpec::TextField );
sub boost {100}
package BoostedFieldSchema;
Modified: trunk/perl/t/605-store_pos_boost.t
===================================================================
--- trunk/perl/t/605-store_pos_boost.t 2008-08-02 20:45:43 UTC (rev 3692)
+++ trunk/perl/t/605-store_pos_boost.t 2008-08-02 21:21:06 UTC (rev 3693)
@@ -36,7 +36,7 @@
}
package MySchema::boosted;
-use base qw( KinoSearch::FieldSpec::text );
+use base qw( KinoSearch::FieldSpec::TextField );
use KinoSearch::Posting::RichPosting;
sub posting {
Modified: trunk/perl/t/607-queryparser_multi_field.t
===================================================================
--- trunk/perl/t/607-queryparser_multi_field.t 2008-08-02 20:45:43 UTC (rev 3692)
+++ trunk/perl/t/607-queryparser_multi_field.t 2008-08-02 21:21:06 UTC (rev 3693)
@@ -3,7 +3,7 @@
use lib 'buildlib';
package UnAnalyzed;
-use base qw( KinoSearch::FieldSpec::text );
+use base qw( KinoSearch::FieldSpec::TextField );
sub analyzed {0}
Modified: trunk/perl/t/611-queryparser_syntax.t
===================================================================
--- trunk/perl/t/611-queryparser_syntax.t 2008-08-02 20:45:43 UTC (rev 3692)
+++ trunk/perl/t/611-queryparser_syntax.t 2008-08-02 21:21:06 UTC (rev 3693)
@@ -3,7 +3,7 @@
use lib 'buildlib';
package FancyField;
-use base qw( KinoSearch::FieldSpec::text );
+use base qw( KinoSearch::FieldSpec::TextField );
use KinoSearch::Analysis::PolyAnalyzer;
use KinoSearch::Analysis::Tokenizer;
use KinoSearch::Analysis::Stopalizer;
_______________________________________________
kinosearch-commits mailing list
kinosearch-commits@rectangular.com
http://www.rectangular.com/mailman/listinfo/kinosearch-commits