Mailing List Archive

r3789 - trunk/perl/lib/KinoSearch/Docs/Tutorial
Author: creamyg
Date: 2008-08-29 11:16:40 -0700 (Fri, 29 Aug 2008)
New Revision: 3789

Modified:
trunk/perl/lib/KinoSearch/Docs/Tutorial/BeyondSimple.pod
Log:
Minor revisions to the Tutorial's BeyondSimple chapter.


Modified: trunk/perl/lib/KinoSearch/Docs/Tutorial/BeyondSimple.pod
===================================================================
--- trunk/perl/lib/KinoSearch/Docs/Tutorial/BeyondSimple.pod 2008-08-29 18:15:14 UTC (rev 3788)
+++ trunk/perl/lib/KinoSearch/Docs/Tutorial/BeyondSimple.pod 2008-08-29 18:16:40 UTC (rev 3789)
@@ -4,12 +4,12 @@

=head1 DESCRIPTION

-
=head2 Goal

In this tutorial chapter, we'll refactor the apps we built in
L<KinoSearch::Docs::Tutorial::Simple> so that they look exactly the same from
-the end user's point of view, but offer greater possibilites for expansion.
+the end user's point of view, but offer the developer greater possibilites for
+expansion.

To achieve this, we'll ditch KSx::Simple and replace it with the
classes that it uses internally:
@@ -60,8 +60,9 @@
url => 'text',
);

-The second is implementing an analyzer() class method, which must return an
-object which isa L<KinoSearch::Analysis::Analyzer>:
+The second requirement an analyzer() class method, which must return an object
+which isa L<KinoSearch::Analysis::Analyzer> -- such as a
+L<PolyAnalyzer|KinoSearch::Analysis::PolyAnalyzer>.

use KinoSearch::Analysis::PolyAnalyzer;

@@ -103,11 +104,11 @@
... and replace the constructor:

my $invindexer = KinoSearch::InvIndexer->new(
- invindex => USConSchema->read( $conf{path_to_invindex} ),
+ invindex => USConSchema->open( $conf{path_to_invindex} ),
);

Note that instead of giving InvIndexer a file path like we gave Simple, we're
-now having our Schema subclass C<read> from that file path.
+now having our Schema subclass C<open> that file path.

Next, have the C<$invindexer> object C<add_doc> where we were having the
C<$simple> object C<add_doc> before:
@@ -119,7 +120,7 @@

There's only one extra step required: at the end of the app, you must call
finish() explicitly to close the indexing session and commit your changes.
-(KSx::Simple calls finish() implicitly upon object destruction).
+(KSx::Simple hides this detail, calling finish() implicitly when it needs to).

$invindexer->finish;

@@ -153,15 +154,18 @@
...
}

-C<< $simple->search >> returns a hit count; in contrast, C<< $searcher->search
->> returns a Hits object, from which you may obtain a hit count via the
-total_hits() method.
+C<< $simple->search >> returns a hit count; in contrast,
+C<< $searcher->search >> returns a Hits object, from which you may obtain a
+hit count via the total_hits() method.

=head2 Hooray!

-Congratulations! Your apps do the same thing as before... but now they're a
-lot easier to customize.
+Congratulations! Your apps do the same thing as before... but now they'll be
+easier to customize.

+In our next chapter, L<KinoSearch::Docs::Tutorial::FieldSpec>, we'll explore
+how to assign different behaviors to different fields.
+
=head1 COPYRIGHT

Copyright 2005-2008 Marvin Humphrey


_______________________________________________
kinosearch-commits mailing list
kinosearch-commits@rectangular.com
http://www.rectangular.com/mailman/listinfo/kinosearch-commits