Added: websites/staging/lucy/trunk/content/docs/0.4.0/perl/Lucy/Search/PolyQuery.html ============================================================================== --- websites/staging/lucy/trunk/content/docs/0.4.0/perl/Lucy/Search/PolyQuery.html (added) +++ websites/staging/lucy/trunk/content/docs/0.4.0/perl/Lucy/Search/PolyQuery.html Mon Apr 4 09:23:00 2016 @@ -0,0 +1,39 @@ + +<html> +<head> +<title>Lucy::Search::PolyQuery - Apache Lucy Perl Documentation</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 Clownfish::Obj.</p> + +</body> +</html> +
Added: websites/staging/lucy/trunk/content/docs/0.4.0/perl/Lucy/Search/PolySearcher.html ============================================================================== --- websites/staging/lucy/trunk/content/docs/0.4.0/perl/Lucy/Search/PolySearcher.html (added) +++ websites/staging/lucy/trunk/content/docs/0.4.0/perl/Lucy/Search/PolySearcher.html Mon Apr 4 09:23:00 2016 @@ -0,0 +1,110 @@ + +<html> +<head> +<title>Lucy::Search::PolySearcher - Apache Lucy Perl Documentation</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 $index (@index_paths) { + push @searchers, Lucy::Search::IndexSearcher->new( index => $index ); + } + 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 indexes 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 Clownfish::Obj.</p> + +</body> +</html> + Added: websites/staging/lucy/trunk/content/docs/0.4.0/perl/Lucy/Search/Query.html ============================================================================== --- websites/staging/lucy/trunk/content/docs/0.4.0/perl/Lucy/Search/Query.html (added) +++ websites/staging/lucy/trunk/content/docs/0.4.0/perl/Lucy/Search/Query.html Mon Apr 4 09:23:00 2016 @@ -0,0 +1,92 @@ + +<html> +<head> +<title>Lucy::Search::Query - Apache Lucy Perl Documentation</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, %args ) = @_; + my $subordinate = delete $args{subordinate}; + my $compiler = MyCompiler->new( %args, parent => $self ); + $compiler->normalize unless $subordinate; + return $compiler; + } + + 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.</p> + +</li> +<li><p><b>subordinate</b> - Indicates whether the Query is a subquery (as opposed to a top-level query). If false, the implementation must invoke normalize() on the newly minted Compiler object before returning it.</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 Clownfish::Obj.</p> + +</body> +</html> + Added: websites/staging/lucy/trunk/content/docs/0.4.0/perl/Lucy/Search/QueryParser.html ============================================================================== --- websites/staging/lucy/trunk/content/docs/0.4.0/perl/Lucy/Search/QueryParser.html (added) +++ websites/staging/lucy/trunk/content/docs/0.4.0/perl/Lucy/Search/QueryParser.html Mon Apr 4 09:23:00 2016 @@ -0,0 +1,247 @@ + +<html> +<head> +<title>Lucy::Search::QueryParser - Apache Lucy Perl Documentation</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 Clownfish::Obj.</p> + +</body> +</html> + Added: websites/staging/lucy/trunk/content/docs/0.4.0/perl/Lucy/Search/RangeQuery.html ============================================================================== --- websites/staging/lucy/trunk/content/docs/0.4.0/perl/Lucy/Search/RangeQuery.html (added) +++ websites/staging/lucy/trunk/content/docs/0.4.0/perl/Lucy/Search/RangeQuery.html Mon Apr 4 09:23:00 2016 @@ -0,0 +1,75 @@ + +<html> +<head> +<title>Lucy::Search::RangeQuery - Apache Lucy Perl Documentation</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 Clownfish::Obj.</p> + +</body> +</html> + Added: websites/staging/lucy/trunk/content/docs/0.4.0/perl/Lucy/Search/RequiredOptionalQuery.html ============================================================================== --- websites/staging/lucy/trunk/content/docs/0.4.0/perl/Lucy/Search/RequiredOptionalQuery.html (added) +++ websites/staging/lucy/trunk/content/docs/0.4.0/perl/Lucy/Search/RequiredOptionalQuery.html Mon Apr 4 09:23:00 2016 @@ -0,0 +1,70 @@ + +<html> +<head> +<title>Lucy::Search::RequiredOptionalQuery - Apache Lucy Perl Documentation</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 Clownfish::Obj.</p> + +</body> +</html> + Added: websites/staging/lucy/trunk/content/docs/0.4.0/perl/Lucy/Search/Searcher.html ============================================================================== --- websites/staging/lucy/trunk/content/docs/0.4.0/perl/Lucy/Search/Searcher.html (added) +++ websites/staging/lucy/trunk/content/docs/0.4.0/perl/Lucy/Search/Searcher.html Mon Apr 4 09:23:00 2016 @@ -0,0 +1,124 @@ + +<html> +<head> +<title>Lucy::Search::Searcher - Apache Lucy Perl Documentation</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 Clownfish::Obj.</p> + +</body> +</html> + Added: websites/staging/lucy/trunk/content/docs/0.4.0/perl/Lucy/Search/SortRule.html ============================================================================== --- websites/staging/lucy/trunk/content/docs/0.4.0/perl/Lucy/Search/SortRule.html (added) +++ websites/staging/lucy/trunk/content/docs/0.4.0/perl/Lucy/Search/SortRule.html Mon Apr 4 09:23:00 2016 @@ -0,0 +1,68 @@ + +<html> +<head> +<title>Lucy::Search::SortRule - Apache Lucy Perl Documentation</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 Clownfish::Obj.</p> + +</body> +</html> + Added: websites/staging/lucy/trunk/content/docs/0.4.0/perl/Lucy/Search/SortSpec.html ============================================================================== --- websites/staging/lucy/trunk/content/docs/0.4.0/perl/Lucy/Search/SortSpec.html (added) +++ websites/staging/lucy/trunk/content/docs/0.4.0/perl/Lucy/Search/SortSpec.html Mon Apr 4 09:23:00 2016 @@ -0,0 +1,54 @@ + +<html> +<head> +<title>Lucy::Search::SortSpec - Apache Lucy Perl Documentation</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 Clownfish::Obj.</p> + +</body> +</html> + Added: websites/staging/lucy/trunk/content/docs/0.4.0/perl/Lucy/Search/Span.html ============================================================================== --- websites/staging/lucy/trunk/content/docs/0.4.0/perl/Lucy/Search/Span.html (added) +++ websites/staging/lucy/trunk/content/docs/0.4.0/perl/Lucy/Search/Span.html Mon Apr 4 09:23:00 2016 @@ -0,0 +1,85 @@ + +<html> +<head> +<title>Lucy::Search::Span - Apache Lucy Perl Documentation</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 Clownfish::Obj.</p> + +</body> +</html> + Added: websites/staging/lucy/trunk/content/docs/0.4.0/perl/Lucy/Search/TermQuery.html ============================================================================== --- websites/staging/lucy/trunk/content/docs/0.4.0/perl/Lucy/Search/TermQuery.html (added) +++ websites/staging/lucy/trunk/content/docs/0.4.0/perl/Lucy/Search/TermQuery.html Mon Apr 4 09:23:00 2016 @@ -0,0 +1,61 @@ + +<html> +<head> +<title>Lucy::Search::TermQuery - Apache Lucy Perl Documentation</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 Clownfish::Obj.</p> + +</body> +</html> + Added: websites/staging/lucy/trunk/content/docs/0.4.0/perl/Lucy/Simple.html ============================================================================== --- websites/staging/lucy/trunk/content/docs/0.4.0/perl/Lucy/Simple.html (added) +++ websites/staging/lucy/trunk/content/docs/0.4.0/perl/Lucy/Simple.html Mon Apr 4 09:23:00 2016 @@ -0,0 +1,124 @@ + +<html> +<head> +<title>Lucy::Simple - Apache Lucy Perl Documentation</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> + Added: websites/staging/lucy/trunk/content/docs/0.4.0/perl/Lucy/Store/FSFolder.html ============================================================================== --- websites/staging/lucy/trunk/content/docs/0.4.0/perl/Lucy/Store/FSFolder.html (added) +++ websites/staging/lucy/trunk/content/docs/0.4.0/perl/Lucy/Store/FSFolder.html Mon Apr 4 09:23:00 2016 @@ -0,0 +1,45 @@ + +<html> +<head> +<title>Lucy::Store::FSFolder - Apache Lucy Perl Documentation</title> +<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> +</head> +<body> + + +<h1 id="NAME">NAME</h1> + +<p>Lucy::Store::FSFolder - File System implementation of Folder.</p> + +<h1 id="SYNOPSIS">SYNOPSIS</h1> + +<pre><code> my $folder = Lucy::Store::FSFolder->new( + path => '/path/to/folder', + );</code></pre> + +<h1 id="DESCRIPTION">DESCRIPTION</h1> + +<p>Implementation of <a href="../../Lucy/Store/Folder.html">Lucy::Store::Folder</a> using a single file system directory and multiple files.</p> + +<h1 id="CONSTRUCTORS">CONSTRUCTORS</h1> + +<h2 id="new-labeled-params">new( <i>[labeled params]</i> )</h2> + +<pre><code> my $folder = Lucy::Store::FSFolder->new( + path => '/path/to/folder', + );</code></pre> + +<ul> + +<li><p><b>path</b> - Location of the index. If the specified directory does not exist already, it will NOT be created, in order to prevent misconfigured read applications from spawning bogus files -- so it may be necessary to create the directory yourself.</p> + +</li> +</ul> + +<h1 id="INHERITANCE">INHERITANCE</h1> + +<p>Lucy::Store::FSFolder isa <a href="../../Lucy/Store/Folder.html">Lucy::Store::Folder</a> isa Clownfish::Obj.</p> + +</body> +</html> + Added: websites/staging/lucy/trunk/content/docs/0.4.0/perl/Lucy/Store/Folder.html ============================================================================== --- websites/staging/lucy/trunk/content/docs/0.4.0/perl/Lucy/Store/Folder.html (added) +++ websites/staging/lucy/trunk/content/docs/0.4.0/perl/Lucy/Store/Folder.html Mon Apr 4 09:23:00 2016 @@ -0,0 +1,30 @@ + +<html> +<head> +<title>Lucy::Store::Folder - Apache Lucy Perl Documentation</title> +<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> +</head> +<body> + + +<h1 id="NAME">NAME</h1> + +<p>Lucy::Store::Folder - Abstract class representing a directory.</p> + +<h1 id="SYNOPSIS">SYNOPSIS</h1> + +<pre><code> # Abstract base class.</code></pre> + +<h1 id="DESCRIPTION">DESCRIPTION</h1> + +<p>A "file" within a Folder might be a real file on disk -- or it might be a RAM buffer. Similarly, delete() might delete a file from the file system, or a key-value pair from a hash, or something else.</p> + +<p>The archetypal implementation of Folder, <a href="../../Lucy/Store/FSFolder.html">FSFolder</a>, represents a directory on the file system holding a collection of files.</p> + +<h1 id="INHERITANCE">INHERITANCE</h1> + +<p>Lucy::Store::Folder isa Clownfish::Obj.</p> + +</body> +</html> + Added: websites/staging/lucy/trunk/content/docs/0.4.0/perl/Lucy/Store/Lock.html ============================================================================== --- websites/staging/lucy/trunk/content/docs/0.4.0/perl/Lucy/Store/Lock.html (added) +++ websites/staging/lucy/trunk/content/docs/0.4.0/perl/Lucy/Store/Lock.html Mon Apr 4 09:23:00 2016 @@ -0,0 +1,101 @@ + +<html> +<head> +<title>Lucy::Store::Lock - Apache Lucy Perl Documentation</title> +<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> +</head> +<body> + + +<h1 id="NAME">NAME</h1> + +<p>Lucy::Store::Lock - Abstract class representing an interprocess mutex lock.</p> + +<h1 id="SYNOPSIS">SYNOPSIS</h1> + +<pre><code> my $lock = $lock_factory->make_lock( + name => 'write', + timeout => 5000, + ); + $lock->obtain or die "can't get lock for " . $lock->get_name; + do_stuff(); + $lock->release;</code></pre> + +<h1 id="DESCRIPTION">DESCRIPTION</h1> + +<p>The Lock class produces an interprocess mutex lock. The default subclass uses dot-lock files, but alternative implementations are possible.</p> + +<p>Each lock must have a name which is unique per resource to be locked. Each lock also has a "host" id which should be unique per machine; it is used to help clear away stale locks.</p> + +<h1 id="CONSTRUCTORS">CONSTRUCTORS</h1> + +<h2 id="new-labeled-params">new( <i>[labeled params]</i> )</h2> + +<pre><code> my $lock = Lucy::Store::Lock->new( + name => 'commit', # required + folder => $folder, # required + host => $hostname, # required + timeout => 5000, # default: 0 + interval => 1000, # default: 100 + );</code></pre> + +<p>Abstract constructor.</p> + +<ul> + +<li><p><b>folder</b> - A Folder.</p> + +</li> +<li><p><b>name</b> - String identifying the resource to be locked, which must consist solely of characters matching [-_.A-Za-z0-9].</p> + +</li> +<li><p><b>host</b> - A unique per-machine identifier.</p> + +</li> +<li><p><b>timeout</b> - Time in milliseconds to keep retrying before abandoning the attempt to obtain() a lock.</p> + +</li> +<li><p><b>interval</b> - Time in milliseconds between retries.</p> + +</li> +</ul> + +<h1 id="ABSTRACT-METHODS">ABSTRACT METHODS</h1> + +<h2 id="request">request()</h2> + +<p>Make one attempt to acquire the lock.</p> + +<p>The semantics of request() differ depending on whether shared() returns true. If the Lock is shared(), then request() should not fail if another lock is held against the resource identified by <code>name</code> (though it might fail for other reasons). If it is not shared() -- i.e. it's an exclusive (write) lock -- then other locks should cause request() to fail.</p> + +<p>Returns: true on success, false on failure (sets Clownfish->error).</p> + +<h2 id="release">release()</h2> + +<p>Release the lock.</p> + +<h2 id="is_locked">is_locked()</h2> + +<p>Indicate whether the resource identified by this lock's name is currently locked.</p> + +<p>Returns: true if the resource is locked, false otherwise.</p> + +<h2 id="clear_stale">clear_stale()</h2> + +<p>Release all locks that meet the following three conditions: the lock name matches, the host id matches, and the process id that the lock was created under no longer identifies an active process.</p> + +<h1 id="METHODS">METHODS</h1> + +<h2 id="obtain">obtain()</h2> + +<p>Call request() once per <code>interval</code> until request() returns success or the <code>timeout</code> has been reached.</p> + +<p>Returns: true on success, false on failure (sets Clownfish->error).</p> + +<h1 id="INHERITANCE">INHERITANCE</h1> + +<p>Lucy::Store::Lock isa Clownfish::Obj.</p> + +</body> +</html> + Added: websites/staging/lucy/trunk/content/docs/0.4.0/perl/Lucy/Store/LockErr.html ============================================================================== --- websites/staging/lucy/trunk/content/docs/0.4.0/perl/Lucy/Store/LockErr.html (added) +++ websites/staging/lucy/trunk/content/docs/0.4.0/perl/Lucy/Store/LockErr.html Mon Apr 4 09:23:00 2016 @@ -0,0 +1,40 @@ + +<html> +<head> +<title>Lucy::Store::LockErr - Apache Lucy Perl Documentation</title> +<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> +</head> +<body> + + +<h1 id="NAME">NAME</h1> + +<p>Lucy::Store::LockErr - Lock exception.</p> + +<h1 id="SYNOPSIS">SYNOPSIS</h1> + +<pre><code> while (1) { + my $bg_merger = eval { + Lucy::Index::BackgroundMerger->new( index => $index ); + }; + if ( blessed($@) and $@->isa("Lucy::Store::LockErr") ) { + warn "Retrying...\n"; + } + elsif (!$bg_merger) { + # Re-throw. + die "Failed to open BackgroundMerger: $@"; + } + ... + }</code></pre> + +<h1 id="DESCRIPTION">DESCRIPTION</h1> + +<p>LockErr is a subclass of <a href="http://search.cpan.org/perldoc?Clownfish::Err">Err</a> which indicates that a file locking problem occurred.</p> + +<h1 id="INHERITANCE">INHERITANCE</h1> + +<p>Lucy::Store::LockErr isa Clownfish::Err isa Clownfish::Obj.</p> + +</body> +</html> + Added: websites/staging/lucy/trunk/content/docs/0.4.0/perl/Lucy/Store/LockFactory.html ============================================================================== --- websites/staging/lucy/trunk/content/docs/0.4.0/perl/Lucy/Store/LockFactory.html (added) +++ websites/staging/lucy/trunk/content/docs/0.4.0/perl/Lucy/Store/LockFactory.html Mon Apr 4 09:23:00 2016 @@ -0,0 +1,96 @@ + +<html> +<head> +<title>Lucy::Store::LockFactory - Apache Lucy Perl Documentation</title> +<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> +</head> +<body> + + +<h1 id="NAME">NAME</h1> + +<p>Lucy::Store::LockFactory - Create Locks.</p> + +<h1 id="SYNOPSIS">SYNOPSIS</h1> + +<pre><code> use Sys::Hostname qw( hostname ); + my $hostname = hostname() or die "Can't get unique hostname"; + my $folder = Lucy::Store::FSFolder->new( + path => '/path/to/index', + ); + my $lock_factory = Lucy::Store::LockFactory->new( + folder => $folder, + host => $hostname, + ); + my $write_lock = $lock_factory->make_lock( + name => 'write', + timeout => 5000, + interval => 100, + );</code></pre> + +<h1 id="DESCRIPTION">DESCRIPTION</h1> + +<p>LockFactory is used to spin off interprocess mutex locks used by various index reading and writing components. The default implementation uses lockfiles, but LockFactory subclasses which are implemented using alternatives such as flock() are possible.</p> + +<h1 id="CONSTRUCTORS">CONSTRUCTORS</h1> + +<h2 id="new-labeled-params">new( <i>[labeled params]</i> )</h2> + +<pre><code> my $lock_factory = Lucy::Store::LockFactory->new( + folder => $folder, # required + host => $hostname, # required + );</code></pre> + +<ul> + +<li><p><b>folder</b> - A <a href="../../Lucy/Store/Folder.html">Lucy::Store::Folder</a>.</p> + +</li> +<li><p><b>host</b> - An identifier which should be unique per-machine.</p> + +</li> +</ul> + +<h1 id="METHODS">METHODS</h1> + +<h2 id="make_lock-labeled-params">make_lock( <i>[labeled params]</i> )</h2> + +<p>Return a Lock object, which, once obtain() returns successfully, maintains an exclusive lock on a resource.</p> + +<ul> + +<li><p><b>name</b> - A file-system-friendly id which identifies the resource to be locked.</p> + +</li> +<li><p><b>timeout</b> - Time in milliseconds to keep retrying before abandoning the attempt to obtain() a lock.</p> + +</li> +<li><p><b>interval</b> - Time in milliseconds between retries.</p> + +</li> +</ul> + +<h2 id="make_shared_lock-labeled-params">make_shared_lock( <i>[labeled params]</i> )</h2> + +<p>Return a Lock object for which shared() returns true, and which maintains a non-exclusive lock on a resource once obtain() returns success.</p> + +<ul> + +<li><p><b>name</b> - A file-system-friendly id which identifies the resource to be locked.</p> + +</li> +<li><p><b>timeout</b> - Time in milliseconds to keep retrying before abandoning the attempt to obtain() a lock.</p> + +</li> +<li><p><b>interval</b> - Time in milliseconds between retries.</p> + +</li> +</ul> + +<h1 id="INHERITANCE">INHERITANCE</h1> + +<p>Lucy::Store::LockFactory isa Clownfish::Obj.</p> + +</body> +</html> + Added: websites/staging/lucy/trunk/content/docs/0.4.0/perl/Lucy/Store/RAMFolder.html ============================================================================== --- websites/staging/lucy/trunk/content/docs/0.4.0/perl/Lucy/Store/RAMFolder.html (added) +++ websites/staging/lucy/trunk/content/docs/0.4.0/perl/Lucy/Store/RAMFolder.html Mon Apr 4 09:23:00 2016 @@ -0,0 +1,48 @@ + +<html> +<head> +<title>Lucy::Store::RAMFolder - Apache Lucy Perl Documentation</title> +<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> +</head> +<body> + + +<h1 id="NAME">NAME</h1> + +<p>Lucy::Store::RAMFolder - In-memory Folder implementation.</p> + +<h1 id="SYNOPSIS">SYNOPSIS</h1> + +<pre><code> my $folder = Lucy::Store::RAMFolder->new; + + # or sometimes... + my $folder = Lucy::Store::RAMFolder->new( + path => $relative_path, + );</code></pre> + +<h1 id="DESCRIPTION">DESCRIPTION</h1> + +<p>RAMFolder is an entirely in-memory implementation of <a href="../../Lucy/Store/Folder.html">Lucy::Store::Folder</a>, primarily used for testing and development.</p> + +<h1 id="CONSTRUCTORS">CONSTRUCTORS</h1> + +<h2 id="new-labeled-params">new( <i>[labeled params]</i> )</h2> + +<pre><code> my $folder = Lucy::Store::RAMFolder->new( + path => $relative_path, # default: empty string + );</code></pre> + +<ul> + +<li><p><b>path</b> - Relative path, used for subfolders.</p> + +</li> +</ul> + +<h1 id="INHERITANCE">INHERITANCE</h1> + +<p>Lucy::Store::RAMFolder isa <a href="../../Lucy/Store/Folder.html">Lucy::Store::Folder</a> isa Clownfish::Obj.</p> + +</body> +</html> + Added: websites/staging/lucy/trunk/content/docs/0.4.0/perl/LucyX/Index/ByteBufDocReader.html ============================================================================== --- websites/staging/lucy/trunk/content/docs/0.4.0/perl/LucyX/Index/ByteBufDocReader.html (added) +++ websites/staging/lucy/trunk/content/docs/0.4.0/perl/LucyX/Index/ByteBufDocReader.html Mon Apr 4 09:23:00 2016 @@ -0,0 +1,24 @@ + +<html> +<head> +<title>LucyX::Index::ByteBufDocReader - Apache Lucy Perl Documentation</title> +<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> +</head> +<body> + + +<h1 id="NAME">NAME</h1> + +<p>LucyX::Index::ByteBufDocReader - Read a Doc as a fixed-width byte array.</p> + +<h1 id="SYNOPSIS">SYNOPSIS</h1> + +<pre><code> # See LucyX::Index::ByteBufDocWriter</code></pre> + +<h1 id="DESCRIPTION">DESCRIPTION</h1> + +<p>This is a proof-of-concept class to demonstrate alternate implementations for fetching documents. It is unsupported.</p> + +</body> +</html> + Added: websites/staging/lucy/trunk/content/docs/0.4.0/perl/LucyX/Index/ByteBufDocWriter.html ============================================================================== --- websites/staging/lucy/trunk/content/docs/0.4.0/perl/LucyX/Index/ByteBufDocWriter.html (added) +++ websites/staging/lucy/trunk/content/docs/0.4.0/perl/LucyX/Index/ByteBufDocWriter.html Mon Apr 4 09:23:00 2016 @@ -0,0 +1,86 @@ + +<html> +<head> +<title>LucyX::Index::ByteBufDocWriter - Apache Lucy Perl Documentation</title> +<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> +</head> +<body> + + +<h1 id="NAME">NAME</h1> + +<p>LucyX::Index::ByteBufDocWriter - Write a Doc as a fixed-width byte array.</p> + +<h1 id="SYNOPSIS">SYNOPSIS</h1> + +<p>Create an <a href="../../Lucy/Plan/Architecture.html">Architecture</a> subclass which overrides register_doc_writer() and register_doc_reader():</p> + +<pre><code> package MyArchitecture; + use base qw( Lucy::Plan::Architecture ); + use LucyX::Index::ByteBufDocReader; + use LucyX::Index::ByteBufDocWriter; + + sub register_doc_writer { + my ( $self, $seg_writer ) = @_; + my $doc_writer = LucyX::Index::ByteBufDocWriter->new( + width => 16, + field => 'value', + 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::ByteBufDocReader->new( + width => 16, + field => 'value', + 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 { MyArchitecture->new }</code></pre> + +<p>Proceed as normal in your indexer app, making sure that every supplied document supplies a valid value for the field in question:</p> + +<pre><code> $indexer->add_doc({ + title => $title, + content => $content, + id => $id, # <---- Must meet spec. + });</code></pre> + +<p>Then, in your search app:</p> + +<pre><code> my $searcher = Lucy::Search::IndexSearcher->new( + index => '/path/to/index', + ); + my $hits = $searcher->hits( query => $query ); + while ( my $id = $hits->next ) { + my $real_doc = $external_document_source->fetch( $doc->{value} ); + ... + }</code></pre> + +<h1 id="DESCRIPTION">DESCRIPTION</h1> + +<p>This is a proof-of-concept class to demonstrate alternate implementations for fetching documents. It is unsupported.</p> + +</body> +</html> + Added: websites/staging/lucy/trunk/content/docs/0.4.0/perl/LucyX/Index/LongFieldSim.html ============================================================================== --- websites/staging/lucy/trunk/content/docs/0.4.0/perl/LucyX/Index/LongFieldSim.html (added) +++ websites/staging/lucy/trunk/content/docs/0.4.0/perl/LucyX/Index/LongFieldSim.html Mon Apr 4 09:23:00 2016 @@ -0,0 +1,79 @@ + +<html> +<head> +<title>LucyX::Index::LongFieldSim - Apache Lucy Perl Documentation</title> +<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> +</head> +<body> + + +<h1 id="NAME">NAME</h1> + +<p>LucyX::Index::LongFieldSim - Similarity optimized for long fields.</p> + +<h1 id="SYNOPSIS">SYNOPSIS</h1> + +<pre><code> package MySchema::body; + use base qw( Lucy::Plan::FullTextType ); + use LucyX::Index::LongFieldSim; + sub make_similarity { LucyX::Index::LongFieldSim->new }</code></pre> + +<h1 id="DESCRIPTION">DESCRIPTION</h1> + +<p>Apache Lucy's default <a href="../../Lucy/Index/Similarity.html">Similarity</a> implmentation produces a bias towards extremely short fields.</p> + +<pre><code> Lucy::Index::Similarity + + | more weight + | * + | ** + | *** + | ********** + | ******************** + | ******************************* + | less weight **** + |------------------------------------------------------------------------ + fewer tokens more tokens</code></pre> + +<p>LongFieldSim eliminates this bias.</p> + +<pre><code> LucyX::Index::LongFieldSim + + | more weight + | + | + | + |***************** + | ******************** + | ******************************* + | less weight **** + |------------------------------------------------------------------------ + fewer tokens more tokens</code></pre> + +<p>In most cases, the default bias towards short fields is desirable. For instance, say you have two documents:</p> + +<ul> + +<li><p>"George Washington"</p> + +</li> +<li><p>"George Washington Carver"</p> + +</li> +</ul> + +<p>If a user searches for "george washington", we want the exact title match to appear first. Under the default Similarity implementation it will, because the "Carver" in "George Washington Carver" dilutes the impact of the other two tokens.</p> + +<p>However, under LongFieldSim, the two titles will yield equal scores. That would be bad in this particular case, but it could be good in another.</p> + +<pre><code> "George Washington Carver is cool." + + "George Washington Carver was born on the eve of the US Civil War, in + 1864. His exact date of birth is unknown... Carver's research in crop + rotation revolutionized agriculture..."</code></pre> + +<p>The first document is succinct, but useless. Unfortunately, the default similarity will assess it as extremely relevant to a query of "george washington carver". However, under LongFieldSim, the short-field bias is eliminated, and the addition of other mentions of Carver's name in the second document yield a higher score and a higher rank.</p> + +</body> +</html> + Added: websites/staging/lucy/trunk/content/docs/0.4.0/perl/LucyX/Index/ZlibDocReader.html ============================================================================== --- websites/staging/lucy/trunk/content/docs/0.4.0/perl/LucyX/Index/ZlibDocReader.html (added) +++ websites/staging/lucy/trunk/content/docs/0.4.0/perl/LucyX/Index/ZlibDocReader.html Mon Apr 4 09:23:00 2016 @@ -0,0 +1,20 @@ + +<html> +<head> +<title>LucyX::Index::ZlibDocReader - Apache Lucy Perl Documentation</title> +<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> +</head> +<body> + + +<h1 id="NAME">NAME</h1> + +<p>LucyX::Index::ZlibDocReader - Compressed doc storage.</p> + +<h1 id="DESCRIPTION">DESCRIPTION</h1> + +<p>This is a proof-of-concept class to demonstrate alternate implementations for fetching documents. It is unsupported.</p> + +</body> +</html> + Added: websites/staging/lucy/trunk/content/docs/0.4.0/perl/LucyX/Index/ZlibDocWriter.html ============================================================================== --- websites/staging/lucy/trunk/content/docs/0.4.0/perl/LucyX/Index/ZlibDocWriter.html (added) +++ websites/staging/lucy/trunk/content/docs/0.4.0/perl/LucyX/Index/ZlibDocWriter.html Mon Apr 4 09:23:00 2016 @@ -0,0 +1,20 @@ + +<html> +<head> +<title>LucyX::Index::ZlibDocWriter - Apache Lucy Perl Documentation</title> +<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> +</head> +<body> + + +<h1 id="NAME">NAME</h1> + +<p>LucyX::Index::ZlibDocWriter - Compressed doc storage.</p> + +<h1 id="DESCRIPTION">DESCRIPTION</h1> + +<p>This is a proof-of-concept class to demonstrate alternate implementations for fetching documents. It is unsupported.</p> + +</body> +</html> + Added: websites/staging/lucy/trunk/content/docs/0.4.0/perl/LucyX/Remote/ClusterSearcher.html ============================================================================== --- websites/staging/lucy/trunk/content/docs/0.4.0/perl/LucyX/Remote/ClusterSearcher.html (added) +++ websites/staging/lucy/trunk/content/docs/0.4.0/perl/LucyX/Remote/ClusterSearcher.html Mon Apr 4 09:23:00 2016 @@ -0,0 +1,47 @@ + +<html> +<head> +<title>LucyX::Remote::ClusterSearcher - Apache Lucy Perl Documentation</title> +<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> +</head> +<body> + + +<h1 id="NAME">NAME</h1> + +<p>LucyX::Remote::ClusterSearcher - Search multiple remote indexes.</p> + +<h1 id="SYNOPSIS">SYNOPSIS</h1> + +<pre><code> my $searcher = eval { + LucyX::Remote::ClusterSearcher->new( + schema => MySchema->new, + shards => [ 'search1:7890', 'search2:7890', 'search3:7890' ], + ); + }; + ... + my $hits = eval { $searcher->hits( query => $query ) };</code></pre> + +<h1 id="DESCRIPTION">DESCRIPTION</h1> + +<p>ClusterSearcher is a subclass of <a href="../../Lucy/Search/Searcher.html">Lucy::Search::Searcher</a> which can be used to search a composite index made up of multiple shards, where each shard is represented by a host:port pair running <a href="../../LucyX/Remote/SearchServer.html">LucyX::Remote::SearchServer</a>.</p> + +<h1 id="METHODS">METHODS</h1> + +<h2 id="new">new</h2> + +<p>Constructor. Takes hash-style params.</p> + +<ul> + +<li><p><b>schema</b> - A Schema, which must match the Schema used by each remote node.</p> + +</li> +<li><p><b>shards</b> - An array of host:port pairs running LucyX::Remote::SearchServer instances, which identifying the shards that make up the composite index.</p> + +</li> +</ul> + +</body> +</html> + Added: websites/staging/lucy/trunk/content/docs/0.4.0/perl/LucyX/Remote/SearchClient.html ============================================================================== --- websites/staging/lucy/trunk/content/docs/0.4.0/perl/LucyX/Remote/SearchClient.html (added) +++ websites/staging/lucy/trunk/content/docs/0.4.0/perl/LucyX/Remote/SearchClient.html Mon Apr 4 09:23:00 2016 @@ -0,0 +1,42 @@ + +<html> +<head> +<title>LucyX::Remote::SearchClient - Apache Lucy Perl Documentation</title> +<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> +</head> +<body> + + +<p>Make a remote procedure call. For every call that does not close/terminate the socket connection, expect a response back that's been serialized using Storable.</p> + +<h1 id="NAME">NAME</h1> + +<p>LucyX::Remote::SearchClient - Connect to a remote SearchServer.</p> + +<h1 id="SYNOPSIS">SYNOPSIS</h1> + +<pre><code> my $client = LucyX::Remote::SearchClient->new( + peer_address => 'searchserver1:7890', + ); + my $hits = $client->hits( query => $query );</code></pre> + +<h1 id="DESCRIPTION">DESCRIPTION</h1> + +<p>SearchClient is a subclass of <a href="../../Lucy/Search/Searcher.html">Lucy::Search::Searcher</a> which can be used to search an index on a remote machine made accessible via <a href="../../LucyX/Remote/SearchServer.html">SearchServer</a>.</p> + +<h1 id="METHODS">METHODS</h1> + +<h2 id="new">new</h2> + +<p>Constructor. Takes hash-style params.</p> + +<ul> + +<li><p><b>peer_address</b> - The name/IP and the port number which the client should attempt to connect to.</p> + +</li> +</ul> + +</body> +</html> + Added: websites/staging/lucy/trunk/content/docs/0.4.0/perl/LucyX/Remote/SearchServer.html ============================================================================== --- websites/staging/lucy/trunk/content/docs/0.4.0/perl/LucyX/Remote/SearchServer.html (added) +++ websites/staging/lucy/trunk/content/docs/0.4.0/perl/LucyX/Remote/SearchServer.html Mon Apr 4 09:23:00 2016 @@ -0,0 +1,72 @@ + +<html> +<head> +<title>LucyX::Remote::SearchServer - Apache Lucy Perl Documentation</title> +<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> +</head> +<body> + + +<h1 id="NAME">NAME</h1> + +<p>LucyX::Remote::SearchServer - Make a Searcher remotely accessible.</p> + +<h1 id="SYNOPSIS">SYNOPSIS</h1> + +<pre><code> my $searcher = Lucy::Search::IndexSearcher->new( + index => '/path/to/index' + ); + my $search_server = LucyX::Remote::SearchServer->new( + searcher => $searcher + ); + $search_server->serve( + port => 7890 + );</code></pre> + +<h1 id="DESCRIPTION">DESCRIPTION</h1> + +<p>The SearchServer class, in conjunction with either <a href="../../LucyX/Remote/SearchClient.html">SearchClient</a> or <a href="../../LucyX/Remote/ClusterSearcher.html">ClusterSearcher</a>, makes it possible to run a search on one machine and report results on another.</p> + +<p>By aggregating several SearchClients under a ClusterSearcher, the cost of searching what might have been a prohibitively large monolithic index can be distributed across multiple nodes, each with its own, smaller index.</p> + +<h1 id="METHODS">METHODS</h1> + +<h2 id="new">new</h2> + +<pre><code> my $search_server = LucyX::Remote::SearchServer->new( + searcher => $searcher, # required + );</code></pre> + +<p>Constructor. Takes hash-style parameters.</p> + +<ul> + +<li><p><b>searcher</b> - the <a href="../../Lucy/Search/IndexSearcher.html">Searcher</a> that the SearchServer will wrap.</p> + +</li> +</ul> + +<h2 id="serve">serve</h2> + +<pre><code> $search_server->serve( + port => 7890, # required + );</code></pre> + +<p>Open a listening socket on localhost and wait for SearchClients to connect.</p> + +<ul> + +<li><p><b>port</b> - the port on localhost that the server should open and listen on.</p> + +</li> +</ul> + +<h2 id="serve_rpc">serve_rpc</h2> + +<pre><code> my $status = $search_server->serve_rpc($sock);</code></pre> + +<p>Handle a single RPC from socket $sock. Returns 'done' if the connection should be closed. Returns 'terminate' if the server should shut down. Returns 'continue' if the server should continue to handle requests from this client.</p> + +</body> +</html> + Added: websites/staging/lucy/trunk/content/docs/0.4.0/perl/LucyX/Search/Filter.html ============================================================================== --- websites/staging/lucy/trunk/content/docs/0.4.0/perl/LucyX/Search/Filter.html (added) +++ websites/staging/lucy/trunk/content/docs/0.4.0/perl/LucyX/Search/Filter.html Mon Apr 4 09:23:00 2016 @@ -0,0 +1,68 @@ + +<html> +<head> +<title>LucyX::Search::Filter - Apache Lucy Perl Documentation</title> +<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> +</head> +<body> + + +<h1 id="NAME">NAME</h1> + +<p>LucyX::Search::Filter - Build a caching filter based on results of a Query.</p> + +<h1 id="SYNOPSIS">SYNOPSIS</h1> + +<pre><code> my %category_filters; + for my $category (qw( sweet sour salty bitter )) { + my $cat_query = Lucy::Search::TermQuery->new( + field => 'category', + term => $category, + ); + $category_filters{$category} = LucyX::Search::Filter->new( + query => $cat_query, + ); + } + + while ( my $cgi = CGI::Fast->new ) { + my $user_query = $cgi->param('q'); + my $filter = $category_filters{ $cgi->param('category') }; + my $and_query = Lucy::Search::ANDQuery->new; + $and_query->add_child($user_query); + $and_query->add_child($filter); + my $hits = $searcher->hits( query => $and_query ); + ...</code></pre> + +<h1 id="DESCRIPTION">DESCRIPTION</h1> + +<p>A Filter is a <a href="../../Lucy/Search/Query.html">Lucy::Search::Query</a> subclass that can be used to filter the results of another Query. The effect is very similar to simply using the wrapped inner query, but there are two important differences:</p> + +<ul> + +<li><p>A Filter does not contribute to the score of the documents it matches.</p> + +</li> +<li><p>A Filter caches its results, so it is more efficient if you use it more than once.</p> + +</li> +</ul> + +<p>To obtain logically equivalent results to the Filter but avoid the caching, substitute the wrapped query but use set_boost() to set its <code>boost</code> to 0.</p> + +<h1 id="METHODS">METHODS</h1> + +<h2 id="new">new</h2> + +<pre><code> my $filter = LucyX::Search::Filter->new( + query => $query; + );</code></pre> + +<p>Constructor. Takes one hash-style parameter, <code>query</code>, which must be an object belonging to a subclass of <a href="../../Lucy/Search/Query.html">Lucy::Search::Query</a>.</p> + +<h1 id="BUGS">BUGS</h1> + +<p>Filters do not cache when used in a search cluster with LucyX::Remote's SearchServer and SearchClient.</p> + +</body> +</html> + Added: websites/staging/lucy/trunk/content/docs/0.4.0/perl/LucyX/Search/MockMatcher.html ============================================================================== --- websites/staging/lucy/trunk/content/docs/0.4.0/perl/LucyX/Search/MockMatcher.html (added) +++ websites/staging/lucy/trunk/content/docs/0.4.0/perl/LucyX/Search/MockMatcher.html Mon Apr 4 09:23:00 2016 @@ -0,0 +1,36 @@ + +<html> +<head> +<title>LucyX::Search::MockMatcher - Apache Lucy Perl Documentation</title> +<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> +</head> +<body> + + +<h1 id="NAME">NAME</h1> + +<p>LucyX::Search::MockMatcher - Matcher with arbitrary docs and scores.</p> + +<h1 id="DESCRIPTION">DESCRIPTION</h1> + +<p>Used for testing combining <a href="../../Lucy/Search/Matcher.html">Matchers</a> such as ANDMatcher, MockMatcher allows arbitrary match criteria to be supplied, obviating the need for clever index construction to cover corner cases.</p> + +<p>MockMatcher is a testing and demonstration class; it is unsupported.</p> + +<h1 id="CONSTRUCTORS">CONSTRUCTORS</h1> + +<h2 id="new-labeled-params">new( [<i>labeled params</i>] )</h2> + +<ul> + +<li><p><b>doc_ids</b> - A sorted array of <a href="../../Lucy/Docs/DocIDs.html">doc_ids</a>.</p> + +</li> +<li><p><b>scores</b> - An array of scores, one for each doc_id.</p> + +</li> +</ul> + +</body> +</html> + Added: websites/staging/lucy/trunk/content/docs/0.4.0/perl/LucyX/Search/ProximityQuery.html ============================================================================== --- websites/staging/lucy/trunk/content/docs/0.4.0/perl/LucyX/Search/ProximityQuery.html (added) +++ websites/staging/lucy/trunk/content/docs/0.4.0/perl/LucyX/Search/ProximityQuery.html Mon Apr 4 09:23:00 2016 @@ -0,0 +1,61 @@ + +<html> +<head> +<title>LucyX::Search::ProximityQuery - Apache Lucy Perl Documentation</title> +<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> +</head> +<body> + + +<h1 id="NAME">NAME</h1> + +<p>LucyX::Search::ProximityQuery - Query matching an ordered list of terms.</p> + +<h1 id="SYNOPSIS">SYNOPSIS</h1> + +<pre><code> my $proximity_query = LucyX::Search::ProximityQuery->new( + field => 'content', + terms => [qw( the who )], + within => 10, # match within 10 positions + ); + my $hits = $searcher->hits( query => $proximity_query );</code></pre> + +<h1 id="DESCRIPTION">DESCRIPTION</h1> + +<p>ProximityQuery 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> + +<h2 id="get_within">get_within()</h2> + +<p>Accessor for object's within attribute.</p> + +<h1 id="INHERITANCE">INHERITANCE</h1> + +<p>LucyX::Search::ProximityQuery isa <a href="../../Lucy/Search/Query.html">Lucy::Search::Query</a> isa Clownfish::Obj.</p> + +</body> +</html> +