You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucy.apache.org by bu...@apache.org on 2012/03/31 05:36:27 UTC
[lucy-commits] svn commit: r810789 [11/16] - in /websites/staging/lucy/trunk/content: ./
css/ docs/ docs/0.1.0/ docs/0.1.0/perl/ docs/0.1.0/perl/Lucy/
docs/0.1.0/perl/Lucy/Analysis/ docs/0.1.0/perl/Lucy/Docs/
docs/0.1.0/perl/Lucy/Docs/Cookbook/ docs/0.1.0/perl/Lucy/D...
Added: websites/staging/lucy/trunk/content/docs/0.2.1/perl/Lucy/Plan/Architecture.html
==============================================================================
--- websites/staging/lucy/trunk/content/docs/0.2.1/perl/Lucy/Plan/Architecture.html (added)
+++ websites/staging/lucy/trunk/content/docs/0.2.1/perl/Lucy/Plan/Architecture.html Sat Mar 31 03:36:16 2012
@@ -0,0 +1,101 @@
+
+<html>
+<head>
+<title></title>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+</head>
+<body>
+
+
+<h1 id="NAME">NAME</h1>
+
+<p>Lucy::Plan::Architecture - Configure major components of an index.</p>
+
+<h1 id="SYNOPSIS">SYNOPSIS</h1>
+
+<pre><code> package MyArchitecture;
+ use base qw( Lucy::Plan::Architecture );
+
+ use LucyX::Index::ZlibDocWriter;
+ use LucyX::Index::ZlibDocReader;
+
+ sub register_doc_writer {
+ my ( $self, $seg_writer ) = @_;
+ my $doc_writer = LucyX::Index::ZlibDocWriter->new(
+ snapshot => $seg_writer->get_snapshot,
+ segment => $seg_writer->get_segment,
+ polyreader => $seg_writer->get_polyreader,
+ );
+ $seg_writer->register(
+ api => "Lucy::Index::DocReader",
+ component => $doc_writer,
+ );
+ $seg_writer->add_writer($doc_writer);
+ }
+
+ sub register_doc_reader {
+ my ( $self, $seg_reader ) = @_;
+ my $doc_reader = LucyX::Index::ZlibDocReader->new(
+ schema => $seg_reader->get_schema,
+ folder => $seg_reader->get_folder,
+ segments => $seg_reader->get_segments,
+ seg_tick => $seg_reader->get_seg_tick,
+ snapshot => $seg_reader->get_snapshot,
+ );
+ $seg_reader->register(
+ api => 'Lucy::Index::DocReader',
+ component => $doc_reader,
+ );
+ }
+
+ package MySchema;
+ use base qw( Lucy::Plan::Schema );
+
+ sub architecture {
+ shift;
+ return MyArchitecture->new(@_);
+ }</code></pre>
+
+<h1 id="DESCRIPTION">DESCRIPTION</h1>
+
+<p>By default, a Lucy index consists of several main parts: lexicon, postings, stored documents, deletions, and highlight data. The readers and writers for that data are spawned by Architecture. Each component operates at the segment level; Architecture's factory methods are used to build up <a href="../../Lucy/Index/SegWriter.html">SegWriter</a> and <a href="../../Lucy/Index/SegReader.html">SegReader</a>.</p>
+
+<h1 id="CONSTRUCTORS">CONSTRUCTORS</h1>
+
+<h2 id="new-">new()</h2>
+
+<pre><code> my $arch = Lucy::Plan::Architecture->new;</code></pre>
+
+<p>Constructor. Takes no arguments.</p>
+
+<h1 id="METHODS">METHODS</h1>
+
+<h2 id="register_doc_writer-writer-">register_doc_writer(writer)</h2>
+
+<p>Spawn a DataWriter and register() it with the supplied SegWriter, adding it to the SegWriter's writer stack.</p>
+
+<ul>
+
+<li><p><b>writer</b> - A SegWriter.</p>
+
+</li>
+</ul>
+
+<h2 id="register_doc_reader-reader-">register_doc_reader(reader)</h2>
+
+<p>Spawn a DocReader and register() it with the supplied SegReader.</p>
+
+<ul>
+
+<li><p><b>reader</b> - A SegReader.</p>
+
+</li>
+</ul>
+
+<h1 id="INHERITANCE">INHERITANCE</h1>
+
+<p>Lucy::Plan::Architecture isa <a href="../../Lucy/Object/Obj.html">Lucy::Object::Obj</a>.</p>
+
+</body>
+</html>
+
Added: websites/staging/lucy/trunk/content/docs/0.2.1/perl/Lucy/Plan/BlobType.html
==============================================================================
--- websites/staging/lucy/trunk/content/docs/0.2.1/perl/Lucy/Plan/BlobType.html (added)
+++ websites/staging/lucy/trunk/content/docs/0.2.1/perl/Lucy/Plan/BlobType.html Sat Mar 31 03:36:16 2012
@@ -0,0 +1,47 @@
+
+<html>
+<head>
+<title></title>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+</head>
+<body>
+
+
+<h1 id="NAME">NAME</h1>
+
+<p>Lucy::Plan::BlobType - Default behaviors for binary fields.</p>
+
+<h1 id="SYNOPSIS">SYNOPSIS</h1>
+
+<pre><code> my $string_type = Lucy::Plan::StringType->new;
+ my $blob_type = Lucy::Plan::BlobType->new( stored => 1 );
+ my $schema = Lucy::Plan::Schema->new;
+ $schema->spec_field( name => 'id', type => $string_type );
+ $schema->spec_field( name => 'jpeg', type => $blob_type );</code></pre>
+
+<h1 id="DESCRIPTION">DESCRIPTION</h1>
+
+<p>BlobType is an implementation of FieldType tuned for use with fields containing binary data, which cannot be indexed or searched -- only stored.</p>
+
+<h1 id="CONSTRUCTORS">CONSTRUCTORS</h1>
+
+<h2 id="new-labeled-params-">new( <i>[labeled params]</i> )</h2>
+
+<pre><code> my $blob_type = Lucy::Plan::BlobType->new(
+ stored => 1, # default: false
+ );</code></pre>
+
+<ul>
+
+<li><p><b>stored</b> - boolean indicating whether the field should be stored.</p>
+
+</li>
+</ul>
+
+<h1 id="INHERITANCE">INHERITANCE</h1>
+
+<p>Lucy::Plan::BlobType isa <a href="../../Lucy/Plan/FieldType.html">Lucy::Plan::FieldType</a> isa <a href="../../Lucy/Object/Obj.html">Lucy::Object::Obj</a>.</p>
+
+</body>
+</html>
+
Added: websites/staging/lucy/trunk/content/docs/0.2.1/perl/Lucy/Plan/FieldType.html
==============================================================================
--- websites/staging/lucy/trunk/content/docs/0.2.1/perl/Lucy/Plan/FieldType.html (added)
+++ websites/staging/lucy/trunk/content/docs/0.2.1/perl/Lucy/Plan/FieldType.html Sat Mar 31 03:36:16 2012
@@ -0,0 +1,69 @@
+
+<html>
+<head>
+<title></title>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+</head>
+<body>
+
+
+<h1 id="NAME">NAME</h1>
+
+<p>Lucy::Plan::FieldType - Define a field's behavior.</p>
+
+<h1 id="SYNOPSIS">SYNOPSIS</h1>
+
+<pre><code> my @sortable;
+ for my $field ( @{ $schema->all_fields } ) {
+ my $type = $schema->fetch_type($field);
+ next unless $type->sortable;
+ push @sortable, $field;
+ }</code></pre>
+
+<h1 id="DESCRIPTION">DESCRIPTION</h1>
+
+<p>FieldType is an abstract class defining a set of traits and behaviors which may be associated with one or more field names.</p>
+
+<p>Properties which are common to all field types include <code>boost</code>, <code>indexed</code>, <code>stored</code>, <code>sortable</code>, <code>binary</code>, and <code>similarity</code>.</p>
+
+<p>The <code>boost</code> property is a floating point scoring multiplier which defaults to 1.0. Values greater than 1.0 cause the field to contribute more to a document's score, lower values, less.</p>
+
+<p>The <code>indexed</code> property indicates whether the field should be indexed (so that it can be searched).</p>
+
+<p>The <code>stored</code> property indicates whether to store the raw field value, so that it can be retrieved when a document turns up in a search.</p>
+
+<p>The <code>sortable</code> property indicates whether search results should be sortable based on the contents of the field.</p>
+
+<p>The <code>binary</code> property indicates whether the field contains binary or text data. Unlike most other properties, <code>binary</code> is not settable.</p>
+
+<p>The <code>similarity</code> property is a <a href="../../Lucy/Index/Similarity.html">Similarity</a> object which defines matching and scoring behavior for the field. It is required if the field is <code>indexed</code>.</p>
+
+<h1 id="METHODS">METHODS</h1>
+
+<h2 id="get_boost-">get_boost()</h2>
+
+<p>Accessor for <code>boost</code>.</p>
+
+<h2 id="indexed-">indexed()</h2>
+
+<p>Accessor for <code>indexed</code>.</p>
+
+<h2 id="stored-">stored()</h2>
+
+<p>Accessor for <code>stored</code>.</p>
+
+<h2 id="sortable-">sortable()</h2>
+
+<p>Accessor for <code>sortable</code>.</p>
+
+<h2 id="binary-">binary()</h2>
+
+<p>Indicate whether the field contains binary data.</p>
+
+<h1 id="INHERITANCE">INHERITANCE</h1>
+
+<p>Lucy::Plan::FieldType isa <a href="../../Lucy/Object/Obj.html">Lucy::Object::Obj</a>.</p>
+
+</body>
+</html>
+
Added: websites/staging/lucy/trunk/content/docs/0.2.1/perl/Lucy/Plan/FullTextType.html
==============================================================================
--- websites/staging/lucy/trunk/content/docs/0.2.1/perl/Lucy/Plan/FullTextType.html (added)
+++ websites/staging/lucy/trunk/content/docs/0.2.1/perl/Lucy/Plan/FullTextType.html Sat Mar 31 03:36:16 2012
@@ -0,0 +1,85 @@
+
+<html>
+<head>
+<title></title>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+</head>
+<body>
+
+
+<h1 id="NAME">NAME</h1>
+
+<p>Lucy::Plan::FullTextType - Full-text search field type.</p>
+
+<h1 id="SYNOPSIS">SYNOPSIS</h1>
+
+<pre><code> my $polyanalyzer = Lucy::Analysis::PolyAnalyzer->new(
+ language => 'en',
+ );
+ my $type = Lucy::Plan::FullTextType->new(
+ analyzer => $polyanalyzer,
+ );
+ my $schema = Lucy::Plan::Schema->new;
+ $schema->spec_field( name => 'title', type => $type );
+ $schema->spec_field( name => 'content', type => $type );</code></pre>
+
+<h1 id="DESCRIPTION">DESCRIPTION</h1>
+
+<p>Lucy::Plan::FullTextType is an implementation of <a href="../../Lucy/Plan/FieldType.html">Lucy::Plan::FieldType</a> tuned for "full text search".</p>
+
+<p>Full text fields are associated with an <a href="../../Lucy/Analysis/Analyzer.html">Analyzer</a>, which is used to tokenize and normalize the text so that it can be searched for individual words.</p>
+
+<p>For an exact-match, single value field type using character data, see <a href="../../Lucy/Plan/StringType.html">StringType</a>.</p>
+
+<h1 id="CONSTRUCTORS">CONSTRUCTORS</h1>
+
+<h2 id="new-labeled-params-">new( <i>[labeled params]</i> )</h2>
+
+<pre><code> my $type = Lucy::Plan::FullTextType->new(
+ analyzer => $analyzer, # required
+ boost => 2.0, # default: 1.0
+ indexed => 1, # default: true
+ stored => 1, # default: true
+ sortable => 1, # default: false
+ highlightable => 1, # default: false
+ );</code></pre>
+
+<ul>
+
+<li><p><b>analyzer</b> - An Analyzer.</p>
+
+</li>
+<li><p><b>boost</b> - floating point per-field boost.</p>
+
+</li>
+<li><p><b>indexed</b> - boolean indicating whether the field should be indexed.</p>
+
+</li>
+<li><p><b>stored</b> - boolean indicating whether the field should be stored.</p>
+
+</li>
+<li><p><b>sortable</b> - boolean indicating whether the field should be sortable.</p>
+
+</li>
+<li><p><b>highlightable</b> - boolean indicating whether the field should be highlightable.</p>
+
+</li>
+</ul>
+
+<h1 id="METHODS">METHODS</h1>
+
+<h2 id="set_highlightable-highlightable-">set_highlightable(highlightable)</h2>
+
+<p>Indicate whether to store data required by <a href="../../Lucy/Highlight/Highlighter.html">Lucy::Highlight::Highlighter</a> for excerpt selection and search term highlighting.</p>
+
+<h2 id="highlightable-">highlightable()</h2>
+
+<p>Accessor for "highlightable" property.</p>
+
+<h1 id="INHERITANCE">INHERITANCE</h1>
+
+<p>Lucy::Plan::FullTextType isa <a href="../../Lucy/Plan/TextType.html">Lucy::Plan::TextType</a> isa <a href="../../Lucy/Plan/FieldType.html">Lucy::Plan::FieldType</a> isa <a href="../../Lucy/Object/Obj.html">Lucy::Object::Obj</a>.</p>
+
+</body>
+</html>
+
Added: websites/staging/lucy/trunk/content/docs/0.2.1/perl/Lucy/Plan/Schema.html
==============================================================================
--- websites/staging/lucy/trunk/content/docs/0.2.1/perl/Lucy/Plan/Schema.html (added)
+++ websites/staging/lucy/trunk/content/docs/0.2.1/perl/Lucy/Plan/Schema.html Sat Mar 31 03:36:16 2012
@@ -0,0 +1,96 @@
+
+<html>
+<head>
+<title></title>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+</head>
+<body>
+
+
+<h1 id="NAME">NAME</h1>
+
+<p>Lucy::Plan::Schema - User-created specification for an inverted index.</p>
+
+<h1 id="SYNOPSIS">SYNOPSIS</h1>
+
+<pre><code> use Lucy::Plan::Schema;
+ use Lucy::Plan::FullTextType;
+ use Lucy::Analysis::PolyAnalyzer;
+
+ my $schema = Lucy::Plan::Schema->new;
+ my $polyanalyzer = Lucy::Analysis::PolyAnalyzer->new(
+ language => 'en',
+ );
+ my $type = Lucy::Plan::FullTextType->new(
+ analyzer => $polyanalyzer,
+ );
+ $schema->spec_field( name => 'title', type => $type );
+ $schema->spec_field( name => 'content', type => $type );</code></pre>
+
+<h1 id="DESCRIPTION">DESCRIPTION</h1>
+
+<p>A Schema is a specification which indicates how other entities should interpret the raw data in an inverted index and interact with it.</p>
+
+<p>Once an actual index has been created using a particular Schema, existing field definitions may not be changed. However, it is possible to add new fields during subsequent indexing sessions.</p>
+
+<h1 id="CONSTRUCTORS">CONSTRUCTORS</h1>
+
+<h2 id="new-">new()</h2>
+
+<pre><code> my $schema = Lucy::Plan::Schema->new;</code></pre>
+
+<p>Constructor. Takes no arguments.</p>
+
+<h1 id="METHODS">METHODS</h1>
+
+<h2 id="spec_field-labeled-params-">spec_field( <i>[labeled params]</i> )</h2>
+
+<p>Define the behavior of a field by associating it with a FieldType.</p>
+
+<p>If this method has already been called for the supplied <code>field</code>, it will merely test to verify that the supplied FieldType equals() the existing one.</p>
+
+<ul>
+
+<li><p><b>name</b> - The name of the field.</p>
+
+</li>
+<li><p><b>type</b> - A FieldType.</p>
+
+</li>
+</ul>
+
+<h2 id="num_fields-">num_fields()</h2>
+
+<p>Return the number of fields currently defined.</p>
+
+<h2 id="all_fields-">all_fields()</h2>
+
+<p>Return all the Schema's field names as an array.</p>
+
+<h2 id="fetch_type-field-">fetch_type(field)</h2>
+
+<p>Return the FieldType for the specified field. If the field can't be found, return undef.</p>
+
+<h2 id="fetch_sim-field-">fetch_sim(field)</h2>
+
+<p>Return the Similarity for the specified field, or undef if either the field can't be found or it isn't associated with a Similarity.</p>
+
+<h2 id="architecture-">architecture()</h2>
+
+<p>Factory method which creates an Architecture object for this index.</p>
+
+<h2 id="get_architecture-">get_architecture()</h2>
+
+<p>Return the Schema instance's internal Architecture object.</p>
+
+<h2 id="get_similarity-">get_similarity()</h2>
+
+<p>Return the Schema instance's internal Similarity object.</p>
+
+<h1 id="INHERITANCE">INHERITANCE</h1>
+
+<p>Lucy::Plan::Schema isa <a href="../../Lucy/Object/Obj.html">Lucy::Object::Obj</a>.</p>
+
+</body>
+</html>
+
Added: websites/staging/lucy/trunk/content/docs/0.2.1/perl/Lucy/Plan/StringType.html
==============================================================================
--- websites/staging/lucy/trunk/content/docs/0.2.1/perl/Lucy/Plan/StringType.html (added)
+++ websites/staging/lucy/trunk/content/docs/0.2.1/perl/Lucy/Plan/StringType.html Sat Mar 31 03:36:16 2012
@@ -0,0 +1,57 @@
+
+<html>
+<head>
+<title></title>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+</head>
+<body>
+
+
+<h1 id="NAME">NAME</h1>
+
+<p>Lucy::Plan::StringType - Non-tokenized text type.</p>
+
+<h1 id="SYNOPSIS">SYNOPSIS</h1>
+
+<pre><code> my $type = Lucy::Plan::StringType->new;
+ my $schema = Lucy::Plan::Schema->new;
+ $schema->spec_field( name => 'category', type => $type );</code></pre>
+
+<h1 id="DESCRIPTION">DESCRIPTION</h1>
+
+<p>Lucy::Plan::StringType is used for "exact-match" strings.</p>
+
+<h1 id="CONSTRUCTORS">CONSTRUCTORS</h1>
+
+<h2 id="new-">new()</h2>
+
+<pre><code> my $type = Lucy::Plan::StringType->new(
+ boost => 0.1, # default: 1.0
+ indexed => 1, # default: true
+ stored => 1, # default: true
+ sortable => 1, # default: false
+ );</code></pre>
+
+<ul>
+
+<li><p><b>boost</b> - floating point per-field boost.</p>
+
+</li>
+<li><p><b>indexed</b> - boolean indicating whether the field should be indexed.</p>
+
+</li>
+<li><p><b>stored</b> - boolean indicating whether the field should be stored.</p>
+
+</li>
+<li><p><b>sortable</b> - boolean indicating whether the field should be sortable.</p>
+
+</li>
+</ul>
+
+<h1 id="INHERITANCE">INHERITANCE</h1>
+
+<p>Lucy::Plan::StringType isa <a href="../../Lucy/Plan/TextType.html">Lucy::Plan::TextType</a> isa <a href="../../Lucy/Plan/FieldType.html">Lucy::Plan::FieldType</a> isa <a href="../../Lucy/Object/Obj.html">Lucy::Object::Obj</a>.</p>
+
+</body>
+</html>
+
Added: websites/staging/lucy/trunk/content/docs/0.2.1/perl/Lucy/Search/ANDQuery.html
==============================================================================
--- websites/staging/lucy/trunk/content/docs/0.2.1/perl/Lucy/Search/ANDQuery.html (added)
+++ websites/staging/lucy/trunk/content/docs/0.2.1/perl/Lucy/Search/ANDQuery.html Sat Mar 31 03:36:16 2012
@@ -0,0 +1,53 @@
+
+<html>
+<head>
+<title></title>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+</head>
+<body>
+
+
+<h1 id="NAME">NAME</h1>
+
+<p>Lucy::Search::ANDQuery - Intersect multiple result sets.</p>
+
+<h1 id="SYNOPSIS">SYNOPSIS</h1>
+
+<pre><code> my $foo_and_bar_query = Lucy::Search::ANDQuery->new(
+ children => [ $foo_query, $bar_query ],
+ );
+ my $hits = $searcher->hits( query => $foo_and_bar_query );
+ ...</code></pre>
+
+<h1 id="DESCRIPTION">DESCRIPTION</h1>
+
+<p>ANDQuery is a composite <a href="../../Lucy/Search/Query.html">Query</a> which matches only when all of its children match, so its result set is the intersection of their result sets. Documents which match receive a summed score.</p>
+
+<h1 id="CONSTRUCTORS">CONSTRUCTORS</h1>
+
+<h2 id="new-labeled-params-">new( <i>[labeled params]</i> )</h2>
+
+<pre><code> my $foo_and_bar_query = Lucy::Search::ANDQuery->new(
+ children => [ $foo_query, $bar_query ],
+ );</code></pre>
+
+<ul>
+
+<li><p><b>children</b> - An array of child Queries.</p>
+
+</li>
+</ul>
+
+<h1 id="METHODS">METHODS</h1>
+
+<h2 id="add_child-query-">add_child(query)</h2>
+
+<p>Add a child Query node.</p>
+
+<h1 id="INHERITANCE">INHERITANCE</h1>
+
+<p>Lucy::Search::ANDQuery isa <a href="../../Lucy/Search/PolyQuery.html">Lucy::Search::PolyQuery</a> isa <a href="../../Lucy/Search/Query.html">Lucy::Search::Query</a> isa <a href="../../Lucy/Object/Obj.html">Lucy::Object::Obj</a>.</p>
+
+</body>
+</html>
+
Added: websites/staging/lucy/trunk/content/docs/0.2.1/perl/Lucy/Search/Collector.html
==============================================================================
--- websites/staging/lucy/trunk/content/docs/0.2.1/perl/Lucy/Search/Collector.html (added)
+++ websites/staging/lucy/trunk/content/docs/0.2.1/perl/Lucy/Search/Collector.html Sat Mar 31 03:36:16 2012
@@ -0,0 +1,59 @@
+
+<html>
+<head>
+<title></title>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+</head>
+<body>
+
+
+<h1 id="NAME">NAME</h1>
+
+<p>Lucy::Search::Collector - Process hits.</p>
+
+<h1 id="SYNOPSIS">SYNOPSIS</h1>
+
+<pre><code> # Abstract base class.</code></pre>
+
+<h1 id="DESCRIPTION">DESCRIPTION</h1>
+
+<p>A Collector decides what to do with the hits that a <a href="../../Lucy/Search/Matcher.html">Matcher</a> iterates through, based on how the abstract collect() method is implemented.</p>
+
+<p>Collectors operate on individual segments, but must operate within the context of a larger collection. Each time the collector moves to a new segment, set_reader(), set_base() and set_matcher() will be called, and the collector must take the updated information into account.</p>
+
+<h1 id="CONSTRUCTORS">CONSTRUCTORS</h1>
+
+<h2 id="new-">new()</h2>
+
+<pre><code> package MyCollector;
+ use base qw( Lucy::Search::Collector );
+ our %foo;
+ sub new {
+ my $self = shift->SUPER::new;
+ my %args = @_;
+ $foo{$$self} = $args{foo};
+ return $self;
+ }</code></pre>
+
+<p>Abstract constructor. Takes no arguments.</p>
+
+<h1 id="ABSTRACT-METHODS">ABSTRACT METHODS</h1>
+
+<h2 id="collect-doc_id-">collect(doc_id)</h2>
+
+<p>Do something with a doc id. (For instance, keep track of the docs with the ten highest scores.)</p>
+
+<ul>
+
+<li><p><b>doc_id</b> - A segment document id.</p>
+
+</li>
+</ul>
+
+<h1 id="INHERITANCE">INHERITANCE</h1>
+
+<p>Lucy::Search::Collector isa <a href="../../Lucy/Object/Obj.html">Lucy::Object::Obj</a>.</p>
+
+</body>
+</html>
+
Added: websites/staging/lucy/trunk/content/docs/0.2.1/perl/Lucy/Search/Collector/BitCollector.html
==============================================================================
--- websites/staging/lucy/trunk/content/docs/0.2.1/perl/Lucy/Search/Collector/BitCollector.html (added)
+++ websites/staging/lucy/trunk/content/docs/0.2.1/perl/Lucy/Search/Collector/BitCollector.html Sat Mar 31 03:36:16 2012
@@ -0,0 +1,58 @@
+
+<html>
+<head>
+<title></title>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+</head>
+<body>
+
+
+<h1 id="NAME">NAME</h1>
+
+<p>Lucy::Search::Collector::BitCollector - Collector which records doc nums in a BitVector.</p>
+
+<h1 id="SYNOPSIS">SYNOPSIS</h1>
+
+<pre><code> my $bit_vec = Lucy::Object::BitVector->new(
+ capacity => $searcher->doc_max + 1,
+ );
+ my $bit_collector = Lucy::Search::Collector::BitCollector->new(
+ bit_vector => $bit_vec,
+ );
+ $searcher->collect(
+ collector => $bit_collector,
+ query => $query,
+ );</code></pre>
+
+<h1 id="DESCRIPTION">DESCRIPTION</h1>
+
+<p>BitCollector is a Collector which saves matching document ids in a <a href="../../../Lucy/Object/BitVector.html">BitVector</a>. It is useful for recording the entire set of documents which matches a query.</p>
+
+<h1 id="CONSTRUCTORS">CONSTRUCTORS</h1>
+
+<h2 id="new-labeled-params-">new( <i>[labeled params]</i> )</h2>
+
+<pre><code> my $bit_collector = Lucy::Search::Collector::BitCollector->new(
+ bit_vector => $bit_vec, # required
+ );</code></pre>
+
+<ul>
+
+<li><p><b>bit_vector</b> - A Lucy::Object::BitVector.</p>
+
+</li>
+</ul>
+
+<h1 id="METHODS">METHODS</h1>
+
+<h2 id="collect-doc_id-">collect(doc_id)</h2>
+
+<p>Set bit in the object's BitVector for the supplied doc id.</p>
+
+<h1 id="INHERITANCE">INHERITANCE</h1>
+
+<p>Lucy::Search::Collector::BitCollector isa <a href="../../../Lucy/Search/Collector.html">Lucy::Search::Collector</a> isa <a href="../../../Lucy/Object/Obj.html">Lucy::Object::Obj</a>.</p>
+
+</body>
+</html>
+
Added: websites/staging/lucy/trunk/content/docs/0.2.1/perl/Lucy/Search/Compiler.html
==============================================================================
--- websites/staging/lucy/trunk/content/docs/0.2.1/perl/Lucy/Search/Compiler.html (added)
+++ websites/staging/lucy/trunk/content/docs/0.2.1/perl/Lucy/Search/Compiler.html Sat Mar 31 03:36:16 2012
@@ -0,0 +1,152 @@
+
+<html>
+<head>
+<title></title>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+</head>
+<body>
+
+
+<h1 id="NAME">NAME</h1>
+
+<p>Lucy::Search::Compiler - Query-to-Matcher compiler.</p>
+
+<h1 id="SYNOPSIS">SYNOPSIS</h1>
+
+<pre><code> # (Compiler is an abstract base class.)
+ package MyCompiler;
+ use base qw( Lucy::Search::Compiler );
+
+ sub make_matcher {
+ my $self = shift;
+ return MyMatcher->new( @_, compiler => $self );
+ }</code></pre>
+
+<h1 id="DESCRIPTION">DESCRIPTION</h1>
+
+<p>The purpose of the Compiler class is to take a specification in the form of a <a href="../../Lucy/Search/Query.html">Query</a> object and compile a <a href="../../Lucy/Search/Matcher.html">Matcher</a> object that can do real work.</p>
+
+<p>The simplest Compiler subclasses -- such as those associated with constant-scoring Query types -- might simply implement a make_matcher() method which passes along information verbatim from the Query to the Matcher's constructor.</p>
+
+<p>However it is common for the Compiler to perform some calculations which affect it's "weight" -- a floating point multiplier that the Matcher will factor into each document's score. If that is the case, then the Compiler subclass may wish to override get_weight(), sum_of_squared_weights(), and apply_norm_factor().</p>
+
+<p>Compiling a Matcher is a two stage process.</p>
+
+<p>The first stage takes place during the Compiler's constructor, which is where the Query object meets a <a href="../../Lucy/Search/Searcher.html">Searcher</a> object for the first time. Searchers operate on a specific document collection and they can tell you certain statistical information about the collection -- such as how many total documents are in the collection, or how many documents in the collection a particular term is present in. Lucy's core Compiler classes plug this information into the classic TF/IDF weighting algorithm to adjust the Compiler's weight; custom subclasses might do something similar.</p>
+
+<p>The second stage of compilation is make_matcher(), method, which is where the Compiler meets a <a href="../../Lucy/Index/SegReader.html">SegReader</a> object. SegReaders are associated with a single segment within a single index on a single machine, and are thus lower-level than Searchers, which may represent a document collection spread out over a search cluster (comprising several indexes and many segments). The Compiler object can use new information supplied by the SegReader -- such as whether a term is missing from the local index even though it is present within the larger collection represented by the Searcher -- when figuring out what to feed to the Matchers's constructor, or whether make_matcher() should return a Matcher at all.</p>
+
+<h1 id="CONSTRUCTORS">CONSTRUCTORS</h1>
+
+<h2 id="new-labeled-params-">new( <i>[labeled params]</i> )</h2>
+
+<pre><code> my $compiler = MyCompiler->SUPER::new(
+ parent => $my_query,
+ searcher => $searcher,
+ similarity => $sim, # default: undef
+ boost => undef, # default: see below
+ );</code></pre>
+
+<p>Abstract constructor.</p>
+
+<ul>
+
+<li><p><b>parent</b> - The parent Query.</p>
+
+</li>
+<li><p><b>searcher</b> - A Lucy::Search::Searcher, such as an IndexSearcher.</p>
+
+</li>
+<li><p><b>similarity</b> - A Similarity.</p>
+
+</li>
+<li><p><b>boost</b> - An arbitrary scoring multiplier. Defaults to the boost of the parent Query.</p>
+
+</li>
+</ul>
+
+<h1 id="ABSTRACT-METHODS">ABSTRACT METHODS</h1>
+
+<h2 id="make_matcher-labeled-params-">make_matcher( <i>[labeled params]</i> )</h2>
+
+<p>Factory method returning a Matcher.</p>
+
+<ul>
+
+<li><p><b>reader</b> - A SegReader.</p>
+
+</li>
+<li><p><b>need_score</b> - Indicate whether the Matcher must implement score().</p>
+
+</li>
+</ul>
+
+<p>Returns: a Matcher, or undef if the Matcher would have matched no documents.</p>
+
+<h1 id="METHODS">METHODS</h1>
+
+<h2 id="get_weight-">get_weight()</h2>
+
+<p>Return the Compiler's numerical weight, a scoring multiplier. By default, returns the object's boost.</p>
+
+<h2 id="sum_of_squared_weights-">sum_of_squared_weights()</h2>
+
+<p>Compute and return a raw weighting factor. (This quantity is used by normalize()). By default, simply returns 1.0.</p>
+
+<h2 id="apply_norm_factor-factor-">apply_norm_factor(factor)</h2>
+
+<p>Apply a floating point normalization multiplier. For a TermCompiler, this involves multiplying its own weight by the supplied factor; combining classes such as ORCompiler would apply the factor recursively to their children.</p>
+
+<p>The default implementation is a no-op; subclasses may wish to multiply their internal weight by the supplied factor.</p>
+
+<ul>
+
+<li><p><b>factor</b> - The multiplier.</p>
+
+</li>
+</ul>
+
+<h2 id="normalize-">normalize()</h2>
+
+<p>Take a newly minted Compiler object and apply query-specific normalization factors. Should be called at or near the end of construction.</p>
+
+<p>For a TermQuery, the scoring formula is approximately:</p>
+
+<pre><code> (tf_d * idf_t / norm_d) * (tf_q * idf_t / norm_q)</code></pre>
+
+<p>normalize() is theoretically concerned with applying the second half of that formula to a the Compiler's weight. What actually happens depends on how the Compiler and Similarity methods called internally are implemented.</p>
+
+<h2 id="get_parent-">get_parent()</h2>
+
+<p>Accessor for the Compiler's parent Query object.</p>
+
+<h2 id="get_similarity-">get_similarity()</h2>
+
+<p>Accessor for the Compiler's Similarity object.</p>
+
+<h2 id="highlight_spans-labeled-params-">highlight_spans( <i>[labeled params]</i> )</h2>
+
+<p>Return an array of Span objects, indicating where in the given field the text that matches the parent Query occurs and how well each snippet matches. The Span's offset and length are measured in Unicode code points.</p>
+
+<p>The default implementation returns an empty array.</p>
+
+<ul>
+
+<li><p><b>searcher</b> - A Searcher.</p>
+
+</li>
+<li><p><b>doc_vec</b> - A DocVector.</p>
+
+</li>
+<li><p><b>field</b> - The name of the field.</p>
+
+</li>
+</ul>
+
+<h1 id="INHERITANCE">INHERITANCE</h1>
+
+<p>Lucy::Search::Compiler isa <a href="../../Lucy/Search/Query.html">Lucy::Search::Query</a> isa <a href="../../Lucy/Object/Obj.html">Lucy::Object::Obj</a>.</p>
+
+</body>
+</html>
+
Added: websites/staging/lucy/trunk/content/docs/0.2.1/perl/Lucy/Search/Hits.html
==============================================================================
--- websites/staging/lucy/trunk/content/docs/0.2.1/perl/Lucy/Search/Hits.html (added)
+++ websites/staging/lucy/trunk/content/docs/0.2.1/perl/Lucy/Search/Hits.html Sat Mar 31 03:36:16 2012
@@ -0,0 +1,45 @@
+
+<html>
+<head>
+<title></title>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+</head>
+<body>
+
+
+<h1 id="NAME">NAME</h1>
+
+<p>Lucy::Search::Hits - Access search results.</p>
+
+<h1 id="SYNOPSIS">SYNOPSIS</h1>
+
+<pre><code> my $hits = $searcher->hits(
+ query => $query,
+ offset => 0,
+ num_wanted => 10,
+ );
+ while ( my $hit = $hits->next ) {
+ print "<p>$hit->{title} <em>" . $hit->get_score . "</em></p>\n";
+ }</code></pre>
+
+<h1 id="DESCRIPTION">DESCRIPTION</h1>
+
+<p>Hits objects are iterators used to access the results of a search.</p>
+
+<h1 id="METHODS">METHODS</h1>
+
+<h2 id="next-">next()</h2>
+
+<p>Return the next hit, or undef when the iterator is exhausted.</p>
+
+<h2 id="total_hits-">total_hits()</h2>
+
+<p>Return the total number of documents which matched the Query used to produce the Hits object. Note that this is the total number of matches, not just the number of matches represented by the Hits iterator.</p>
+
+<h1 id="INHERITANCE">INHERITANCE</h1>
+
+<p>Lucy::Search::Hits isa <a href="../../Lucy/Object/Obj.html">Lucy::Object::Obj</a>.</p>
+
+</body>
+</html>
+
Added: websites/staging/lucy/trunk/content/docs/0.2.1/perl/Lucy/Search/IndexSearcher.html
==============================================================================
--- websites/staging/lucy/trunk/content/docs/0.2.1/perl/Lucy/Search/IndexSearcher.html (added)
+++ websites/staging/lucy/trunk/content/docs/0.2.1/perl/Lucy/Search/IndexSearcher.html Sat Mar 31 03:36:16 2012
@@ -0,0 +1,125 @@
+
+<html>
+<head>
+<title></title>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+</head>
+<body>
+
+
+<h1 id="NAME">NAME</h1>
+
+<p>Lucy::Search::IndexSearcher - Execute searches against a single index.</p>
+
+<h1 id="SYNOPSIS">SYNOPSIS</h1>
+
+<pre><code> my $searcher = Lucy::Search::IndexSearcher->new(
+ index => '/path/to/index'
+ );
+ my $hits = $searcher->hits(
+ query => 'foo bar',
+ offset => 0,
+ num_wanted => 100,
+ );</code></pre>
+
+<h1 id="DESCRIPTION">DESCRIPTION</h1>
+
+<p>Use the IndexSearcher class to perform search queries against an index. (For searching multiple indexes at once, see <a href="../../Lucy/Search/PolySearcher.html">PolySearcher</a>).</p>
+
+<p>IndexSearchers operate against a single point-in-time view or <a href="../../Lucy/Index/Snapshot.html">Snapshot</a> of the index. If an index is modified, a new IndexSearcher must be opened to access the changes.</p>
+
+<h1 id="CONSTRUCTORS">CONSTRUCTORS</h1>
+
+<h2 id="new-labeled-params-">new( <i>[labeled params]</i> )</h2>
+
+<pre><code> my $searcher = Lucy::Search::IndexSearcher->new(
+ index => '/path/to/index'
+ );</code></pre>
+
+<ul>
+
+<li><p><b>index</b> - Either a string filepath, a Folder, or an IndexReader.</p>
+
+</li>
+</ul>
+
+<h1 id="METHODS">METHODS</h1>
+
+<h2 id="hits-labeled-params-">hits( <i>[labeled params]</i> )</h2>
+
+<p>Return a Hits object containing the top results.</p>
+
+<ul>
+
+<li><p><b>query</b> - Either a Query object or a query string.</p>
+
+</li>
+<li><p><b>offset</b> - The number of most-relevant hits to discard, typically used when "paging" through hits N at a time. Setting <code>offset</code> to 20 and <code>num_wanted</code> to 10 retrieves hits 21-30, assuming that 30 hits can be found.</p>
+
+</li>
+<li><p><b>num_wanted</b> - The number of hits you would like to see after <code>offset</code> is taken into account.</p>
+
+</li>
+<li><p><b>sort_spec</b> - A <a href="../../Lucy/Search/SortSpec.html">Lucy::Search::SortSpec</a>, which will affect how results are ranked and returned.</p>
+
+</li>
+</ul>
+
+<h2 id="collect-labeled-params-">collect( <i>[labeled params]</i> )</h2>
+
+<p>Iterate over hits, feeding them into a <a href="../../Lucy/Search/Collector.html">Collector</a>.</p>
+
+<ul>
+
+<li><p><b>query</b> - A Query.</p>
+
+</li>
+<li><p><b>collector</b> - A Collector.</p>
+
+</li>
+</ul>
+
+<h2 id="doc_max-">doc_max()</h2>
+
+<p>Return the maximum number of docs in the collection represented by the Searcher, which is also the highest possible internal doc id. Documents which have been marked as deleted but not yet purged are included in this count.</p>
+
+<h2 id="doc_freq-labeled-params-">doc_freq( <i>[labeled params]</i> )</h2>
+
+<p>Return the number of documents which contain the term in the given field.</p>
+
+<ul>
+
+<li><p><b>field</b> - Field name.</p>
+
+</li>
+<li><p><b>term</b> - The term to look up.</p>
+
+</li>
+</ul>
+
+<h2 id="fetch_doc-doc_id-">fetch_doc(doc_id)</h2>
+
+<p>Retrieve a document. Throws an error if the doc id is out of range.</p>
+
+<ul>
+
+<li><p><b>doc_id</b> - A document id.</p>
+
+</li>
+</ul>
+
+<h2 id="get_schema-">get_schema()</h2>
+
+<p>Accessor for the object's <code>schema</code> member.</p>
+
+<h2 id="get_reader-">get_reader()</h2>
+
+<p>Accessor for the object's <code>reader</code> member.</p>
+
+<h1 id="INHERITANCE">INHERITANCE</h1>
+
+<p>Lucy::Search::IndexSearcher isa <a href="../../Lucy/Search/Searcher.html">Lucy::Search::Searcher</a> isa <a href="../../Lucy/Object/Obj.html">Lucy::Object::Obj</a>.</p>
+
+</body>
+</html>
+
Added: websites/staging/lucy/trunk/content/docs/0.2.1/perl/Lucy/Search/LeafQuery.html
==============================================================================
--- websites/staging/lucy/trunk/content/docs/0.2.1/perl/Lucy/Search/LeafQuery.html (added)
+++ websites/staging/lucy/trunk/content/docs/0.2.1/perl/Lucy/Search/LeafQuery.html Sat Mar 31 03:36:16 2012
@@ -0,0 +1,71 @@
+
+<html>
+<head>
+<title></title>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+</head>
+<body>
+
+
+<h1 id="NAME">NAME</h1>
+
+<p>Lucy::Search::LeafQuery - Leaf node in a tree created by QueryParser.</p>
+
+<h1 id="SYNOPSIS">SYNOPSIS</h1>
+
+<pre><code> package MyQueryParser;
+ use base qw( Lucy::Search::QueryParser );
+
+ sub expand_leaf {
+ my ( $self, $leaf_query ) = @_;
+ if ( $leaf_query->get_text =~ /.\*\s*$/ ) {
+ return PrefixQuery->new(
+ query_string => $leaf_query->get_text,
+ field => $leaf_query->get_field,
+ );
+ }
+ else {
+ return $self->SUPER::expand_leaf($leaf_query);
+ }
+ }</code></pre>
+
+<h1 id="DESCRIPTION">DESCRIPTION</h1>
+
+<p>LeafQuery objects serve as leaf nodes in the tree structure generated by <a href="../../Lucy/Search/QueryParser.html">QueryParser</a>'s tree() method. Ultimately, they must be transformed, typically into either <a href="../../Lucy/Search/TermQuery.html">TermQuery</a> or <a href="../../Lucy/Search/PhraseQuery.html">PhraseQuery</a> objects, as attempting to search a LeafQuery causes an error.</p>
+
+<h1 id="CONSTRUCTORS">CONSTRUCTORS</h1>
+
+<h2 id="new-labeled-params-">new( <i>[labeled params]</i> )</h2>
+
+<pre><code> my $leaf_query = Lucy::Search::LeafQuery->new(
+ text => '"three blind mice"', # required
+ field => 'content', # default: undef
+ );</code></pre>
+
+<ul>
+
+<li><p><b>field</b> - Optional field name.</p>
+
+</li>
+<li><p><b>text</b> - Raw query text.</p>
+
+</li>
+</ul>
+
+<h1 id="METHODS">METHODS</h1>
+
+<h2 id="get_field-">get_field()</h2>
+
+<p>Accessor for object's <code>field</code> attribute.</p>
+
+<h2 id="get_text-">get_text()</h2>
+
+<p>Accessor for object's <code>text</code> attribute.</p>
+
+<h1 id="INHERITANCE">INHERITANCE</h1>
+
+<p>Lucy::Search::LeafQuery isa <a href="../../Lucy/Search/Query.html">Lucy::Search::Query</a> isa <a href="../../Lucy/Object/Obj.html">Lucy::Object::Obj</a>.</p>
+
+</body>
+</html>
+
Added: websites/staging/lucy/trunk/content/docs/0.2.1/perl/Lucy/Search/MatchAllQuery.html
==============================================================================
--- websites/staging/lucy/trunk/content/docs/0.2.1/perl/Lucy/Search/MatchAllQuery.html (added)
+++ websites/staging/lucy/trunk/content/docs/0.2.1/perl/Lucy/Search/MatchAllQuery.html Sat Mar 31 03:36:16 2012
@@ -0,0 +1,32 @@
+
+<html>
+<head>
+<title></title>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+</head>
+<body>
+
+
+<h1 id="NAME">NAME</h1>
+
+<p>Lucy::Search::MatchAllQuery - Query which matches all documents.</p>
+
+<h1 id="DESCRIPTION">DESCRIPTION</h1>
+
+<p>MatchAllQuery is a utility class which matches all documents. Each match is assigned a score of 0.0, so that in composite queries, any document which matches against another part of the query will be ranked higher than a document which matches only via the MatchAllQuery.</p>
+
+<h1 id="CONSTRUCTORS">CONSTRUCTORS</h1>
+
+<h2 id="new-">new()</h2>
+
+<pre><code> my $match_all_query = Lucy::Search::MatchAllQuery->new;</code></pre>
+
+<p>Constructor. Takes no arguments.</p>
+
+<h1 id="INHERITANCE">INHERITANCE</h1>
+
+<p>Lucy::Search::MatchAllQuery isa <a href="../../Lucy/Search/Query.html">Lucy::Search::Query</a> isa <a href="../../Lucy/Object/Obj.html">Lucy::Object::Obj</a>.</p>
+
+</body>
+</html>
+
Added: websites/staging/lucy/trunk/content/docs/0.2.1/perl/Lucy/Search/Matcher.html
==============================================================================
--- websites/staging/lucy/trunk/content/docs/0.2.1/perl/Lucy/Search/Matcher.html (added)
+++ websites/staging/lucy/trunk/content/docs/0.2.1/perl/Lucy/Search/Matcher.html Sat Mar 31 03:36:16 2012
@@ -0,0 +1,69 @@
+
+<html>
+<head>
+<title></title>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+</head>
+<body>
+
+
+<h1 id="NAME">NAME</h1>
+
+<p>Lucy::Search::Matcher - Match a set of document ids.</p>
+
+<h1 id="SYNOPSIS">SYNOPSIS</h1>
+
+<pre><code> # abstract base class</code></pre>
+
+<h1 id="DESCRIPTION">DESCRIPTION</h1>
+
+<p>A Matcher iterates over a set of ascending document ids. Some Matchers implement score() and can assign relevance scores to the docs that they match. Other implementations may be match-only.</p>
+
+<h1 id="CONSTRUCTORS">CONSTRUCTORS</h1>
+
+<h2 id="new-">new()</h2>
+
+<pre><code> my $matcher = MyMatcher->SUPER::new;</code></pre>
+
+<p>Abstract constructor.</p>
+
+<h1 id="ABSTRACT-METHODS">ABSTRACT METHODS</h1>
+
+<h2 id="next-">next()</h2>
+
+<p>Proceed to the next doc id.</p>
+
+<p>Returns: A positive doc id, or 0 once the iterator is exhausted.</p>
+
+<h2 id="get_doc_id-">get_doc_id()</h2>
+
+<p>Return the current doc id. Valid only after a successful call to next() or advance() and must not be called otherwise.</p>
+
+<h2 id="score-">score()</h2>
+
+<p>Return the score of the current document.</p>
+
+<p>Only Matchers which are used for scored search need implement score().</p>
+
+<h1 id="METHODS">METHODS</h1>
+
+<h2 id="advance-target-">advance(target)</h2>
+
+<p>Advance the iterator to the first doc id greater than or equal to <code>target</code>. The default implementation simply calls next() over and over, but subclasses have the option of doing something more efficient.</p>
+
+<ul>
+
+<li><p><b>target</b> - A positive doc id, which must be greater than the current doc id once the iterator has been initialized.</p>
+
+</li>
+</ul>
+
+<p>Returns: A positive doc id, or 0 once the iterator is exhausted.</p>
+
+<h1 id="INHERITANCE">INHERITANCE</h1>
+
+<p>Lucy::Search::Matcher isa <a href="../../Lucy/Object/Obj.html">Lucy::Object::Obj</a>.</p>
+
+</body>
+</html>
+
Added: websites/staging/lucy/trunk/content/docs/0.2.1/perl/Lucy/Search/NOTQuery.html
==============================================================================
--- websites/staging/lucy/trunk/content/docs/0.2.1/perl/Lucy/Search/NOTQuery.html (added)
+++ websites/staging/lucy/trunk/content/docs/0.2.1/perl/Lucy/Search/NOTQuery.html Sat Mar 31 03:36:16 2012
@@ -0,0 +1,62 @@
+
+<html>
+<head>
+<title></title>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+</head>
+<body>
+
+
+<h1 id="NAME">NAME</h1>
+
+<p>Lucy::Search::NOTQuery - Invert the result set of another Query.</p>
+
+<h1 id="SYNOPSIS">SYNOPSIS</h1>
+
+<pre><code> my $not_bar_query = Lucy::Search::NOTQuery->new(
+ negated_query => $bar_query,
+ );
+ my $foo_and_not_bar_query = Lucy::Search::ANDQuery->new(
+ children => [ $foo_query, $not_bar_query ].
+ );
+ my $hits = $searcher->hits( query => $foo_and_not_bar_query );
+ ...</code></pre>
+
+<h1 id="DESCRIPTION">DESCRIPTION</h1>
+
+<p>A NOTQuery wraps another <a href="../../Lucy/Search/Query.html">Query</a> and matches against its inverse document set. All matching docs recieve a score of 0.0.</p>
+
+<p>NOTQuery is often used in conjunction with <a href="../../Lucy/Search/ANDQuery.html">ANDQuery</a> to provide "a AND NOT b" semantics.</p>
+
+<h1 id="CONSTRUCTORS">CONSTRUCTORS</h1>
+
+<h2 id="new-labeled-params-">new( <i>[labeled params]</i> )</h2>
+
+<pre><code> my $not_query = Lucy::Search::NOTQuery->new(
+ negated_query => $query,
+ );</code></pre>
+
+<ul>
+
+<li><p><b>negated_query</b> - The Query whose result set should be inverted.</p>
+
+</li>
+</ul>
+
+<h1 id="METHODS">METHODS</h1>
+
+<h2 id="get_negated_query-">get_negated_query()</h2>
+
+<p>Accessor for the object's negated query.</p>
+
+<h2 id="set_negated_query-negated_query-">set_negated_query(negated_query)</h2>
+
+<p>Setter for the object's negated query.</p>
+
+<h1 id="INHERITANCE">INHERITANCE</h1>
+
+<p>Lucy::Search::NOTQuery isa <a href="../../Lucy/Search/PolyQuery.html">Lucy::Search::PolyQuery</a> isa <a href="../../Lucy/Search/Query.html">Lucy::Search::Query</a> isa <a href="../../Lucy/Object/Obj.html">Lucy::Object::Obj</a>.</p>
+
+</body>
+</html>
+
Added: websites/staging/lucy/trunk/content/docs/0.2.1/perl/Lucy/Search/NoMatchQuery.html
==============================================================================
--- websites/staging/lucy/trunk/content/docs/0.2.1/perl/Lucy/Search/NoMatchQuery.html (added)
+++ websites/staging/lucy/trunk/content/docs/0.2.1/perl/Lucy/Search/NoMatchQuery.html Sat Mar 31 03:36:16 2012
@@ -0,0 +1,32 @@
+
+<html>
+<head>
+<title></title>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+</head>
+<body>
+
+
+<h1 id="NAME">NAME</h1>
+
+<p>Lucy::Search::NoMatchQuery - Query which matches no documents.</p>
+
+<h1 id="DESCRIPTION">DESCRIPTION</h1>
+
+<p>NoMatchQuery is a utility class representing a query which matches nothing. Typical usage might include e.g. returning a NoMatchQuery when a <a href="../../Lucy/Search/QueryParser.html">QueryParser</a> is asked to parse an empty string.</p>
+
+<h1 id="CONSTRUCTORS">CONSTRUCTORS</h1>
+
+<h2 id="new-">new()</h2>
+
+<pre><code> my $no_match_query = Lucy::Search::NoMatchQuery->new;</code></pre>
+
+<p>Constructor. Takes no arguments.</p>
+
+<h1 id="INHERITANCE">INHERITANCE</h1>
+
+<p>Lucy::Search::NoMatchQuery isa <a href="../../Lucy/Search/Query.html">Lucy::Search::Query</a> isa <a href="../../Lucy/Object/Obj.html">Lucy::Object::Obj</a>.</p>
+
+</body>
+</html>
+
Added: websites/staging/lucy/trunk/content/docs/0.2.1/perl/Lucy/Search/ORQuery.html
==============================================================================
--- websites/staging/lucy/trunk/content/docs/0.2.1/perl/Lucy/Search/ORQuery.html (added)
+++ websites/staging/lucy/trunk/content/docs/0.2.1/perl/Lucy/Search/ORQuery.html Sat Mar 31 03:36:16 2012
@@ -0,0 +1,53 @@
+
+<html>
+<head>
+<title></title>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+</head>
+<body>
+
+
+<h1 id="NAME">NAME</h1>
+
+<p>Lucy::Search::ORQuery - Union multiple result sets.</p>
+
+<h1 id="SYNOPSIS">SYNOPSIS</h1>
+
+<pre><code> my $foo_or_bar_query = Lucy::Search::ORQuery->new(
+ children => [ $foo_query, $bar_query ],
+ );
+ my $hits = $searcher->hits( query => $foo_or_bar_query );
+ ...</code></pre>
+
+<h1 id="DESCRIPTION">DESCRIPTION</h1>
+
+<p>ORQuery is a composite <a href="../../Lucy/Search/Query.html">Query</a> which matches when any of its children match, so its result set is the union of their result sets. Matching documents recieve a summed score from all matching child Queries.</p>
+
+<h1 id="CONSTRUCTORS">CONSTRUCTORS</h1>
+
+<h2 id="new-labeled-params-">new( <i>[labeled params]</i> )</h2>
+
+<pre><code> my $foo_or_bar_query = Lucy::Search::ORQuery->new(
+ children => [ $foo_query, $bar_query ],
+ );</code></pre>
+
+<ul>
+
+<li><p><b>children</b> - An array of child Queries.</p>
+
+</li>
+</ul>
+
+<h1 id="METHODS">METHODS</h1>
+
+<h2 id="add_child-query-">add_child(query)</h2>
+
+<p>Add a child Query node.</p>
+
+<h1 id="INHERITANCE">INHERITANCE</h1>
+
+<p>Lucy::Search::ORQuery isa <a href="../../Lucy/Search/PolyQuery.html">Lucy::Search::PolyQuery</a> isa <a href="../../Lucy/Search/Query.html">Lucy::Search::Query</a> isa <a href="../../Lucy/Object/Obj.html">Lucy::Object::Obj</a>.</p>
+
+</body>
+</html>
+
Added: websites/staging/lucy/trunk/content/docs/0.2.1/perl/Lucy/Search/PhraseQuery.html
==============================================================================
--- websites/staging/lucy/trunk/content/docs/0.2.1/perl/Lucy/Search/PhraseQuery.html (added)
+++ websites/staging/lucy/trunk/content/docs/0.2.1/perl/Lucy/Search/PhraseQuery.html Sat Mar 31 03:36:16 2012
@@ -0,0 +1,56 @@
+
+<html>
+<head>
+<title></title>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+</head>
+<body>
+
+
+<h1 id="NAME">NAME</h1>
+
+<p>Lucy::Search::PhraseQuery - Query matching an ordered list of terms.</p>
+
+<h1 id="SYNOPSIS">SYNOPSIS</h1>
+
+<pre><code> my $phrase_query = Lucy::Search::PhraseQuery->new(
+ field => 'content',
+ terms => [qw( the who )],
+ );
+ my $hits = $searcher->hits( query => $phrase_query );</code></pre>
+
+<h1 id="DESCRIPTION">DESCRIPTION</h1>
+
+<p>PhraseQuery is a subclass of <a href="../../Lucy/Search/Query.html">Lucy::Search::Query</a> for matching against an ordered sequence of terms.</p>
+
+<h1 id="CONSTRUCTORS">CONSTRUCTORS</h1>
+
+<h2 id="new-labeled-params-">new( <i>[labeled params]</i> )</h2>
+
+<ul>
+
+<li><p><b>field</b> - The field that the phrase must occur in.</p>
+
+</li>
+<li><p><b>terms</b> - The ordered array of terms that must match.</p>
+
+</li>
+</ul>
+
+<h1 id="METHODS">METHODS</h1>
+
+<h2 id="get_field-">get_field()</h2>
+
+<p>Accessor for object's field attribute.</p>
+
+<h2 id="get_terms-">get_terms()</h2>
+
+<p>Accessor for object's array of terms.</p>
+
+<h1 id="INHERITANCE">INHERITANCE</h1>
+
+<p>Lucy::Search::PhraseQuery isa <a href="../../Lucy/Search/Query.html">Lucy::Search::Query</a> isa <a href="../../Lucy/Object/Obj.html">Lucy::Object::Obj</a>.</p>
+
+</body>
+</html>
+
Added: websites/staging/lucy/trunk/content/docs/0.2.1/perl/Lucy/Search/PolyQuery.html
==============================================================================
--- websites/staging/lucy/trunk/content/docs/0.2.1/perl/Lucy/Search/PolyQuery.html (added)
+++ websites/staging/lucy/trunk/content/docs/0.2.1/perl/Lucy/Search/PolyQuery.html Sat Mar 31 03:36:16 2012
@@ -0,0 +1,39 @@
+
+<html>
+<head>
+<title></title>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+</head>
+<body>
+
+
+<h1 id="NAME">NAME</h1>
+
+<p>Lucy::Search::PolyQuery - Base class for composite Query objects.</p>
+
+<h1 id="SYNOPSIS">SYNOPSIS</h1>
+
+<pre><code> sub walk {
+ my $query = shift;
+ if ( $query->isa("Lucy::Search::PolyQuery") ) {
+ if ( $query->isa("Lucy::Search::ORQuery") ) { ... }
+ elsif ( $query->isa("Lucy::Search::ANDQuery") ) { ... }
+ elsif ( $query->isa("Lucy::Search::RequiredOptionalQuery") ) {
+ ...
+ }
+ elsif ( $query->isa("Lucy::Search::NOTQuery") ) { ... }
+ }
+ else { ... }
+ }</code></pre>
+
+<h1 id="DESCRIPTION">DESCRIPTION</h1>
+
+<p>PolyQuery serves as a shared base class for <a href="../../Lucy/Search/ANDQuery.html">ANDQuery</a>, <a href="../../Lucy/Search/ORQuery.html">ORQuery</a>, <a href="../../Lucy/Search/NOTQuery.html">NOTQuery</a>, and <a href="../../Lucy/Search/RequiredOptionalQuery.html">RequiredOptionalQuery</a>. All of these classes may serve as nodes in composite Query with a tree structure which may be walked.</p>
+
+<h1 id="INHERITANCE">INHERITANCE</h1>
+
+<p>Lucy::Search::PolyQuery isa <a href="../../Lucy/Search/Query.html">Lucy::Search::Query</a> isa <a href="../../Lucy/Object/Obj.html">Lucy::Object::Obj</a>.</p>
+
+</body>
+</html>
+
Added: websites/staging/lucy/trunk/content/docs/0.2.1/perl/Lucy/Search/PolySearcher.html
==============================================================================
--- websites/staging/lucy/trunk/content/docs/0.2.1/perl/Lucy/Search/PolySearcher.html (added)
+++ websites/staging/lucy/trunk/content/docs/0.2.1/perl/Lucy/Search/PolySearcher.html Sat Mar 31 03:36:16 2012
@@ -0,0 +1,114 @@
+
+<html>
+<head>
+<title></title>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+</head>
+<body>
+
+
+<h1 id="NAME">NAME</h1>
+
+<p>Lucy::Search::PolySearcher - Aggregate results from multiple Searchers.</p>
+
+<h1 id="SYNOPSIS">SYNOPSIS</h1>
+
+<pre><code> my $schema = MySchema->new;
+ for my $server_name (@server_names) {
+ push @searchers, LucyX::Remote::SearchClient->new(
+ peer_address => "$server_name:$port",
+ password => $pass,
+ schema => $schema,
+ );
+ }
+ my $poly_searcher = Lucy::Search::PolySearcher->new(
+ schema => $schema,
+ searchers => \@searchers,
+ );
+ my $hits = $poly_searcher->hits( query => $query );</code></pre>
+
+<h1 id="DESCRIPTION">DESCRIPTION</h1>
+
+<p>The primary use for PolySearcher is to aggregate results from several remote <a href="../../Lucy/Search/Searcher.html">Searchers</a> via <a href="../../LucyX/Remote/SearchClient.html">LucyX::Remote::SearchClient</a>, diffusing the cost of searching a large corpus over multiple machines. It is also possible to aggregate results from multiple Searchers on a single machine.</p>
+
+<h1 id="CONSTRUCTORS">CONSTRUCTORS</h1>
+
+<h2 id="new-labeled-params-">new( <i>[labeled params]</i> )</h2>
+
+<pre><code> my $poly_searcher = Lucy::Search::PolySearcher->new(
+ schema => $schema,
+ searchers => \@searchers,
+ );</code></pre>
+
+<ul>
+
+<li><p><b>schema</b> - A Schema.</p>
+
+</li>
+<li><p><b>searchers</b> - An array of Searchers.</p>
+
+</li>
+</ul>
+
+<h1 id="METHODS">METHODS</h1>
+
+<h2 id="hits-labeled-params-">hits( <i>[labeled params]</i> )</h2>
+
+<p>Return a Hits object containing the top results.</p>
+
+<ul>
+
+<li><p><b>query</b> - Either a Query object or a query string.</p>
+
+</li>
+<li><p><b>offset</b> - The number of most-relevant hits to discard, typically used when "paging" through hits N at a time. Setting <code>offset</code> to 20 and <code>num_wanted</code> to 10 retrieves hits 21-30, assuming that 30 hits can be found.</p>
+
+</li>
+<li><p><b>num_wanted</b> - The number of hits you would like to see after <code>offset</code> is taken into account.</p>
+
+</li>
+<li><p><b>sort_spec</b> - A <a href="../../Lucy/Search/SortSpec.html">Lucy::Search::SortSpec</a>, which will affect how results are ranked and returned.</p>
+
+</li>
+</ul>
+
+<h2 id="doc_max-">doc_max()</h2>
+
+<p>Return the maximum number of docs in the collection represented by the Searcher, which is also the highest possible internal doc id. Documents which have been marked as deleted but not yet purged are included in this count.</p>
+
+<h2 id="doc_freq-labeled-params-">doc_freq( <i>[labeled params]</i> )</h2>
+
+<p>Return the number of documents which contain the term in the given field.</p>
+
+<ul>
+
+<li><p><b>field</b> - Field name.</p>
+
+</li>
+<li><p><b>term</b> - The term to look up.</p>
+
+</li>
+</ul>
+
+<h2 id="fetch_doc-doc_id-">fetch_doc(doc_id)</h2>
+
+<p>Retrieve a document. Throws an error if the doc id is out of range.</p>
+
+<ul>
+
+<li><p><b>doc_id</b> - A document id.</p>
+
+</li>
+</ul>
+
+<h2 id="get_schema-">get_schema()</h2>
+
+<p>Accessor for the object's <code>schema</code> member.</p>
+
+<h1 id="INHERITANCE">INHERITANCE</h1>
+
+<p>Lucy::Search::PolySearcher isa <a href="../../Lucy/Search/Searcher.html">Lucy::Search::Searcher</a> isa <a href="../../Lucy/Object/Obj.html">Lucy::Object::Obj</a>.</p>
+
+</body>
+</html>
+
Added: websites/staging/lucy/trunk/content/docs/0.2.1/perl/Lucy/Search/Query.html
==============================================================================
--- websites/staging/lucy/trunk/content/docs/0.2.1/perl/Lucy/Search/Query.html (added)
+++ websites/staging/lucy/trunk/content/docs/0.2.1/perl/Lucy/Search/Query.html Sat Mar 31 03:36:16 2012
@@ -0,0 +1,86 @@
+
+<html>
+<head>
+<title></title>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+</head>
+<body>
+
+
+<h1 id="NAME">NAME</h1>
+
+<p>Lucy::Search::Query - A specification for a search query.</p>
+
+<h1 id="SYNOPSIS">SYNOPSIS</h1>
+
+<pre><code> # Query is an abstract base class.
+ package MyQuery;
+ use base qw( Lucy::Search::Query );
+
+ sub make_compiler {
+ my $self = shift;
+ return MyCompiler->new( @_, parent => $self );
+ }
+
+ package MyCompiler;
+ use base ( Lucy::Search::Compiler );
+ ...</code></pre>
+
+<h1 id="DESCRIPTION">DESCRIPTION</h1>
+
+<p>Query objects are simple containers which contain the minimum information necessary to define a search query.</p>
+
+<p>The most common way to generate Query objects is to feed a search string such as 'foo AND bar' to a <a href="../../Lucy/Search/QueryParser.html">QueryParser's</a> parse() method, which outputs an abstract syntax tree built up from various Query subclasses such as <a href="../../Lucy/Search/ANDQuery.html">ANDQuery</a> and <a href="../../Lucy/Search/TermQuery.html">TermQuery</a>. However, it is also possible to use custom Query objects to build a search specification which cannot be easily represented using a search string.</p>
+
+<p>Subclasses of Query must implement make_compiler(), which is the first step in compiling a Query down to a <a href="../../Lucy/Search/Matcher.html">Matcher</a> which can actually match and score documents.</p>
+
+<h1 id="CONSTRUCTORS">CONSTRUCTORS</h1>
+
+<h2 id="new-labeled-params-">new( <i>[labeled params]</i> )</h2>
+
+<pre><code> my $query = MyQuery->SUPER::new(
+ boost => 2.5,
+ );</code></pre>
+
+<p>Abstract constructor.</p>
+
+<ul>
+
+<li><p><b>boost</b> - A scoring multiplier, affecting the Query's relative contribution to each document's score. Typically defaults to 1.0, but subclasses which do not contribute to document scores such as NOTQuery and MatchAllQuery default to 0.0 instead.</p>
+
+</li>
+</ul>
+
+<h1 id="ABSTRACT-METHODS">ABSTRACT METHODS</h1>
+
+<h2 id="make_compiler-labeled-params-">make_compiler( <i>[labeled params]</i> )</h2>
+
+<p>Abstract factory method returning a Compiler derived from this Query.</p>
+
+<ul>
+
+<li><p><b>searcher</b> - A Searcher.</p>
+
+</li>
+<li><p><b>boost</b> - A scoring multiplier. Defaults to the Query's own boost.</p>
+
+</li>
+</ul>
+
+<h1 id="METHODS">METHODS</h1>
+
+<h2 id="set_boost-boost-">set_boost(boost)</h2>
+
+<p>Set the Query's boost.</p>
+
+<h2 id="get_boost-">get_boost()</h2>
+
+<p>Get the Query's boost.</p>
+
+<h1 id="INHERITANCE">INHERITANCE</h1>
+
+<p>Lucy::Search::Query isa <a href="../../Lucy/Object/Obj.html">Lucy::Object::Obj</a>.</p>
+
+</body>
+</html>
+
Added: websites/staging/lucy/trunk/content/docs/0.2.1/perl/Lucy/Search/QueryParser.html
==============================================================================
--- websites/staging/lucy/trunk/content/docs/0.2.1/perl/Lucy/Search/QueryParser.html (added)
+++ websites/staging/lucy/trunk/content/docs/0.2.1/perl/Lucy/Search/QueryParser.html Sat Mar 31 03:36:16 2012
@@ -0,0 +1,247 @@
+
+<html>
+<head>
+<title></title>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+</head>
+<body>
+
+
+<h1 id="NAME">NAME</h1>
+
+<p>Lucy::Search::QueryParser - Transform a string into a Query object.</p>
+
+<h1 id="SYNOPSIS">SYNOPSIS</h1>
+
+<pre><code> my $query_parser = Lucy::Search::QueryParser->new(
+ schema => $searcher->get_schema,
+ fields => ['body'],
+ );
+ my $query = $query_parser->parse( $query_string );
+ my $hits = $searcher->hits( query => $query );</code></pre>
+
+<h1 id="DESCRIPTION">DESCRIPTION</h1>
+
+<p>QueryParser accepts search strings as input and produces <a href="../../Lucy/Search/Query.html">Lucy::Search::Query</a> objects, suitable for feeding into <a href="../../Lucy/Search/IndexSearcher.html">IndexSearcher</a> and other <a href="../../Lucy/Search/Searcher.html">Searcher</a> subclasses.</p>
+
+<p>The following syntactical constructs are recognized by QueryParser:</p>
+
+<pre><code> * Boolean operators 'AND', 'OR', and 'AND NOT'.
+ * Prepented +plus and -minus, indicating that the labeled entity
+ should be either required or forbidden -- be it a single word, a
+ phrase, or a parenthetical group.
+ * Logical groups, delimited by parentheses.
+ * Phrases, delimited by double quotes.</code></pre>
+
+<p>Additionally, the following syntax can be enabled via set_heed_colons():</p>
+
+<pre><code> * Field-specific constructs, in the form of 'fieldname:termtext' or
+ 'fieldname:(foo bar)'. (The field specified by 'fieldname:' will be
+ used instead of the QueryParser's default fields).</code></pre>
+
+<h1 id="CONSTRUCTORS">CONSTRUCTORS</h1>
+
+<h2 id="new-labeled-params-">new( <i>[labeled params]</i> )</h2>
+
+<pre><code> my $query_parser = Lucy::Search::QueryParser->new(
+ schema => $searcher->get_schema, # required
+ analyzer => $analyzer, # overrides schema
+ fields => ['bodytext'], # default: indexed fields
+ default_boolop => 'AND', # default: 'OR'
+ );</code></pre>
+
+<p>Constructor.</p>
+
+<ul>
+
+<li><p><b>schema</b> - A <a href="../../Lucy/Plan/Schema.html">Schema</a>.</p>
+
+</li>
+<li><p><b>analyzer</b> - An <a href="../../Lucy/Analysis/Analyzer.html">Analyzer</a>. Ordinarily, the analyzers specified by each field's definition will be used, but if <code>analyzer</code> is supplied, it will override and be used for all fields. This can lead to mismatches between what is in the index and what is being searched for, so use caution.</p>
+
+</li>
+<li><p><b>fields</b> - The names of the fields which will be searched against. Defaults to those fields which are defined as indexed in the supplied Schema.</p>
+
+</li>
+<li><p><b>default_boolop</b> - Two possible values: 'AND' and 'OR'. The default is 'OR', which means: return documents which match any of the query terms. If you want only documents which match all of the query terms, set this to 'AND'.</p>
+
+</li>
+</ul>
+
+<h1 id="METHODS">METHODS</h1>
+
+<h2 id="parse-query_string-">parse(query_string)</h2>
+
+<p>Build a Query object from the contents of a query string. At present, implemented internally by calling tree(), expand(), and prune().</p>
+
+<ul>
+
+<li><p><b>query_string</b> - The string to be parsed. May be undef.</p>
+
+</li>
+</ul>
+
+<p>Returns: a Query.</p>
+
+<h2 id="tree-query_string-">tree(query_string)</h2>
+
+<p>Parse the logical structure of a query string, building a tree comprised of Query objects. Leaf nodes in the tree will most often be LeafQuery objects but might be MatchAllQuery or NoMatchQuery objects as well. Internal nodes will be objects which subclass PolyQuery: ANDQuery, ORQuery, NOTQuery, and RequiredOptionalQuery.</p>
+
+<p>The output of tree() is an intermediate form which must be passed through expand() before being used to feed a search.</p>
+
+<ul>
+
+<li><p><b>query_string</b> - The string to be parsed.</p>
+
+</li>
+</ul>
+
+<p>Returns: a Query.</p>
+
+<h2 id="expand-query-">expand(query)</h2>
+
+<p>Walk the hierarchy of a Query tree, descending through all PolyQuery nodes and calling expand_leaf() on any LeafQuery nodes encountered.</p>
+
+<ul>
+
+<li><p><b>query</b> - A Query object.</p>
+
+</li>
+</ul>
+
+<p>Returns: A Query -- usually the same one that was supplied after in-place modification, but possibly another.</p>
+
+<h2 id="expand_leaf-query-">expand_leaf(query)</h2>
+
+<p>Convert a LeafQuery into either a TermQuery, a PhraseQuery, or an ORQuery joining multiple TermQueries/PhraseQueries to accommodate multiple fields. LeafQuery text will be passed through the relevant Analyzer for each field. Quoted text will be transformed into PhraseQuery objects. Unquoted text will be converted to either a TermQuery or a PhraseQuery depending on how many tokens are generated.</p>
+
+<ul>
+
+<li><p><b>query</b> - A Query. Only LeafQuery objects will be processed; others will be passed through.</p>
+
+</li>
+</ul>
+
+<p>Returns: A Query.</p>
+
+<h2 id="prune-query-">prune(query)</h2>
+
+<p>Prevent certain Query structures from returning too many results. Query objects built via tree() and expand() can generate "return the world" result sets, such as in the case of <code>NOT a_term_not_in_the_index</code>; prune() walks the hierarchy and eliminates such branches.</p>
+
+<pre><code> 'NOT foo' => [NOMATCH]
+ 'foo OR NOT bar' => 'foo'
+ 'foo OR (-bar AND -baz) => 'foo'</code></pre>
+
+<p>prune() also eliminates some double-negative constructs -- even though such constructs may not actually return the world:</p>
+
+<pre><code> 'foo AND -(-bar)' => 'foo'</code></pre>
+
+<p>In this example, safety is taking precedence over logical consistency. If you want logical consistency instead, call tree() then expand(), skipping prune().</p>
+
+<ul>
+
+<li><p><b>query</b> - A Query.</p>
+
+</li>
+</ul>
+
+<p>Returns: a Query; in most cases, the supplied Query after in-place modification.</p>
+
+<h2 id="set_heed_colons-heed_colons-">set_heed_colons(heed_colons)</h2>
+
+<p>Enable/disable parsing of <code>fieldname:foo</code> constructs.</p>
+
+<h2 id="make_term_query-labeled-params-">make_term_query( <i>[labeled params]</i> )</h2>
+
+<p>Factory method creating a TermQuery.</p>
+
+<ul>
+
+<li><p><b>field</b> - Field name.</p>
+
+</li>
+<li><p><b>term</b> - Term text.</p>
+
+</li>
+</ul>
+
+<p>Returns: A Query.</p>
+
+<h2 id="make_phrase_query-labeled-params-">make_phrase_query( <i>[labeled params]</i> )</h2>
+
+<p>Factory method creating a PhraseQuery.</p>
+
+<ul>
+
+<li><p><b>field</b> - Field that the phrase must occur in.</p>
+
+</li>
+<li><p><b>terms</b> - Ordered array of terms that must match.</p>
+
+</li>
+</ul>
+
+<p>Returns: A Query.</p>
+
+<h2 id="make_and_query-children-">make_and_query(children)</h2>
+
+<p>Factory method creating an ANDQuery.</p>
+
+<ul>
+
+<li><p><b>children</b> - Array of child Queries.</p>
+
+</li>
+</ul>
+
+<p>Returns: A Query.</p>
+
+<h2 id="make_or_query-children-">make_or_query(children)</h2>
+
+<p>Factory method creating an ORQuery.</p>
+
+<ul>
+
+<li><p><b>children</b> - Array of child Queries.</p>
+
+</li>
+</ul>
+
+<p>Returns: A Query.</p>
+
+<h2 id="make_not_query-negated_query-">make_not_query(negated_query)</h2>
+
+<p>Factory method creating a NOTQuery.</p>
+
+<ul>
+
+<li><p><b>negated_query</b> - Query to be inverted.</p>
+
+</li>
+</ul>
+
+<p>Returns: A Query.</p>
+
+<h2 id="make_req_opt_query-labeled-params-">make_req_opt_query( <i>[labeled params]</i> )</h2>
+
+<p>Factory method creating a RequiredOptionalQuery.</p>
+
+<ul>
+
+<li><p><b>required_query</b> - Query must must match.</p>
+
+</li>
+<li><p><b>optional_query</b> - Query which should match.</p>
+
+</li>
+</ul>
+
+<p>Returns: A Query.</p>
+
+<h1 id="INHERITANCE">INHERITANCE</h1>
+
+<p>Lucy::Search::QueryParser isa <a href="../../Lucy/Object/Obj.html">Lucy::Object::Obj</a>.</p>
+
+</body>
+</html>
+
Added: websites/staging/lucy/trunk/content/docs/0.2.1/perl/Lucy/Search/RangeQuery.html
==============================================================================
--- websites/staging/lucy/trunk/content/docs/0.2.1/perl/Lucy/Search/RangeQuery.html (added)
+++ websites/staging/lucy/trunk/content/docs/0.2.1/perl/Lucy/Search/RangeQuery.html Sat Mar 31 03:36:16 2012
@@ -0,0 +1,75 @@
+
+<html>
+<head>
+<title></title>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+</head>
+<body>
+
+
+<h1 id="NAME">NAME</h1>
+
+<p>Lucy::Search::RangeQuery - Match a range of values.</p>
+
+<h1 id="SYNOPSIS">SYNOPSIS</h1>
+
+<pre><code> # Match all articles by "Foo" published since the year 2000.
+ my $range_query = Lucy::Search::RangeQuery->new(
+ field => 'publication_date',
+ lower_term => '2000-01-01',
+ include_lower => 1,
+ );
+ my $author_query = Lucy::Search::TermQuery->new(
+ field => 'author_last_name',
+ text => 'Foo',
+ );
+ my $and_query = Lucy::Search::ANDQuery->new(
+ children => [ $range_query, $author_query ],
+ );
+ my $hits = $searcher->hits( query => $and_query );
+ ...</code></pre>
+
+<h1 id="DESCRIPTION">DESCRIPTION</h1>
+
+<p>RangeQuery matches documents where the value for a particular field falls within a given range.</p>
+
+<h1 id="CONSTRUCTORS">CONSTRUCTORS</h1>
+
+<h2 id="new-labeled-params-">new( <i>[labeled params]</i> )</h2>
+
+<pre><code> my $range_query = Lucy::Search::RangeQuery->new(
+ field => 'product_number', # required
+ lower_term => '003', # see below
+ upper_term => '060', # see below
+ include_lower => 0, # default true
+ include_upper => 0, # default true
+ );</code></pre>
+
+<p>Takes 5 parameters; <code>field</code> is required, as is at least one of either <code>lower_term</code> or <code>upper_term</code>.</p>
+
+<ul>
+
+<li><p><b>field</b> - The name of a <code>sortable</code> field.</p>
+
+</li>
+<li><p><b>lower_term</b> - Lower delimiter. If not supplied, all values less than <code>upper_term</code> will pass.</p>
+
+</li>
+<li><p><b>upper_term</b> - Upper delimiter. If not supplied, all values greater than <code>lower_term</code> will pass.</p>
+
+</li>
+<li><p><b>include_lower</b> - Indicates whether docs which match <code>lower_term</code> should be included in the results.</p>
+
+</li>
+<li><p><b>include_upper</b> - Indicates whether docs which match <code>upper_term</code> should be included in the results.</p>
+
+</li>
+</ul>
+
+<h1 id="INHERITANCE">INHERITANCE</h1>
+
+<p>Lucy::Search::RangeQuery isa <a href="../../Lucy/Search/Query.html">Lucy::Search::Query</a> isa <a href="../../Lucy/Object/Obj.html">Lucy::Object::Obj</a>.</p>
+
+</body>
+</html>
+
Added: websites/staging/lucy/trunk/content/docs/0.2.1/perl/Lucy/Search/RequiredOptionalQuery.html
==============================================================================
--- websites/staging/lucy/trunk/content/docs/0.2.1/perl/Lucy/Search/RequiredOptionalQuery.html (added)
+++ websites/staging/lucy/trunk/content/docs/0.2.1/perl/Lucy/Search/RequiredOptionalQuery.html Sat Mar 31 03:36:16 2012
@@ -0,0 +1,70 @@
+
+<html>
+<head>
+<title></title>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+</head>
+<body>
+
+
+<h1 id="NAME">NAME</h1>
+
+<p>Lucy::Search::RequiredOptionalQuery - Join results for two Queries, one required, one optional.</p>
+
+<h1 id="SYNOPSIS">SYNOPSIS</h1>
+
+<pre><code> my $foo_and_maybe_bar = Lucy::Search::RequiredOptionalQuery->new(
+ required_query => $foo_query,
+ optional_query => $bar_query,
+ );
+ my $hits = $searcher->hits( query => $foo_and_maybe_bar );
+ ...</code></pre>
+
+<h1 id="DESCRIPTION">DESCRIPTION</h1>
+
+<p>RequiredOptionalQuery joins the result sets of one Query which MUST match, and one Query which SHOULD match. When only the required Query matches, its score is passed along; when both match, the scores are summed.</p>
+
+<h1 id="CONSTRUCTORS">CONSTRUCTORS</h1>
+
+<h2 id="new-labeled-params-">new( <i>[labeled params]</i> )</h2>
+
+<pre><code> my $reqopt_query = Lucy::Search::RequiredOptionalQuery->new(
+ required_query => $foo_query, # required
+ optional_query => $bar_query, # required
+ );</code></pre>
+
+<ul>
+
+<li><p><b>required_query</b> - Query must must match.</p>
+
+</li>
+<li><p><b>optional_query</b> - Query which should match.</p>
+
+</li>
+</ul>
+
+<h1 id="METHODS">METHODS</h1>
+
+<h2 id="get_required_query-">get_required_query()</h2>
+
+<p>Getter for the required Query.</p>
+
+<h2 id="set_required_query-required_query-">set_required_query(required_query)</h2>
+
+<p>Setter for the required Query.</p>
+
+<h2 id="get_optional_query-">get_optional_query()</h2>
+
+<p>Getter for the optional Query.</p>
+
+<h2 id="set_optional_query-optional_query-">set_optional_query(optional_query)</h2>
+
+<p>Setter for the optional Query.</p>
+
+<h1 id="INHERITANCE">INHERITANCE</h1>
+
+<p>Lucy::Search::RequiredOptionalQuery isa <a href="../../Lucy/Search/PolyQuery.html">Lucy::Search::PolyQuery</a> isa <a href="../../Lucy/Search/Query.html">Lucy::Search::Query</a> isa <a href="../../Lucy/Object/Obj.html">Lucy::Object::Obj</a>.</p>
+
+</body>
+</html>
+
Added: websites/staging/lucy/trunk/content/docs/0.2.1/perl/Lucy/Search/Searcher.html
==============================================================================
--- websites/staging/lucy/trunk/content/docs/0.2.1/perl/Lucy/Search/Searcher.html (added)
+++ websites/staging/lucy/trunk/content/docs/0.2.1/perl/Lucy/Search/Searcher.html Sat Mar 31 03:36:16 2012
@@ -0,0 +1,124 @@
+
+<html>
+<head>
+<title></title>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+</head>
+<body>
+
+
+<h1 id="NAME">NAME</h1>
+
+<p>Lucy::Search::Searcher - Base class for searching collections of documents.</p>
+
+<h1 id="SYNOPSIS">SYNOPSIS</h1>
+
+<pre><code> # Abstract base class.</code></pre>
+
+<h1 id="DESCRIPTION">DESCRIPTION</h1>
+
+<p>Abstract base class for objects which search. Core subclasses include <a href="../../Lucy/Search/IndexSearcher.html">Lucy::Search::IndexSearcher</a> and <a href="../../Lucy/Search/PolySearcher.html">Lucy::Search::PolySearcher</a>.</p>
+
+<h1 id="CONSTRUCTORS">CONSTRUCTORS</h1>
+
+<h2 id="new-labeled-params-">new( <i>[labeled params]</i> )</h2>
+
+<pre><code> package MySearcher;
+ use base qw( Lucy::Search::Searcher );
+ sub new {
+ my $self = shift->SUPER::new;
+ ...
+ return $self;
+ }</code></pre>
+
+<p>Abstract constructor.</p>
+
+<ul>
+
+<li><p><b>schema</b> - A Schema.</p>
+
+</li>
+</ul>
+
+<h1 id="ABSTRACT-METHODS">ABSTRACT METHODS</h1>
+
+<h2 id="collect-labeled-params-">collect( <i>[labeled params]</i> )</h2>
+
+<p>Iterate over hits, feeding them into a <a href="../../Lucy/Search/Collector.html">Collector</a>.</p>
+
+<ul>
+
+<li><p><b>query</b> - A Query.</p>
+
+</li>
+<li><p><b>collector</b> - A Collector.</p>
+
+</li>
+</ul>
+
+<h2 id="doc_max-">doc_max()</h2>
+
+<p>Return the maximum number of docs in the collection represented by the Searcher, which is also the highest possible internal doc id. Documents which have been marked as deleted but not yet purged are included in this count.</p>
+
+<h2 id="doc_freq-labeled-params-">doc_freq( <i>[labeled params]</i> )</h2>
+
+<p>Return the number of documents which contain the term in the given field.</p>
+
+<ul>
+
+<li><p><b>field</b> - Field name.</p>
+
+</li>
+<li><p><b>term</b> - The term to look up.</p>
+
+</li>
+</ul>
+
+<h2 id="fetch_doc-doc_id-">fetch_doc(doc_id)</h2>
+
+<p>Retrieve a document. Throws an error if the doc id is out of range.</p>
+
+<ul>
+
+<li><p><b>doc_id</b> - A document id.</p>
+
+</li>
+</ul>
+
+<h1 id="METHODS">METHODS</h1>
+
+<h2 id="hits-labeled-params-">hits( <i>[labeled params]</i> )</h2>
+
+<p>Return a Hits object containing the top results.</p>
+
+<ul>
+
+<li><p><b>query</b> - Either a Query object or a query string.</p>
+
+</li>
+<li><p><b>offset</b> - The number of most-relevant hits to discard, typically used when "paging" through hits N at a time. Setting <code>offset</code> to 20 and <code>num_wanted</code> to 10 retrieves hits 21-30, assuming that 30 hits can be found.</p>
+
+</li>
+<li><p><b>num_wanted</b> - The number of hits you would like to see after <code>offset</code> is taken into account.</p>
+
+</li>
+<li><p><b>sort_spec</b> - A <a href="../../Lucy/Search/SortSpec.html">Lucy::Search::SortSpec</a>, which will affect how results are ranked and returned.</p>
+
+</li>
+</ul>
+
+<h2 id="glean_query-query-">glean_query(query)</h2>
+
+<p>If the supplied object is a Query, return it; if it's a query string, create a QueryParser and parse it to produce a query against all indexed fields.</p>
+
+<h2 id="get_schema-">get_schema()</h2>
+
+<p>Accessor for the object's <code>schema</code> member.</p>
+
+<h1 id="INHERITANCE">INHERITANCE</h1>
+
+<p>Lucy::Search::Searcher isa <a href="../../Lucy/Object/Obj.html">Lucy::Object::Obj</a>.</p>
+
+</body>
+</html>
+
Added: websites/staging/lucy/trunk/content/docs/0.2.1/perl/Lucy/Search/SortRule.html
==============================================================================
--- websites/staging/lucy/trunk/content/docs/0.2.1/perl/Lucy/Search/SortRule.html (added)
+++ websites/staging/lucy/trunk/content/docs/0.2.1/perl/Lucy/Search/SortRule.html Sat Mar 31 03:36:16 2012
@@ -0,0 +1,68 @@
+
+<html>
+<head>
+<title></title>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+</head>
+<body>
+
+
+<h1 id="NAME">NAME</h1>
+
+<p>Lucy::Search::SortRule - Element of a SortSpec.</p>
+
+<h1 id="SYNOPSIS">SYNOPSIS</h1>
+
+<pre><code> my $sort_spec = Lucy::Search::SortSpec->new(
+ rules => [
+ Lucy::Search::SortRule->new( field => 'date' ),
+ Lucy::Search::SortRule->new( type => 'doc_id' ),
+ ],
+ );</code></pre>
+
+<h1 id="DESCRIPTION">DESCRIPTION</h1>
+
+<p>SortRules are the building blocks used to assemble <a href="../../Lucy/Search/SortSpec.html">SortSpecs</a>; each SortRule defines a single level of sorting. For example, sorting first by "category" then by score requires a SortSpec with two SortRule elements.</p>
+
+<h1 id="CONSTRUCTORS">CONSTRUCTORS</h1>
+
+<h2 id="new-labeled-params-">new( <i>[labeled params]</i> )</h2>
+
+<pre><code> my $by_title = Lucy::Search::SortRule->new( field => 'title' );
+ my $by_score = Lucy::Search::SortRule->new( type => 'score' );
+ my $by_doc_id = Lucy::Search::SortRule->new( type => 'doc_id' );
+ my $reverse_date = Lucy::Search::SortRule->new(
+ field => 'date',
+ reverse => 1,
+ );</code></pre>
+
+<ul>
+
+<li><p><b>type</b> - Indicate whether to sort by score, field, etc. (The default is to sort by a field.)</p>
+
+</li>
+<li><p><b>field</b> - The name of a <code>sortable</code> field.</p>
+
+</li>
+<li><p><b>reverse</b> - If true, reverse the order of the sort for this rule.</p>
+
+</li>
+</ul>
+
+<h1 id="METHODS">METHODS</h1>
+
+<h2 id="get_field-">get_field()</h2>
+
+<p>Accessor for "field" member.</p>
+
+<h2 id="get_reverse-">get_reverse()</h2>
+
+<p>Accessor for "reverse" member.</p>
+
+<h1 id="INHERITANCE">INHERITANCE</h1>
+
+<p>Lucy::Search::SortRule isa <a href="../../Lucy/Object/Obj.html">Lucy::Object::Obj</a>.</p>
+
+</body>
+</html>
+
Added: websites/staging/lucy/trunk/content/docs/0.2.1/perl/Lucy/Search/SortSpec.html
==============================================================================
--- websites/staging/lucy/trunk/content/docs/0.2.1/perl/Lucy/Search/SortSpec.html (added)
+++ websites/staging/lucy/trunk/content/docs/0.2.1/perl/Lucy/Search/SortSpec.html Sat Mar 31 03:36:16 2012
@@ -0,0 +1,54 @@
+
+<html>
+<head>
+<title></title>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+</head>
+<body>
+
+
+<h1 id="NAME">NAME</h1>
+
+<p>Lucy::Search::SortSpec - Specify a custom sort order for search results.</p>
+
+<h1 id="SYNOPSIS">SYNOPSIS</h1>
+
+<pre><code> my $sort_spec = Lucy::Search::SortSpec->new(
+ rules => [
+ Lucy::Search::SortRule->new( field => 'date' ),
+ Lucy::Search::SortRule->new( type => 'doc_id' ),
+ ],
+ );
+ my $hits = $searcher->hits(
+ query => $query,
+ sort_spec => $sort_spec,
+ );</code></pre>
+
+<h1 id="DESCRIPTION">DESCRIPTION</h1>
+
+<p>By default, searches return results in order of relevance; SortSpec allows you to indicate an alternate order via an array of <a href="../../Lucy/Search/SortRule.html">SortRules</a>.</p>
+
+<p>Fields you wish to sort against must be <code>sortable</code>.</p>
+
+<p>For a stable sort (important when paging through results), add a sort-by-doc rule as the last SortRule.</p>
+
+<h1 id="CONSTRUCTORS">CONSTRUCTORS</h1>
+
+<h2 id="new-labeled-params-">new( <i>[labeled params]</i> )</h2>
+
+<pre><code> my $sort_spec = Lucy::Search::SortSpec->new( rules => \@rules );</code></pre>
+
+<ul>
+
+<li><p><b>rules</b> - An array of SortRules.</p>
+
+</li>
+</ul>
+
+<h1 id="INHERITANCE">INHERITANCE</h1>
+
+<p>Lucy::Search::SortSpec isa <a href="../../Lucy/Object/Obj.html">Lucy::Object::Obj</a>.</p>
+
+</body>
+</html>
+
Added: websites/staging/lucy/trunk/content/docs/0.2.1/perl/Lucy/Search/Span.html
==============================================================================
--- websites/staging/lucy/trunk/content/docs/0.2.1/perl/Lucy/Search/Span.html (added)
+++ websites/staging/lucy/trunk/content/docs/0.2.1/perl/Lucy/Search/Span.html Sat Mar 31 03:36:16 2012
@@ -0,0 +1,85 @@
+
+<html>
+<head>
+<title></title>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+</head>
+<body>
+
+
+<h1 id="NAME">NAME</h1>
+
+<p>Lucy::Search::Span - An offset, a length, and a weight.</p>
+
+<h1 id="SYNOPSIS">SYNOPSIS</h1>
+
+<pre><code> my $combined_length = $upper_span->get_length
+ + ( $upper_span->get_offset - $lower_span->get_offset );
+ my $combined_span = Lucy::Search::Span->new(
+ offset => $lower_span->get_offset,
+ length => $combined_length,
+ );
+ ...</code></pre>
+
+<h1 id="DESCRIPTION">DESCRIPTION</h1>
+
+<p>Span objects store information about a span across an array of... something. The unit is context-dependent.</p>
+
+<p>Text is one possibility, in which case offset and length might be measured in Unicode code points. However, the Span could also refer to a span within an array of tokens, for example -- in which case the start and offset might be measured in token positions.</p>
+
+<h1 id="CONSTRUCTORS">CONSTRUCTORS</h1>
+
+<h2 id="new-labeled-params-">new( <i>[labeled params]</i> )</h2>
+
+<pre><code> my $span = Lucy::Search::Span->new(
+ offset => 75, # required
+ length => 7, # required
+ weight => 1.0, # default 0.0
+ );</code></pre>
+
+<ul>
+
+<li><p><b>offset</b> - Integer offset, unit is context-dependent.</p>
+
+</li>
+<li><p><b>length</b> - Integer length, unit is context-dependent.</p>
+
+</li>
+<li><p><b>weight</b> - A floating point weight.</p>
+
+</li>
+</ul>
+
+<h1 id="METHODS">METHODS</h1>
+
+<h2 id="set_offset-offset-">set_offset(offset)</h2>
+
+<p>Setter for <code>offset</code> attribute.</p>
+
+<h2 id="get_offset-">get_offset()</h2>
+
+<p>Accessor for <code>offset</code> attribute.</p>
+
+<h2 id="set_length-length-">set_length(length)</h2>
+
+<p>Setter for <code>length</code> attribute.</p>
+
+<h2 id="get_length-">get_length()</h2>
+
+<p>Accessor for <code>length</code> attribute.</p>
+
+<h2 id="set_weight-weight-">set_weight(weight)</h2>
+
+<p>Setter for <code>weight</code> attribute.</p>
+
+<h2 id="get_weight-">get_weight()</h2>
+
+<p>Accessor for <code>weight</code> attribute.</p>
+
+<h1 id="INHERITANCE">INHERITANCE</h1>
+
+<p>Lucy::Search::Span isa <a href="../../Lucy/Object/Obj.html">Lucy::Object::Obj</a>.</p>
+
+</body>
+</html>
+
Added: websites/staging/lucy/trunk/content/docs/0.2.1/perl/Lucy/Search/TermQuery.html
==============================================================================
--- websites/staging/lucy/trunk/content/docs/0.2.1/perl/Lucy/Search/TermQuery.html (added)
+++ websites/staging/lucy/trunk/content/docs/0.2.1/perl/Lucy/Search/TermQuery.html Sat Mar 31 03:36:16 2012
@@ -0,0 +1,61 @@
+
+<html>
+<head>
+<title></title>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+</head>
+<body>
+
+
+<h1 id="NAME">NAME</h1>
+
+<p>Lucy::Search::TermQuery - Query which matches individual terms.</p>
+
+<h1 id="SYNOPSIS">SYNOPSIS</h1>
+
+<pre><code> my $term_query = Lucy::Search::TermQuery->new(
+ field => 'content',
+ term => 'foo',
+ );
+ my $hits = $searcher->hits( query => $term_query );</code></pre>
+
+<h1 id="DESCRIPTION">DESCRIPTION</h1>
+
+<p>TermQuery is a subclass of <a href="../../Lucy/Search/Query.html">Lucy::Search::Query</a> for matching individual terms in a specific field.</p>
+
+<h1 id="CONSTRUCTORS">CONSTRUCTORS</h1>
+
+<h2 id="new-labeled-params-">new( <i>[labeled params]</i> )</h2>
+
+<pre><code> my $term_query = Lucy::Search::TermQuery->new(
+ field => 'content', # required
+ term => 'foo', # required
+ );</code></pre>
+
+<ul>
+
+<li><p><b>field</b> - Field name.</p>
+
+</li>
+<li><p><b>term</b> - Term text.</p>
+
+</li>
+</ul>
+
+<h1 id="METHODS">METHODS</h1>
+
+<h2 id="get_field-">get_field()</h2>
+
+<p>Accessor for object's <code>field</code> member.</p>
+
+<h2 id="get_term-">get_term()</h2>
+
+<p>Accessor for object's <code>term</code> member.</p>
+
+<h1 id="INHERITANCE">INHERITANCE</h1>
+
+<p>Lucy::Search::TermQuery isa <a href="../../Lucy/Search/Query.html">Lucy::Search::Query</a> isa <a href="../../Lucy/Object/Obj.html">Lucy::Object::Obj</a>.</p>
+
+</body>
+</html>
+
Added: websites/staging/lucy/trunk/content/docs/0.2.1/perl/Lucy/Simple.html
==============================================================================
--- websites/staging/lucy/trunk/content/docs/0.2.1/perl/Lucy/Simple.html (added)
+++ websites/staging/lucy/trunk/content/docs/0.2.1/perl/Lucy/Simple.html Sat Mar 31 03:36:16 2012
@@ -0,0 +1,124 @@
+
+<html>
+<head>
+<title></title>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+</head>
+<body>
+
+
+<h1 id="NAME">NAME</h1>
+
+<p>Lucy::Simple - Basic search engine.</p>
+
+<h1 id="SYNOPSIS">SYNOPSIS</h1>
+
+<p>First, build an index of your documents.</p>
+
+<pre><code> my $index = Lucy::Simple->new(
+ path => '/path/to/index/'
+ language => 'en',
+ );
+
+ while ( my ( $title, $content ) = each %source_docs ) {
+ $index->add_doc({
+ title => $title,
+ content => $content,
+ });
+ }</code></pre>
+
+<p>Later, search the index.</p>
+
+<pre><code> my $total_hits = $index->search(
+ query => $query_string,
+ offset => 0,
+ num_wanted => 10,
+ );
+
+ print "Total hits: $total_hits\n";
+ while ( my $hit = $index->next ) {
+ print "$hit->{title}\n",
+ }</code></pre>
+
+<h1 id="DESCRIPTION">DESCRIPTION</h1>
+
+<p>Lucy::Simple is a stripped-down interface for the <a href="http://search.cpan.org/perldoc?Lucy">Apache Lucy</a> search engine library.</p>
+
+<h1 id="METHODS">METHODS</h1>
+
+<h2 id="new">new</h2>
+
+<pre><code> my $lucy = Lucy::Simple->new(
+ path => '/path/to/index/',
+ language => 'en',
+ );</code></pre>
+
+<p>Create a Lucy::Simple object, which can be used for both indexing and searching. Two hash-style parameters are required.</p>
+
+<ul>
+
+<li><p><b>path</b> - Where the index directory should be located. If no index is found at the specified location, one will be created.</p>
+
+</li>
+<li><p><b>language</b> - The language of the documents in your collection, indicated by a two-letter ISO code. 12 languages are supported:</p>
+
+<pre><code> |-----------------------|
+ | Language | ISO code |
+ |-----------------------|
+ | Danish | da |
+ | Dutch | nl |
+ | English | en |
+ | Finnish | fi |
+ | French | fr |
+ | German | de |
+ | Italian | it |
+ | Norwegian | no |
+ | Portuguese | pt |
+ | Spanish | es |
+ | Swedish | sv |
+ | Russian | ru |
+ |-----------------------|</code></pre>
+
+</li>
+</ul>
+
+<h2 id="add_doc">add_doc</h2>
+
+<pre><code> $lucy->add_doc({
+ location => $url,
+ title => $title,
+ content => $content,
+ });</code></pre>
+
+<p>Add a document to the index. The document must be supplied as a hashref, with field names as keys and content as values.</p>
+
+<h2 id="search">search</h2>
+
+<pre><code> my $total_hits = $lucy->search(
+ query => $query_string, # required
+ offset => 40, # default 0
+ num_wanted => 20, # default 10
+ );</code></pre>
+
+<p>Search the index. Returns the total number of documents which match the query. (This number is unlikely to match <code>num_wanted</code>.)</p>
+
+<ul>
+
+<li><p><b>query</b> - A search query string.</p>
+
+</li>
+<li><p><b>offset</b> - The number of most-relevant hits to discard, typically used when "paging" through hits N at a time. Setting offset to 20 and num_wanted to 10 retrieves hits 21-30, assuming that 30 hits can be found.</p>
+
+</li>
+<li><p><b>num_wanted</b> - The number of hits you would like to see after <code>offset</code> is taken into account.</p>
+
+</li>
+</ul>
+
+<h1 id="BUGS">BUGS</h1>
+
+<p>Not thread-safe.</p>
+
+</body>
+</html>
+