Added: websites/staging/lucy/trunk/content/docs/perl/Lucy/Docs/IRTheory.html ============================================================================== --- websites/staging/lucy/trunk/content/docs/perl/Lucy/Docs/IRTheory.html (added) +++ websites/staging/lucy/trunk/content/docs/perl/Lucy/Docs/IRTheory.html Mon Apr 4 09:23:29 2016 @@ -0,0 +1,157 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> +<html lang="en"> + <head> + <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> + <title>Lucy::Docs::IRTheory â Apache Lucy Documentation</title> + <link rel="stylesheet" type="text/css" media="screen" href="/css/lucy.css"> + </head> + + <body> + + <div id="lucy-rigid_wrapper"> + + <div id="lucy-top" class="container_16 lucy-white_box_3d"> + + <div id="lucy-logo_box" class="grid_8"> + <a href="/"><img src="/images/lucy_logo_150x100.png" alt="Apache Lucyâ¢"></a> + </div> <!-- lucy-logo_box --> + + <div #id="lucy-top_nav_box" class="grid_8"> + <div id="lucy-top_nav_bar" class="container_8"> + <ul> + <li><a href="http://www.apache.org/" title="Apache Software Foundation">Apache Software Foundation</a></li> + <li><a href="http://www.apache.org/licenses/" title="License">License</a></li> + <li><a href="http://www.apache.org/foundation/sponsorship.html" title="Sponsorship">Sponsorship</a></li> + <li><a href="http://www.apache.org/foundation/thanks.html" title="Thanks">Thanks</a></li> + <li><a href="http://www.apache.org/security/ " title="Security">Security</a></li> + </ul> + </div> <!-- lucy-top_nav_bar --> + <p><a href="http://www.apache.org/">Apache</a> » <a href="/">Lucy</a> » <a href="/docs/">Docs</a> » <a href="/docs/perl/">Perl</a> » <a href="/docs/perl/Lucy/">Lucy</a> » <a href="/docs/perl/Lucy/Docs/">Docs</a></p> + <form name="lucy-top_search_box" id="lucy-top_search_box" action="http://www.google.com/search" method="get"> + <input value="*.apache.org" name="sitesearch" type="hidden"/> + <input type="text" name="q" id="query" style="width:85%"> + <input type="submit" id="submit" value="Search"> + </form> + </div> <!-- lucy-top_nav_box --> + + <div class="clear"></div> + + </div> <!-- lucy-top --> + + <div id="lucy-main_content" class="container_16 lucy-white_box_3d"> + + <div class="grid_4" id="lucy-left_nav_box"> + <h6>About</h6> + <ul> + <li><a href="/">Welcome</a></li> + <li><a href="/clownfish.html">Clownfish</a></li> + <li><a href="/faq.html">FAQ</a></li> + <li><a href="/people.html">People</a></li> + </ul> + <h6>Resources</h6> + <ul> + <li><a href="/download.html">Download</a></li> + <li><a href="/mailing_lists.html">Mailing Lists</a></li> + <li><a href="/docs/perl/">Documentation</a></li> + <li><a href="http://wiki.apache.org/lucy/">Wiki</a></li> + <li><a href="https://issues.apache.org/jira/browse/LUCY">Issue Tracker</a></li> + <li><a href="/version_control.html">Version Control</a></li> + </ul> + <h6>Related Projects</h6> + <ul> + <li><a href="http://lucene.apache.org/core/">Lucene</a></li> + <li><a href="http://dezi.org/">Dezi</a></li> + <li><a href="http://lucene.apache.org/solr/">Solr</a></li> + <li><a href="http://lucenenet.apache.org/">Lucene.NET</a></li> + <li><a href="http://lucene.apache.org/pylucene/">PyLucene</a></li> + </ul> + </div> <!-- lucy-left_nav_box --> + + <div id="lucy-main_content_box" class="grid_9"> + <div> +<a name='___top' class='dummyTopAnchor' ></a> + +<h2><a class='u' +name="NAME" +>NAME</a></h2> + +<p>Lucy::Docs::IRTheory - Crash course in information retrieval</p> + +<h2><a class='u' +name="DESCRIPTION" +>DESCRIPTION</a></h2> + +<p>Just enough Information Retrieval theory to find your way around Apache Lucy.</p> + +<h3><a class='u' +name="Terminology" +>Terminology</a></h3> + +<p>Lucy uses some terminology from the field of information retrieval which may be unfamiliar to many users. +“Document” and “term” mean pretty much what you’d expect them to, +but others such as “posting” and “inverted index” need a formal introduction:</p> + +<ul> +<li><i>document</i> - An atomic unit of retrieval.</li> + +<li><i>term</i> - An attribute which describes a document.</li> + +<li><i>posting</i> - One term indexing one document.</li> + +<li><i>term list</i> - The complete list of terms which describe a document.</li> + +<li><i>posting list</i> - The complete list of documents which a term indexes.</li> + +<li><i>inverted index</i> - A data structure which maps from terms to documents.</li> +</ul> + +<p>Since Lucy is a practical implementation of IR theory, +it loads these abstract, +distilled definitions down with useful traits. +For instance, +a “posting” in its most rarefied form is simply a term-document pairing; in Lucy, +the class MatchPosting fills this role. +However, +by associating additional information with a posting like the number of times the term occurs in the document, +we can turn it into a ScorePosting, +making it possible to rank documents by relevance rather than just list documents which happen to match in no particular order.</p> + +<h3><a class='u' +name="TF/IDF_ranking_algorithm" +>TF/IDF ranking algorithm</a></h3> + +<p>Lucy uses a variant of the well-established “Term Frequency / Inverse Document Frequency” weighting scheme. +A thorough treatment of TF/IDF is too ambitious for our present purposes, +but in a nutshell, +it means that…</p> + +<ul> +<li>in a search for <code>skate park</code>, +documents which score well for the comparatively rare term <code>skate</code> will rank higher than documents which score well for the more common term <code>park</code>.</li> + +<li>a 10-word text which has one occurrence each of both <code>skate</code> and <code>park</code> will rank higher than a 1000-word text which also contains one occurrence of each.</li> +</ul> + +<p>A web search for “tf idf” will turn up many excellent explanations of the algorithm.</p> + +</div> + + </div> <!-- lucy-main_content_box --> + <div class="clear"></div> + + </div> <!-- lucy-main_content --> + + <div id="lucy-copyright" class="container_16"> + <p>Copyright © 2010-2015 The Apache Software Foundation, Licensed under the + <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>. + <br/> + Apache Lucy, Lucy, Apache, the Apache feather logo, and the Apache Lucy project logo are trademarks of The + Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their + respective owners. + </p> + </div> <!-- lucy-copyright --> + + </div> <!-- lucy-rigid_wrapper --> + + </body> +</html>
Added: websites/staging/lucy/trunk/content/docs/perl/Lucy/Docs/Tutorial.html ============================================================================== --- websites/staging/lucy/trunk/content/docs/perl/Lucy/Docs/Tutorial.html (added) +++ websites/staging/lucy/trunk/content/docs/perl/Lucy/Docs/Tutorial.html Mon Apr 4 09:23:29 2016 @@ -0,0 +1,165 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> +<html lang="en"> + <head> + <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> + <title>Lucy::Docs::Tutorial â Apache Lucy Documentation</title> + <link rel="stylesheet" type="text/css" media="screen" href="/css/lucy.css"> + </head> + + <body> + + <div id="lucy-rigid_wrapper"> + + <div id="lucy-top" class="container_16 lucy-white_box_3d"> + + <div id="lucy-logo_box" class="grid_8"> + <a href="/"><img src="/images/lucy_logo_150x100.png" alt="Apache Lucyâ¢"></a> + </div> <!-- lucy-logo_box --> + + <div #id="lucy-top_nav_box" class="grid_8"> + <div id="lucy-top_nav_bar" class="container_8"> + <ul> + <li><a href="http://www.apache.org/" title="Apache Software Foundation">Apache Software Foundation</a></li> + <li><a href="http://www.apache.org/licenses/" title="License">License</a></li> + <li><a href="http://www.apache.org/foundation/sponsorship.html" title="Sponsorship">Sponsorship</a></li> + <li><a href="http://www.apache.org/foundation/thanks.html" title="Thanks">Thanks</a></li> + <li><a href="http://www.apache.org/security/ " title="Security">Security</a></li> + </ul> + </div> <!-- lucy-top_nav_bar --> + <p><a href="http://www.apache.org/">Apache</a> » <a href="/">Lucy</a> » <a href="/docs/">Docs</a> » <a href="/docs/perl/">Perl</a> » <a href="/docs/perl/Lucy/">Lucy</a> » <a href="/docs/perl/Lucy/Docs/">Docs</a></p> + <form name="lucy-top_search_box" id="lucy-top_search_box" action="http://www.google.com/search" method="get"> + <input value="*.apache.org" name="sitesearch" type="hidden"/> + <input type="text" name="q" id="query" style="width:85%"> + <input type="submit" id="submit" value="Search"> + </form> + </div> <!-- lucy-top_nav_box --> + + <div class="clear"></div> + + </div> <!-- lucy-top --> + + <div id="lucy-main_content" class="container_16 lucy-white_box_3d"> + + <div class="grid_4" id="lucy-left_nav_box"> + <h6>About</h6> + <ul> + <li><a href="/">Welcome</a></li> + <li><a href="/clownfish.html">Clownfish</a></li> + <li><a href="/faq.html">FAQ</a></li> + <li><a href="/people.html">People</a></li> + </ul> + <h6>Resources</h6> + <ul> + <li><a href="/download.html">Download</a></li> + <li><a href="/mailing_lists.html">Mailing Lists</a></li> + <li><a href="/docs/perl/">Documentation</a></li> + <li><a href="http://wiki.apache.org/lucy/">Wiki</a></li> + <li><a href="https://issues.apache.org/jira/browse/LUCY">Issue Tracker</a></li> + <li><a href="/version_control.html">Version Control</a></li> + </ul> + <h6>Related Projects</h6> + <ul> + <li><a href="http://lucene.apache.org/core/">Lucene</a></li> + <li><a href="http://dezi.org/">Dezi</a></li> + <li><a href="http://lucene.apache.org/solr/">Solr</a></li> + <li><a href="http://lucenenet.apache.org/">Lucene.NET</a></li> + <li><a href="http://lucene.apache.org/pylucene/">PyLucene</a></li> + </ul> + </div> <!-- lucy-left_nav_box --> + + <div id="lucy-main_content_box" class="grid_9"> + <div> +<a name='___top' class='dummyTopAnchor' ></a> + +<h2><a class='u' +name="NAME" +>NAME</a></h2> + +<p>Lucy::Docs::Tutorial - Step-by-step introduction to Apache Lucy.</p> + +<h2><a class='u' +name="DESCRIPTION" +>DESCRIPTION</a></h2> + +<p>Explore Apache Lucy’s basic functionality by starting with a minimalist CGI search app based on Lucy::Simple and transforming it, +step by step, +into an “advanced search” interface utilizing more flexible core modules like <a href="../../Lucy/Index/Indexer.html" class="podlinkpod" +>Indexer</a> and <a href="../../Lucy/Search/IndexSearcher.html" class="podlinkpod" +>IndexSearcher</a>.</p> + +<h3><a class='u' +name="Chapters" +>Chapters</a></h3> + +<ul> +<li><a href="../../Lucy/Docs/Tutorial/SimpleTutorial.html" class="podlinkpod" +>SimpleTutorial</a> - Build a bare-bones search app using Lucy::Simple.</li> + +<li><a href="../../Lucy/Docs/Tutorial/BeyondSimpleTutorial.html" class="podlinkpod" +>BeyondSimpleTutorial</a> - Rebuild the app using core classes like <a href="../../Lucy/Index/Indexer.html" class="podlinkpod" +>Indexer</a> and <a href="../../Lucy/Search/IndexSearcher.html" class="podlinkpod" +>IndexSearcher</a> in place of Lucy::Simple.</li> + +<li><a href="../../Lucy/Docs/Tutorial/FieldTypeTutorial.html" class="podlinkpod" +>FieldTypeTutorial</a> - Experiment with different field characteristics using subclasses of <a href="../../Lucy/Plan/FieldType.html" class="podlinkpod" +>FieldType</a>.</li> + +<li><a href="../../Lucy/Docs/Tutorial/AnalysisTutorial.html" class="podlinkpod" +>AnalysisTutorial</a> - Examine how the choice of <a href="../../Lucy/Analysis/Analyzer.html" class="podlinkpod" +>Analyzer</a> subclass affects search results.</li> + +<li><a href="../../Lucy/Docs/Tutorial/HighlighterTutorial.html" class="podlinkpod" +>HighlighterTutorial</a> - Augment search results with highlighted excerpts.</li> + +<li><a href="../../Lucy/Docs/Tutorial/QueryObjectsTutorial.html" class="podlinkpod" +>QueryObjectsTutorial</a> - Unlock advanced search features by using Query objects instead of query strings.</li> +</ul> + +<h3><a class='u' +name="Source_materials" +>Source materials</a></h3> + +<p>The source material used by the tutorial app – a multi-text-file presentation of the United States constitution – can be found in the <code>sample</code> directory at the root of the Lucy distribution, +along with finished indexing and search apps.</p> + +<pre>sample/indexer.pl # indexing app +sample/search.cgi # search app +sample/us_constitution # corpus</pre> + +<h3><a class='u' +name="Conventions" +>Conventions</a></h3> + +<p>The user is expected to be familiar with OO Perl and basic CGI programming.</p> + +<p>The code in this tutorial assumes a Unix-flavored operating system and the Apache webserver, +but will work with minor modifications on other setups.</p> + +<h3><a class='u' +name="See_also" +>See also</a></h3> + +<p>More advanced and esoteric subjects are covered in <a href="../../Lucy/Docs/Cookbook.html" class="podlinkpod" +>Cookbook</a>.</p> + +</div> + + </div> <!-- lucy-main_content_box --> + <div class="clear"></div> + + </div> <!-- lucy-main_content --> + + <div id="lucy-copyright" class="container_16"> + <p>Copyright © 2010-2015 The Apache Software Foundation, Licensed under the + <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>. + <br/> + Apache Lucy, Lucy, Apache, the Apache feather logo, and the Apache Lucy project logo are trademarks of The + Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their + respective owners. + </p> + </div> <!-- lucy-copyright --> + + </div> <!-- lucy-rigid_wrapper --> + + </body> +</html> Added: websites/staging/lucy/trunk/content/docs/perl/Lucy/Document/Doc.html ============================================================================== --- websites/staging/lucy/trunk/content/docs/perl/Lucy/Document/Doc.html (added) +++ websites/staging/lucy/trunk/content/docs/perl/Lucy/Document/Doc.html Mon Apr 4 09:23:29 2016 @@ -0,0 +1,216 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> +<html lang="en"> + <head> + <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> + <title>Lucy::Document::Doc â Apache Lucy Documentation</title> + <link rel="stylesheet" type="text/css" media="screen" href="/css/lucy.css"> + </head> + + <body> + + <div id="lucy-rigid_wrapper"> + + <div id="lucy-top" class="container_16 lucy-white_box_3d"> + + <div id="lucy-logo_box" class="grid_8"> + <a href="/"><img src="/images/lucy_logo_150x100.png" alt="Apache Lucyâ¢"></a> + </div> <!-- lucy-logo_box --> + + <div #id="lucy-top_nav_box" class="grid_8"> + <div id="lucy-top_nav_bar" class="container_8"> + <ul> + <li><a href="http://www.apache.org/" title="Apache Software Foundation">Apache Software Foundation</a></li> + <li><a href="http://www.apache.org/licenses/" title="License">License</a></li> + <li><a href="http://www.apache.org/foundation/sponsorship.html" title="Sponsorship">Sponsorship</a></li> + <li><a href="http://www.apache.org/foundation/thanks.html" title="Thanks">Thanks</a></li> + <li><a href="http://www.apache.org/security/ " title="Security">Security</a></li> + </ul> + </div> <!-- lucy-top_nav_bar --> + <p><a href="http://www.apache.org/">Apache</a> » <a href="/">Lucy</a> » <a href="/docs/">Docs</a> » <a href="/docs/perl/">Perl</a> » <a href="/docs/perl/Lucy/">Lucy</a> » <a href="/docs/perl/Lucy/Document/">Document</a></p> + <form name="lucy-top_search_box" id="lucy-top_search_box" action="http://www.google.com/search" method="get"> + <input value="*.apache.org" name="sitesearch" type="hidden"/> + <input type="text" name="q" id="query" style="width:85%"> + <input type="submit" id="submit" value="Search"> + </form> + </div> <!-- lucy-top_nav_box --> + + <div class="clear"></div> + + </div> <!-- lucy-top --> + + <div id="lucy-main_content" class="container_16 lucy-white_box_3d"> + + <div class="grid_4" id="lucy-left_nav_box"> + <h6>About</h6> + <ul> + <li><a href="/">Welcome</a></li> + <li><a href="/clownfish.html">Clownfish</a></li> + <li><a href="/faq.html">FAQ</a></li> + <li><a href="/people.html">People</a></li> + </ul> + <h6>Resources</h6> + <ul> + <li><a href="/download.html">Download</a></li> + <li><a href="/mailing_lists.html">Mailing Lists</a></li> + <li><a href="/docs/perl/">Documentation</a></li> + <li><a href="http://wiki.apache.org/lucy/">Wiki</a></li> + <li><a href="https://issues.apache.org/jira/browse/LUCY">Issue Tracker</a></li> + <li><a href="/version_control.html">Version Control</a></li> + </ul> + <h6>Related Projects</h6> + <ul> + <li><a href="http://lucene.apache.org/core/">Lucene</a></li> + <li><a href="http://dezi.org/">Dezi</a></li> + <li><a href="http://lucene.apache.org/solr/">Solr</a></li> + <li><a href="http://lucenenet.apache.org/">Lucene.NET</a></li> + <li><a href="http://lucene.apache.org/pylucene/">PyLucene</a></li> + </ul> + </div> <!-- lucy-left_nav_box --> + + <div id="lucy-main_content_box" class="grid_9"> + <div> +<a name='___top' class='dummyTopAnchor' ></a> + +<h2><a class='u' +name="NAME" +>NAME</a></h2> + +<p>Lucy::Document::Doc - A document.</p> + +<h2><a class='u' +name="SYNOPSIS" +>SYNOPSIS</a></h2> + +<pre>my $doc = Lucy::Document::Doc->new( + fields => { foo => 'foo foo', bar => 'bar bar' }, +); +$indexer->add_doc($doc);</pre> + +<p>Doc objects allow access to field values via hashref overloading:</p> + +<pre>$doc->{foo} = 'new value for field "foo"'; +print "foo: $doc->{foo}\n";</pre> + +<h2><a class='u' +name="DESCRIPTION" +>DESCRIPTION</a></h2> + +<p>A Doc object is akin to a row in a database, +in that it is made up of one or more fields, +each of which has a value.</p> + +<h2><a class='u' +name="CONSTRUCTORS" +>CONSTRUCTORS</a></h2> + +<h3><a class='u' +name="new" +>new</a></h3> + +<pre>my $doc = Lucy::Document::Doc->new( + fields => { foo => 'foo foo', bar => 'bar bar' }, +);</pre> + +<p>Create a new Document.</p> + +<ul> +<li><b>fields</b> - Field-value pairs.</li> + +<li><b>doc_id</b> - Internal Lucy document id. +Default of 0 (an invalid doc id).</li> +</ul> + +<h2><a class='u' +name="METHODS" +>METHODS</a></h2> + +<h3><a class='u' +name="set_doc_id" +>set_doc_id</a></h3> + +<pre>$doc->set_doc_id($doc_id);</pre> + +<p>Set internal Lucy document id.</p> + +<h3><a class='u' +name="get_doc_id" +>get_doc_id</a></h3> + +<pre>my $int = $doc->get_doc_id();</pre> + +<p>Retrieve internal Lucy document id.</p> + +<h3><a class='u' +name="store" +>store</a></h3> + +<pre>$doc->store($field, $value);</pre> + +<p>Store a field value in the Doc.</p> + +<ul> +<li><b>field</b> - The field name.</li> + +<li><b>value</b> - The value.</li> +</ul> + +<h3><a class='u' +name="get_fields" +>get_fields</a></h3> + +<pre>my $hashref = $doc->get_fields();</pre> + +<p>Return the Doc's backing fields hash.</p> + +<h3><a class='u' +name="get_size" +>get_size</a></h3> + +<pre>my $int = $doc->get_size();</pre> + +<p>Return the number of fields in the Doc.</p> + +<h3><a class='u' +name="extract" +>extract</a></h3> + +<pre>my $obj = $doc->extract($field);</pre> + +<p>Retrieve the field’s value, +or NULL if the field is not present.</p> + +<h3><a class='u' +name="field_names" +>field_names</a></h3> + +<pre>my $arrayref = $doc->field_names();</pre> + +<p>Return a list of names of all fields present.</p> + +<h2><a class='u' +name="INHERITANCE" +>INHERITANCE</a></h2> + +<p>Lucy::Document::Doc isa Clownfish::Obj.</p> + +</div> + + </div> <!-- lucy-main_content_box --> + <div class="clear"></div> + + </div> <!-- lucy-main_content --> + + <div id="lucy-copyright" class="container_16"> + <p>Copyright © 2010-2015 The Apache Software Foundation, Licensed under the + <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>. + <br/> + Apache Lucy, Lucy, Apache, the Apache feather logo, and the Apache Lucy project logo are trademarks of The + Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their + respective owners. + </p> + </div> <!-- lucy-copyright --> + + </div> <!-- lucy-rigid_wrapper --> + + </body> +</html> Added: websites/staging/lucy/trunk/content/docs/perl/Lucy/Document/HitDoc.html ============================================================================== --- websites/staging/lucy/trunk/content/docs/perl/Lucy/Document/HitDoc.html (added) +++ websites/staging/lucy/trunk/content/docs/perl/Lucy/Document/HitDoc.html Mon Apr 4 09:23:29 2016 @@ -0,0 +1,143 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> +<html lang="en"> + <head> + <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> + <title>Lucy::Document::HitDoc â Apache Lucy Documentation</title> + <link rel="stylesheet" type="text/css" media="screen" href="/css/lucy.css"> + </head> + + <body> + + <div id="lucy-rigid_wrapper"> + + <div id="lucy-top" class="container_16 lucy-white_box_3d"> + + <div id="lucy-logo_box" class="grid_8"> + <a href="/"><img src="/images/lucy_logo_150x100.png" alt="Apache Lucyâ¢"></a> + </div> <!-- lucy-logo_box --> + + <div #id="lucy-top_nav_box" class="grid_8"> + <div id="lucy-top_nav_bar" class="container_8"> + <ul> + <li><a href="http://www.apache.org/" title="Apache Software Foundation">Apache Software Foundation</a></li> + <li><a href="http://www.apache.org/licenses/" title="License">License</a></li> + <li><a href="http://www.apache.org/foundation/sponsorship.html" title="Sponsorship">Sponsorship</a></li> + <li><a href="http://www.apache.org/foundation/thanks.html" title="Thanks">Thanks</a></li> + <li><a href="http://www.apache.org/security/ " title="Security">Security</a></li> + </ul> + </div> <!-- lucy-top_nav_bar --> + <p><a href="http://www.apache.org/">Apache</a> » <a href="/">Lucy</a> » <a href="/docs/">Docs</a> » <a href="/docs/perl/">Perl</a> » <a href="/docs/perl/Lucy/">Lucy</a> » <a href="/docs/perl/Lucy/Document/">Document</a></p> + <form name="lucy-top_search_box" id="lucy-top_search_box" action="http://www.google.com/search" method="get"> + <input value="*.apache.org" name="sitesearch" type="hidden"/> + <input type="text" name="q" id="query" style="width:85%"> + <input type="submit" id="submit" value="Search"> + </form> + </div> <!-- lucy-top_nav_box --> + + <div class="clear"></div> + + </div> <!-- lucy-top --> + + <div id="lucy-main_content" class="container_16 lucy-white_box_3d"> + + <div class="grid_4" id="lucy-left_nav_box"> + <h6>About</h6> + <ul> + <li><a href="/">Welcome</a></li> + <li><a href="/clownfish.html">Clownfish</a></li> + <li><a href="/faq.html">FAQ</a></li> + <li><a href="/people.html">People</a></li> + </ul> + <h6>Resources</h6> + <ul> + <li><a href="/download.html">Download</a></li> + <li><a href="/mailing_lists.html">Mailing Lists</a></li> + <li><a href="/docs/perl/">Documentation</a></li> + <li><a href="http://wiki.apache.org/lucy/">Wiki</a></li> + <li><a href="https://issues.apache.org/jira/browse/LUCY">Issue Tracker</a></li> + <li><a href="/version_control.html">Version Control</a></li> + </ul> + <h6>Related Projects</h6> + <ul> + <li><a href="http://lucene.apache.org/core/">Lucene</a></li> + <li><a href="http://dezi.org/">Dezi</a></li> + <li><a href="http://lucene.apache.org/solr/">Solr</a></li> + <li><a href="http://lucenenet.apache.org/">Lucene.NET</a></li> + <li><a href="http://lucene.apache.org/pylucene/">PyLucene</a></li> + </ul> + </div> <!-- lucy-left_nav_box --> + + <div id="lucy-main_content_box" class="grid_9"> + <div> +<a name='___top' class='dummyTopAnchor' ></a> + +<h2><a class='u' +name="NAME" +>NAME</a></h2> + +<p>Lucy::Document::HitDoc - A document read from an index.</p> + +<h2><a class='u' +name="SYNOPSIS" +>SYNOPSIS</a></h2> + +<pre>while ( my $hit_doc = $hits->next ) { + print "$hit_doc->{title}\n"; + print $hit_doc->get_score . "\n"; + ... +}</pre> + +<h2><a class='u' +name="DESCRIPTION" +>DESCRIPTION</a></h2> + +<p>HitDoc is the search-time relative of the index-time class Doc; it is augmented by a numeric score attribute that Doc doesn’t have.</p> + +<h2><a class='u' +name="METHODS" +>METHODS</a></h2> + +<h3><a class='u' +name="set_score" +>set_score</a></h3> + +<pre>$hit_doc->set_score($score);</pre> + +<p>Set score attribute.</p> + +<h3><a class='u' +name="get_score" +>get_score</a></h3> + +<pre>my $float = $hit_doc->get_score();</pre> + +<p>Get score attribute.</p> + +<h2><a class='u' +name="INHERITANCE" +>INHERITANCE</a></h2> + +<p>Lucy::Document::HitDoc isa <a href="../../Lucy/Document/Doc.html" class="podlinkpod" +>Lucy::Document::Doc</a> isa Clownfish::Obj.</p> + +</div> + + </div> <!-- lucy-main_content_box --> + <div class="clear"></div> + + </div> <!-- lucy-main_content --> + + <div id="lucy-copyright" class="container_16"> + <p>Copyright © 2010-2015 The Apache Software Foundation, Licensed under the + <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>. + <br/> + Apache Lucy, Lucy, Apache, the Apache feather logo, and the Apache Lucy project logo are trademarks of The + Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their + respective owners. + </p> + </div> <!-- lucy-copyright --> + + </div> <!-- lucy-rigid_wrapper --> + + </body> +</html> Added: websites/staging/lucy/trunk/content/docs/perl/Lucy/Highlight/Highlighter.html ============================================================================== --- websites/staging/lucy/trunk/content/docs/perl/Lucy/Highlight/Highlighter.html (added) +++ websites/staging/lucy/trunk/content/docs/perl/Lucy/Highlight/Highlighter.html Mon Apr 4 09:23:29 2016 @@ -0,0 +1,272 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> +<html lang="en"> + <head> + <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> + <title>Lucy::Highlight::Highlighter â Apache Lucy Documentation</title> + <link rel="stylesheet" type="text/css" media="screen" href="/css/lucy.css"> + </head> + + <body> + + <div id="lucy-rigid_wrapper"> + + <div id="lucy-top" class="container_16 lucy-white_box_3d"> + + <div id="lucy-logo_box" class="grid_8"> + <a href="/"><img src="/images/lucy_logo_150x100.png" alt="Apache Lucyâ¢"></a> + </div> <!-- lucy-logo_box --> + + <div #id="lucy-top_nav_box" class="grid_8"> + <div id="lucy-top_nav_bar" class="container_8"> + <ul> + <li><a href="http://www.apache.org/" title="Apache Software Foundation">Apache Software Foundation</a></li> + <li><a href="http://www.apache.org/licenses/" title="License">License</a></li> + <li><a href="http://www.apache.org/foundation/sponsorship.html" title="Sponsorship">Sponsorship</a></li> + <li><a href="http://www.apache.org/foundation/thanks.html" title="Thanks">Thanks</a></li> + <li><a href="http://www.apache.org/security/ " title="Security">Security</a></li> + </ul> + </div> <!-- lucy-top_nav_bar --> + <p><a href="http://www.apache.org/">Apache</a> » <a href="/">Lucy</a> » <a href="/docs/">Docs</a> » <a href="/docs/perl/">Perl</a> » <a href="/docs/perl/Lucy/">Lucy</a> » <a href="/docs/perl/Lucy/Highlight/">Highlight</a></p> + <form name="lucy-top_search_box" id="lucy-top_search_box" action="http://www.google.com/search" method="get"> + <input value="*.apache.org" name="sitesearch" type="hidden"/> + <input type="text" name="q" id="query" style="width:85%"> + <input type="submit" id="submit" value="Search"> + </form> + </div> <!-- lucy-top_nav_box --> + + <div class="clear"></div> + + </div> <!-- lucy-top --> + + <div id="lucy-main_content" class="container_16 lucy-white_box_3d"> + + <div class="grid_4" id="lucy-left_nav_box"> + <h6>About</h6> + <ul> + <li><a href="/">Welcome</a></li> + <li><a href="/clownfish.html">Clownfish</a></li> + <li><a href="/faq.html">FAQ</a></li> + <li><a href="/people.html">People</a></li> + </ul> + <h6>Resources</h6> + <ul> + <li><a href="/download.html">Download</a></li> + <li><a href="/mailing_lists.html">Mailing Lists</a></li> + <li><a href="/docs/perl/">Documentation</a></li> + <li><a href="http://wiki.apache.org/lucy/">Wiki</a></li> + <li><a href="https://issues.apache.org/jira/browse/LUCY">Issue Tracker</a></li> + <li><a href="/version_control.html">Version Control</a></li> + </ul> + <h6>Related Projects</h6> + <ul> + <li><a href="http://lucene.apache.org/core/">Lucene</a></li> + <li><a href="http://dezi.org/">Dezi</a></li> + <li><a href="http://lucene.apache.org/solr/">Solr</a></li> + <li><a href="http://lucenenet.apache.org/">Lucene.NET</a></li> + <li><a href="http://lucene.apache.org/pylucene/">PyLucene</a></li> + </ul> + </div> <!-- lucy-left_nav_box --> + + <div id="lucy-main_content_box" class="grid_9"> + <div> +<a name='___top' class='dummyTopAnchor' ></a> + +<h2><a class='u' +name="NAME" +>NAME</a></h2> + +<p>Lucy::Highlight::Highlighter - Create and highlight excerpts.</p> + +<h2><a class='u' +name="SYNOPSIS" +>SYNOPSIS</a></h2> + +<pre>my $highlighter = Lucy::Highlight::Highlighter->new( + searcher => $searcher, + query => $query, + field => 'body' +); +my $hits = $searcher->hits( query => $query ); +while ( my $hit = $hits->next ) { + my $excerpt = $highlighter->create_excerpt($hit); + ... +}</pre> + +<h2><a class='u' +name="DESCRIPTION" +>DESCRIPTION</a></h2> + +<p>The Highlighter can be used to select relevant snippets from a document, +and to surround search terms with highlighting tags. +It handles both stems and phrases correctly and efficiently, +using special-purpose data generated at index-time.</p> + +<h2><a class='u' +name="CONSTRUCTORS" +>CONSTRUCTORS</a></h2> + +<h3><a class='u' +name="new" +>new</a></h3> + +<pre>my $highlighter = Lucy::Highlight::Highlighter->new( + searcher => $searcher, # required + query => $query, # required + field => 'content', # required + excerpt_length => 150, # default: 200 +);</pre> + +<p>Create a new Highlighter.</p> + +<ul> +<li><b>searcher</b> - An object which inherits from <a href="../../Lucy/Search/Searcher.html" class="podlinkpod" +>Searcher</a>, +such as an <a href="../../Lucy/Search/IndexSearcher.html" class="podlinkpod" +>IndexSearcher</a>.</li> + +<li><b>query</b> - Query object or a query string.</li> + +<li><b>field</b> - The name of the field from which to draw the excerpt. +The field must marked as be <code>highlightable</code> (see <a href="../../Lucy/Plan/FieldType.html" class="podlinkpod" +>FieldType</a>).</li> + +<li><b>excerpt_length</b> - Maximum length of the excerpt, +in characters.</li> +</ul> + +<h2><a class='u' +name="METHODS" +>METHODS</a></h2> + +<h3><a class='u' +name="create_excerpt" +>create_excerpt</a></h3> + +<pre>my $string = $highlighter->create_excerpt($hit_doc);</pre> + +<p>Take a HitDoc object and return a highlighted excerpt as a string if the HitDoc has a value for the specified <code>field</code>.</p> + +<h3><a class='u' +name="encode" +>encode</a></h3> + +<pre>my $string = $highlighter->encode($text);</pre> + +<p>Encode text with HTML entities. +This method is called internally by <a href="#create_excerpt" class="podlinkpod" +>create_excerpt()</a> for each text fragment when assembling an excerpt. +A subclass can override this if the text should be encoded differently or not at all.</p> + +<h3><a class='u' +name="highlight" +>highlight</a></h3> + +<pre>my $string = $highlighter->highlight($text);</pre> + +<p>Highlight a small section of text. +By default, +prepends pre-tag and appends post-tag. +This method is called internally by <a href="#create_excerpt" class="podlinkpod" +>create_excerpt()</a> when assembling an excerpt.</p> + +<h3><a class='u' +name="set_pre_tag" +>set_pre_tag</a></h3> + +<pre>$highlighter->set_pre_tag($pre_tag);</pre> + +<p>Setter. +The default value is “<strong>”.</p> + +<h3><a class='u' +name="set_post_tag" +>set_post_tag</a></h3> + +<pre>$highlighter->set_post_tag($post_tag);</pre> + +<p>Setter. +The default value is “</strong>”.</p> + +<h3><a class='u' +name="get_pre_tag" +>get_pre_tag</a></h3> + +<pre>my $string = $highlighter->get_pre_tag();</pre> + +<p>Accessor.</p> + +<h3><a class='u' +name="get_post_tag" +>get_post_tag</a></h3> + +<pre>my $string = $highlighter->get_post_tag();</pre> + +<p>Accessor.</p> + +<h3><a class='u' +name="get_field" +>get_field</a></h3> + +<pre>my $string = $highlighter->get_field();</pre> + +<p>Accessor.</p> + +<h3><a class='u' +name="get_excerpt_length" +>get_excerpt_length</a></h3> + +<pre>my $int = $highlighter->get_excerpt_length();</pre> + +<p>Accessor.</p> + +<h3><a class='u' +name="get_searcher" +>get_searcher</a></h3> + +<pre>my $searcher = $highlighter->get_searcher();</pre> + +<p>Accessor.</p> + +<h3><a class='u' +name="get_query" +>get_query</a></h3> + +<pre>my $query = $highlighter->get_query();</pre> + +<p>Accessor.</p> + +<h3><a class='u' +name="get_compiler" +>get_compiler</a></h3> + +<pre>my $compiler = $highlighter->get_compiler();</pre> + +<p>Accessor for the Lucy::Search::Compiler object derived from <code>query</code> and <code>searcher</code>.</p> + +<h2><a class='u' +name="INHERITANCE" +>INHERITANCE</a></h2> + +<p>Lucy::Highlight::Highlighter isa Clownfish::Obj.</p> + +</div> + + </div> <!-- lucy-main_content_box --> + <div class="clear"></div> + + </div> <!-- lucy-main_content --> + + <div id="lucy-copyright" class="container_16"> + <p>Copyright © 2010-2015 The Apache Software Foundation, Licensed under the + <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>. + <br/> + Apache Lucy, Lucy, Apache, the Apache feather logo, and the Apache Lucy project logo are trademarks of The + Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their + respective owners. + </p> + </div> <!-- lucy-copyright --> + + </div> <!-- lucy-rigid_wrapper --> + + </body> +</html> Added: websites/staging/lucy/trunk/content/docs/perl/Lucy/Index/BackgroundMerger.html ============================================================================== --- websites/staging/lucy/trunk/content/docs/perl/Lucy/Index/BackgroundMerger.html (added) +++ websites/staging/lucy/trunk/content/docs/perl/Lucy/Index/BackgroundMerger.html Mon Apr 4 09:23:29 2016 @@ -0,0 +1,196 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> +<html lang="en"> + <head> + <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> + <title>Lucy::Index::BackgroundMerger â Apache Lucy Documentation</title> + <link rel="stylesheet" type="text/css" media="screen" href="/css/lucy.css"> + </head> + + <body> + + <div id="lucy-rigid_wrapper"> + + <div id="lucy-top" class="container_16 lucy-white_box_3d"> + + <div id="lucy-logo_box" class="grid_8"> + <a href="/"><img src="/images/lucy_logo_150x100.png" alt="Apache Lucyâ¢"></a> + </div> <!-- lucy-logo_box --> + + <div #id="lucy-top_nav_box" class="grid_8"> + <div id="lucy-top_nav_bar" class="container_8"> + <ul> + <li><a href="http://www.apache.org/" title="Apache Software Foundation">Apache Software Foundation</a></li> + <li><a href="http://www.apache.org/licenses/" title="License">License</a></li> + <li><a href="http://www.apache.org/foundation/sponsorship.html" title="Sponsorship">Sponsorship</a></li> + <li><a href="http://www.apache.org/foundation/thanks.html" title="Thanks">Thanks</a></li> + <li><a href="http://www.apache.org/security/ " title="Security">Security</a></li> + </ul> + </div> <!-- lucy-top_nav_bar --> + <p><a href="http://www.apache.org/">Apache</a> » <a href="/">Lucy</a> » <a href="/docs/">Docs</a> » <a href="/docs/perl/">Perl</a> » <a href="/docs/perl/Lucy/">Lucy</a> » <a href="/docs/perl/Lucy/Index/">Index</a></p> + <form name="lucy-top_search_box" id="lucy-top_search_box" action="http://www.google.com/search" method="get"> + <input value="*.apache.org" name="sitesearch" type="hidden"/> + <input type="text" name="q" id="query" style="width:85%"> + <input type="submit" id="submit" value="Search"> + </form> + </div> <!-- lucy-top_nav_box --> + + <div class="clear"></div> + + </div> <!-- lucy-top --> + + <div id="lucy-main_content" class="container_16 lucy-white_box_3d"> + + <div class="grid_4" id="lucy-left_nav_box"> + <h6>About</h6> + <ul> + <li><a href="/">Welcome</a></li> + <li><a href="/clownfish.html">Clownfish</a></li> + <li><a href="/faq.html">FAQ</a></li> + <li><a href="/people.html">People</a></li> + </ul> + <h6>Resources</h6> + <ul> + <li><a href="/download.html">Download</a></li> + <li><a href="/mailing_lists.html">Mailing Lists</a></li> + <li><a href="/docs/perl/">Documentation</a></li> + <li><a href="http://wiki.apache.org/lucy/">Wiki</a></li> + <li><a href="https://issues.apache.org/jira/browse/LUCY">Issue Tracker</a></li> + <li><a href="/version_control.html">Version Control</a></li> + </ul> + <h6>Related Projects</h6> + <ul> + <li><a href="http://lucene.apache.org/core/">Lucene</a></li> + <li><a href="http://dezi.org/">Dezi</a></li> + <li><a href="http://lucene.apache.org/solr/">Solr</a></li> + <li><a href="http://lucenenet.apache.org/">Lucene.NET</a></li> + <li><a href="http://lucene.apache.org/pylucene/">PyLucene</a></li> + </ul> + </div> <!-- lucy-left_nav_box --> + + <div id="lucy-main_content_box" class="grid_9"> + <div> +<a name='___top' class='dummyTopAnchor' ></a> + +<h2><a class='u' +name="NAME" +>NAME</a></h2> + +<p>Lucy::Index::BackgroundMerger - Consolidate index segments in the background.</p> + +<h2><a class='u' +name="SYNOPSIS" +>SYNOPSIS</a></h2> + +<pre>my $bg_merger = Lucy::Index::BackgroundMerger->new( + index => '/path/to/index', +); +$bg_merger->commit;</pre> + +<h2><a class='u' +name="DESCRIPTION" +>DESCRIPTION</a></h2> + +<p>Adding documents to an index is usually fast, +but every once in a while the index must be compacted and an update takes substantially longer to complete. +See <a href="../../Lucy/Docs/Cookbook/FastUpdates.html" class="podlinkpod" +>FastUpdates</a> for how to use this class to control worst-case index update performance.</p> + +<p>As with <a href="../../Lucy/Index/Indexer.html" class="podlinkpod" +>Indexer</a>, +see <a href="../../Lucy/Docs/FileLocking.html" class="podlinkpod" +>FileLocking</a> if your index is on a shared volume.</p> + +<h2><a class='u' +name="CONSTRUCTORS" +>CONSTRUCTORS</a></h2> + +<h3><a class='u' +name="new" +>new</a></h3> + +<pre>my $bg_merger = Lucy::Index::BackgroundMerger->new( + index => '/path/to/index', # required + manager => $manager # default: created internally +);</pre> + +<p>Open a new BackgroundMerger.</p> + +<ul> +<li><b>index</b> - Either a string filepath or a Folder.</li> + +<li><b>manager</b> - An IndexManager. +If not supplied, +an IndexManager with a 10-second write lock timeout will be created.</li> +</ul> + +<h2><a class='u' +name="METHODS" +>METHODS</a></h2> + +<h3><a class='u' +name="optimize" +>optimize</a></h3> + +<pre>$background_merger->optimize();</pre> + +<p>Optimize the index for search-time performance. +This may take a while, +as it can involve rewriting large amounts of data.</p> + +<h3><a class='u' +name="commit" +>commit</a></h3> + +<pre>$background_merger->commit();</pre> + +<p>Commit any changes made to the index. +Until this is called, +none of the changes made during an indexing session are permanent.</p> + +<p>Calls <a href="#prepare_commit" class="podlinkpod" +>prepare_commit()</a> implicitly if it has not already been called.</p> + +<h3><a class='u' +name="prepare_commit" +>prepare_commit</a></h3> + +<pre>$background_merger->prepare_commit();</pre> + +<p>Perform the expensive setup for <a href="#commit" class="podlinkpod" +>commit()</a> in advance, +so that <a href="#commit" class="podlinkpod" +>commit()</a> completes quickly.</p> + +<p>Towards the end of <a href="#prepare_commit" class="podlinkpod" +>prepare_commit()</a>, +the BackgroundMerger attempts to re-acquire the write lock, +which is then held until <a href="#commit" class="podlinkpod" +>commit()</a> finishes and releases it.</p> + +<h2><a class='u' +name="INHERITANCE" +>INHERITANCE</a></h2> + +<p>Lucy::Index::BackgroundMerger isa Clownfish::Obj.</p> + +</div> + + </div> <!-- lucy-main_content_box --> + <div class="clear"></div> + + </div> <!-- lucy-main_content --> + + <div id="lucy-copyright" class="container_16"> + <p>Copyright © 2010-2015 The Apache Software Foundation, Licensed under the + <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>. + <br/> + Apache Lucy, Lucy, Apache, the Apache feather logo, and the Apache Lucy project logo are trademarks of The + Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their + respective owners. + </p> + </div> <!-- lucy-copyright --> + + </div> <!-- lucy-rigid_wrapper --> + + </body> +</html> Added: websites/staging/lucy/trunk/content/docs/perl/Lucy/Index/DataReader.html ============================================================================== --- websites/staging/lucy/trunk/content/docs/perl/Lucy/Index/DataReader.html (added) +++ websites/staging/lucy/trunk/content/docs/perl/Lucy/Index/DataReader.html Mon Apr 4 09:23:29 2016 @@ -0,0 +1,226 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> +<html lang="en"> + <head> + <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> + <title>Lucy::Index::DataReader â Apache Lucy Documentation</title> + <link rel="stylesheet" type="text/css" media="screen" href="/css/lucy.css"> + </head> + + <body> + + <div id="lucy-rigid_wrapper"> + + <div id="lucy-top" class="container_16 lucy-white_box_3d"> + + <div id="lucy-logo_box" class="grid_8"> + <a href="/"><img src="/images/lucy_logo_150x100.png" alt="Apache Lucyâ¢"></a> + </div> <!-- lucy-logo_box --> + + <div #id="lucy-top_nav_box" class="grid_8"> + <div id="lucy-top_nav_bar" class="container_8"> + <ul> + <li><a href="http://www.apache.org/" title="Apache Software Foundation">Apache Software Foundation</a></li> + <li><a href="http://www.apache.org/licenses/" title="License">License</a></li> + <li><a href="http://www.apache.org/foundation/sponsorship.html" title="Sponsorship">Sponsorship</a></li> + <li><a href="http://www.apache.org/foundation/thanks.html" title="Thanks">Thanks</a></li> + <li><a href="http://www.apache.org/security/ " title="Security">Security</a></li> + </ul> + </div> <!-- lucy-top_nav_bar --> + <p><a href="http://www.apache.org/">Apache</a> » <a href="/">Lucy</a> » <a href="/docs/">Docs</a> » <a href="/docs/perl/">Perl</a> » <a href="/docs/perl/Lucy/">Lucy</a> » <a href="/docs/perl/Lucy/Index/">Index</a></p> + <form name="lucy-top_search_box" id="lucy-top_search_box" action="http://www.google.com/search" method="get"> + <input value="*.apache.org" name="sitesearch" type="hidden"/> + <input type="text" name="q" id="query" style="width:85%"> + <input type="submit" id="submit" value="Search"> + </form> + </div> <!-- lucy-top_nav_box --> + + <div class="clear"></div> + + </div> <!-- lucy-top --> + + <div id="lucy-main_content" class="container_16 lucy-white_box_3d"> + + <div class="grid_4" id="lucy-left_nav_box"> + <h6>About</h6> + <ul> + <li><a href="/">Welcome</a></li> + <li><a href="/clownfish.html">Clownfish</a></li> + <li><a href="/faq.html">FAQ</a></li> + <li><a href="/people.html">People</a></li> + </ul> + <h6>Resources</h6> + <ul> + <li><a href="/download.html">Download</a></li> + <li><a href="/mailing_lists.html">Mailing Lists</a></li> + <li><a href="/docs/perl/">Documentation</a></li> + <li><a href="http://wiki.apache.org/lucy/">Wiki</a></li> + <li><a href="https://issues.apache.org/jira/browse/LUCY">Issue Tracker</a></li> + <li><a href="/version_control.html">Version Control</a></li> + </ul> + <h6>Related Projects</h6> + <ul> + <li><a href="http://lucene.apache.org/core/">Lucene</a></li> + <li><a href="http://dezi.org/">Dezi</a></li> + <li><a href="http://lucene.apache.org/solr/">Solr</a></li> + <li><a href="http://lucenenet.apache.org/">Lucene.NET</a></li> + <li><a href="http://lucene.apache.org/pylucene/">PyLucene</a></li> + </ul> + </div> <!-- lucy-left_nav_box --> + + <div id="lucy-main_content_box" class="grid_9"> + <div> +<a name='___top' class='dummyTopAnchor' ></a> + +<h2><a class='u' +name="NAME" +>NAME</a></h2> + +<p>Lucy::Index::DataReader - Abstract base class for reading index data.</p> + +<h2><a class='u' +name="SYNOPSIS" +>SYNOPSIS</a></h2> + +<pre># Abstract base class.</pre> + +<h2><a class='u' +name="DESCRIPTION" +>DESCRIPTION</a></h2> + +<p>DataReader is the companion class to <a href="../../Lucy/Index/DataWriter.html" class="podlinkpod" +>DataWriter</a>. +Every index component will implement one of each.</p> + +<h2><a class='u' +name="CONSTRUCTORS" +>CONSTRUCTORS</a></h2> + +<h3><a class='u' +name="new" +>new</a></h3> + +<pre>my $reader = MyDataReader->new( + schema => $seg_reader->get_schema, # default undef + folder => $seg_reader->get_folder, # default undef + snapshot => $seg_reader->get_snapshot, # default undef + segments => $seg_reader->get_segments, # default undef + seg_tick => $seg_reader->get_seg_tick, # default -1 +);</pre> + +<p>Abstract constructor.</p> + +<ul> +<li><b>schema</b> - A Schema.</li> + +<li><b>folder</b> - A Folder.</li> + +<li><b>snapshot</b> - A Snapshot.</li> + +<li><b>segments</b> - An array of Segments.</li> + +<li><b>seg_tick</b> - The array index of the Segment object within the <code>segments</code> array that this particular DataReader is assigned to, +if any. +A value of -1 indicates that no Segment should be assigned.</li> +</ul> + +<h2><a class='u' +name="ABSTRACT_METHODS" +>ABSTRACT METHODS</a></h2> + +<h3><a class='u' +name="aggregator" +>aggregator</a></h3> + +<pre>my $result = $data_reader->aggregator( + readers => $readers # required + offsets => $offsets # required +);</pre> + +<p>Create a reader which aggregates the output of several lower level readers. +Return undef if such a reader is not valid.</p> + +<ul> +<li><b>readers</b> - An array of DataReaders.</li> + +<li><b>offsets</b> - Doc id start offsets for each reader.</li> +</ul> + +<h2><a class='u' +name="METHODS" +>METHODS</a></h2> + +<h3><a class='u' +name="get_schema" +>get_schema</a></h3> + +<pre>my $schema = $data_reader->get_schema();</pre> + +<p>Accessor for “schema” member var.</p> + +<h3><a class='u' +name="get_folder" +>get_folder</a></h3> + +<pre>my $folder = $data_reader->get_folder();</pre> + +<p>Accessor for “folder” member var.</p> + +<h3><a class='u' +name="get_snapshot" +>get_snapshot</a></h3> + +<pre>my $snapshot = $data_reader->get_snapshot();</pre> + +<p>Accessor for “snapshot” member var.</p> + +<h3><a class='u' +name="get_segments" +>get_segments</a></h3> + +<pre>my $arrayref = $data_reader->get_segments();</pre> + +<p>Accessor for “segments” member var.</p> + +<h3><a class='u' +name="get_segment" +>get_segment</a></h3> + +<pre>my $segment = $data_reader->get_segment();</pre> + +<p>Accessor for “segment” member var.</p> + +<h3><a class='u' +name="get_seg_tick" +>get_seg_tick</a></h3> + +<pre>my $int = $data_reader->get_seg_tick();</pre> + +<p>Accessor for “seg_tick” member var.</p> + +<h2><a class='u' +name="INHERITANCE" +>INHERITANCE</a></h2> + +<p>Lucy::Index::DataReader isa Clownfish::Obj.</p> + +</div> + + </div> <!-- lucy-main_content_box --> + <div class="clear"></div> + + </div> <!-- lucy-main_content --> + + <div id="lucy-copyright" class="container_16"> + <p>Copyright © 2010-2015 The Apache Software Foundation, Licensed under the + <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>. + <br/> + Apache Lucy, Lucy, Apache, the Apache feather logo, and the Apache Lucy project logo are trademarks of The + Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their + respective owners. + </p> + </div> <!-- lucy-copyright --> + + </div> <!-- lucy-rigid_wrapper --> + + </body> +</html> Added: websites/staging/lucy/trunk/content/docs/perl/Lucy/Index/DataWriter.html ============================================================================== --- websites/staging/lucy/trunk/content/docs/perl/Lucy/Index/DataWriter.html (added) +++ websites/staging/lucy/trunk/content/docs/perl/Lucy/Index/DataWriter.html Mon Apr 4 09:23:29 2016 @@ -0,0 +1,290 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> +<html lang="en"> + <head> + <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> + <title>Lucy::Index::DataWriter â Apache Lucy Documentation</title> + <link rel="stylesheet" type="text/css" media="screen" href="/css/lucy.css"> + </head> + + <body> + + <div id="lucy-rigid_wrapper"> + + <div id="lucy-top" class="container_16 lucy-white_box_3d"> + + <div id="lucy-logo_box" class="grid_8"> + <a href="/"><img src="/images/lucy_logo_150x100.png" alt="Apache Lucyâ¢"></a> + </div> <!-- lucy-logo_box --> + + <div #id="lucy-top_nav_box" class="grid_8"> + <div id="lucy-top_nav_bar" class="container_8"> + <ul> + <li><a href="http://www.apache.org/" title="Apache Software Foundation">Apache Software Foundation</a></li> + <li><a href="http://www.apache.org/licenses/" title="License">License</a></li> + <li><a href="http://www.apache.org/foundation/sponsorship.html" title="Sponsorship">Sponsorship</a></li> + <li><a href="http://www.apache.org/foundation/thanks.html" title="Thanks">Thanks</a></li> + <li><a href="http://www.apache.org/security/ " title="Security">Security</a></li> + </ul> + </div> <!-- lucy-top_nav_bar --> + <p><a href="http://www.apache.org/">Apache</a> » <a href="/">Lucy</a> » <a href="/docs/">Docs</a> » <a href="/docs/perl/">Perl</a> » <a href="/docs/perl/Lucy/">Lucy</a> » <a href="/docs/perl/Lucy/Index/">Index</a></p> + <form name="lucy-top_search_box" id="lucy-top_search_box" action="http://www.google.com/search" method="get"> + <input value="*.apache.org" name="sitesearch" type="hidden"/> + <input type="text" name="q" id="query" style="width:85%"> + <input type="submit" id="submit" value="Search"> + </form> + </div> <!-- lucy-top_nav_box --> + + <div class="clear"></div> + + </div> <!-- lucy-top --> + + <div id="lucy-main_content" class="container_16 lucy-white_box_3d"> + + <div class="grid_4" id="lucy-left_nav_box"> + <h6>About</h6> + <ul> + <li><a href="/">Welcome</a></li> + <li><a href="/clownfish.html">Clownfish</a></li> + <li><a href="/faq.html">FAQ</a></li> + <li><a href="/people.html">People</a></li> + </ul> + <h6>Resources</h6> + <ul> + <li><a href="/download.html">Download</a></li> + <li><a href="/mailing_lists.html">Mailing Lists</a></li> + <li><a href="/docs/perl/">Documentation</a></li> + <li><a href="http://wiki.apache.org/lucy/">Wiki</a></li> + <li><a href="https://issues.apache.org/jira/browse/LUCY">Issue Tracker</a></li> + <li><a href="/version_control.html">Version Control</a></li> + </ul> + <h6>Related Projects</h6> + <ul> + <li><a href="http://lucene.apache.org/core/">Lucene</a></li> + <li><a href="http://dezi.org/">Dezi</a></li> + <li><a href="http://lucene.apache.org/solr/">Solr</a></li> + <li><a href="http://lucenenet.apache.org/">Lucene.NET</a></li> + <li><a href="http://lucene.apache.org/pylucene/">PyLucene</a></li> + </ul> + </div> <!-- lucy-left_nav_box --> + + <div id="lucy-main_content_box" class="grid_9"> + <div> +<a name='___top' class='dummyTopAnchor' ></a> + +<h2><a class='u' +name="NAME" +>NAME</a></h2> + +<p>Lucy::Index::DataWriter - Write data to an index.</p> + +<h2><a class='u' +name="SYNOPSIS" +>SYNOPSIS</a></h2> + +<pre># Abstract base class.</pre> + +<h2><a class='u' +name="DESCRIPTION" +>DESCRIPTION</a></h2> + +<p>DataWriter is an abstract base class for writing index data, +generally in segment-sized chunks. +Each component of an index – e.g. +stored fields, +lexicon, +postings, +deletions – is represented by a DataWriter/<a href="../../Lucy/Index/DataReader.html" class="podlinkpod" +>DataReader</a> pair.</p> + +<p>Components may be specified per index by subclassing <a href="../../Lucy/Plan/Architecture.html" class="podlinkpod" +>Architecture</a>.</p> + +<h2><a class='u' +name="CONSTRUCTORS" +>CONSTRUCTORS</a></h2> + +<h3><a class='u' +name="new" +>new</a></h3> + +<pre>my $writer = MyDataWriter->new( + snapshot => $snapshot, # required + segment => $segment, # required + polyreader => $polyreader, # required +);</pre> + +<p>Abstract constructor.</p> + +<ul> +<li><b>snapshot</b> - The Snapshot that will be committed at the end of the indexing session.</li> + +<li><b>segment</b> - The Segment in progress.</li> + +<li><b>polyreader</b> - A PolyReader representing all existing data in the index. +(If the index is brand new, +the PolyReader will have no sub-readers).</li> +</ul> + +<h2><a class='u' +name="ABSTRACT_METHODS" +>ABSTRACT METHODS</a></h2> + +<h3><a class='u' +name="add_segment" +>add_segment</a></h3> + +<pre>$data_writer->add_segment( + reader => $reader # required + doc_map => $doc_map # default: undef +);</pre> + +<p>Add content from an existing segment into the one currently being written.</p> + +<ul> +<li><b>reader</b> - The SegReader containing content to add.</li> + +<li><b>doc_map</b> - An array of integers mapping old document ids to new. +Deleted documents are mapped to 0, +indicating that they should be skipped.</li> +</ul> + +<h3><a class='u' +name="finish" +>finish</a></h3> + +<pre>$data_writer->finish();</pre> + +<p>Complete the segment: close all streams, +store metadata, +etc.</p> + +<h3><a class='u' +name="format" +>format</a></h3> + +<pre>my $int = $data_writer->format();</pre> + +<p>Every writer must specify a file format revision number, +which should increment each time the format changes. +Responsibility for revision checking is left to the companion DataReader.</p> + +<h2><a class='u' +name="METHODS" +>METHODS</a></h2> + +<h3><a class='u' +name="delete_segment" +>delete_segment</a></h3> + +<pre>$data_writer->delete_segment($reader);</pre> + +<p>Remove a segment’s data. +The default implementation is a no-op, +as all files within the segment directory will be automatically deleted. +Subclasses which manage their own files outside of the segment system should override this method and use it as a trigger for cleaning up obsolete data.</p> + +<ul> +<li><b>reader</b> - The SegReader containing content to merge, +which must represent a segment which is part of the the current snapshot.</li> +</ul> + +<h3><a class='u' +name="merge_segment" +>merge_segment</a></h3> + +<pre>$data_writer->merge_segment( + reader => $reader # required + doc_map => $doc_map # default: undef +);</pre> + +<p>Move content from an existing segment into the one currently being written.</p> + +<p>The default implementation calls <a href="#add_segment" class="podlinkpod" +>add_segment()</a> then <a href="#delete_segment" class="podlinkpod" +>delete_segment()</a>.</p> + +<ul> +<li><b>reader</b> - The SegReader containing content to merge, +which must represent a segment which is part of the the current snapshot.</li> + +<li><b>doc_map</b> - An array of integers mapping old document ids to new. +Deleted documents are mapped to 0, +indicating that they should be skipped.</li> +</ul> + +<h3><a class='u' +name="metadata" +>metadata</a></h3> + +<pre>my $hashref = $data_writer->metadata();</pre> + +<p>Arbitrary metadata to be serialized and stored by the Segment. +The default implementation supplies a hash with a single key-value pair for “format”.</p> + +<h3><a class='u' +name="get_snapshot" +>get_snapshot</a></h3> + +<pre>my $snapshot = $data_writer->get_snapshot();</pre> + +<p>Accessor for “snapshot” member var.</p> + +<h3><a class='u' +name="get_segment" +>get_segment</a></h3> + +<pre>my $segment = $data_writer->get_segment();</pre> + +<p>Accessor for “segment” member var.</p> + +<h3><a class='u' +name="get_polyreader" +>get_polyreader</a></h3> + +<pre>my $poly_reader = $data_writer->get_polyreader();</pre> + +<p>Accessor for “polyreader” member var.</p> + +<h3><a class='u' +name="get_schema" +>get_schema</a></h3> + +<pre>my $schema = $data_writer->get_schema();</pre> + +<p>Accessor for “schema” member var.</p> + +<h3><a class='u' +name="get_folder" +>get_folder</a></h3> + +<pre>my $folder = $data_writer->get_folder();</pre> + +<p>Accessor for “folder” member var.</p> + +<h2><a class='u' +name="INHERITANCE" +>INHERITANCE</a></h2> + +<p>Lucy::Index::DataWriter isa Clownfish::Obj.</p> + +</div> + + </div> <!-- lucy-main_content_box --> + <div class="clear"></div> + + </div> <!-- lucy-main_content --> + + <div id="lucy-copyright" class="container_16"> + <p>Copyright © 2010-2015 The Apache Software Foundation, Licensed under the + <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>. + <br/> + Apache Lucy, Lucy, Apache, the Apache feather logo, and the Apache Lucy project logo are trademarks of The + Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their + respective owners. + </p> + </div> <!-- lucy-copyright --> + + </div> <!-- lucy-rigid_wrapper --> + + </body> +</html> Added: websites/staging/lucy/trunk/content/docs/perl/Lucy/Index/DeletionsWriter.html ============================================================================== --- websites/staging/lucy/trunk/content/docs/perl/Lucy/Index/DeletionsWriter.html (added) +++ websites/staging/lucy/trunk/content/docs/perl/Lucy/Index/DeletionsWriter.html Mon Apr 4 09:23:29 2016 @@ -0,0 +1,190 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> +<html lang="en"> + <head> + <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> + <title>Lucy::Index::DeletionsWriter â Apache Lucy Documentation</title> + <link rel="stylesheet" type="text/css" media="screen" href="/css/lucy.css"> + </head> + + <body> + + <div id="lucy-rigid_wrapper"> + + <div id="lucy-top" class="container_16 lucy-white_box_3d"> + + <div id="lucy-logo_box" class="grid_8"> + <a href="/"><img src="/images/lucy_logo_150x100.png" alt="Apache Lucyâ¢"></a> + </div> <!-- lucy-logo_box --> + + <div #id="lucy-top_nav_box" class="grid_8"> + <div id="lucy-top_nav_bar" class="container_8"> + <ul> + <li><a href="http://www.apache.org/" title="Apache Software Foundation">Apache Software Foundation</a></li> + <li><a href="http://www.apache.org/licenses/" title="License">License</a></li> + <li><a href="http://www.apache.org/foundation/sponsorship.html" title="Sponsorship">Sponsorship</a></li> + <li><a href="http://www.apache.org/foundation/thanks.html" title="Thanks">Thanks</a></li> + <li><a href="http://www.apache.org/security/ " title="Security">Security</a></li> + </ul> + </div> <!-- lucy-top_nav_bar --> + <p><a href="http://www.apache.org/">Apache</a> » <a href="/">Lucy</a> » <a href="/docs/">Docs</a> » <a href="/docs/perl/">Perl</a> » <a href="/docs/perl/Lucy/">Lucy</a> » <a href="/docs/perl/Lucy/Index/">Index</a></p> + <form name="lucy-top_search_box" id="lucy-top_search_box" action="http://www.google.com/search" method="get"> + <input value="*.apache.org" name="sitesearch" type="hidden"/> + <input type="text" name="q" id="query" style="width:85%"> + <input type="submit" id="submit" value="Search"> + </form> + </div> <!-- lucy-top_nav_box --> + + <div class="clear"></div> + + </div> <!-- lucy-top --> + + <div id="lucy-main_content" class="container_16 lucy-white_box_3d"> + + <div class="grid_4" id="lucy-left_nav_box"> + <h6>About</h6> + <ul> + <li><a href="/">Welcome</a></li> + <li><a href="/clownfish.html">Clownfish</a></li> + <li><a href="/faq.html">FAQ</a></li> + <li><a href="/people.html">People</a></li> + </ul> + <h6>Resources</h6> + <ul> + <li><a href="/download.html">Download</a></li> + <li><a href="/mailing_lists.html">Mailing Lists</a></li> + <li><a href="/docs/perl/">Documentation</a></li> + <li><a href="http://wiki.apache.org/lucy/">Wiki</a></li> + <li><a href="https://issues.apache.org/jira/browse/LUCY">Issue Tracker</a></li> + <li><a href="/version_control.html">Version Control</a></li> + </ul> + <h6>Related Projects</h6> + <ul> + <li><a href="http://lucene.apache.org/core/">Lucene</a></li> + <li><a href="http://dezi.org/">Dezi</a></li> + <li><a href="http://lucene.apache.org/solr/">Solr</a></li> + <li><a href="http://lucenenet.apache.org/">Lucene.NET</a></li> + <li><a href="http://lucene.apache.org/pylucene/">PyLucene</a></li> + </ul> + </div> <!-- lucy-left_nav_box --> + + <div id="lucy-main_content_box" class="grid_9"> + <div> +<a name='___top' class='dummyTopAnchor' ></a> + +<h2><a class='u' +name="NAME" +>NAME</a></h2> + +<p>Lucy::Index::DeletionsWriter - Abstract base class for marking documents as deleted.</p> + +<h2><a class='u' +name="SYNOPSIS" +>SYNOPSIS</a></h2> + +<pre>my $polyreader = $del_writer->get_polyreader; +my $seg_readers = $polyreader->seg_readers; +for my $seg_reader (@$seg_readers) { + my $count = $del_writer->seg_del_count( $seg_reader->get_seg_name ); + ... +}</pre> + +<h2><a class='u' +name="DESCRIPTION" +>DESCRIPTION</a></h2> + +<p>Subclasses of DeletionsWriter provide a low-level mechanism for declaring a document deleted from an index.</p> + +<p>Because files in an index are never modified, +and because it is not practical to delete entire segments, +a DeletionsWriter does not actually remove documents from the index. +Instead, +it communicates to a search-time companion DeletionsReader which documents are deleted in such a way that it can create a Matcher iterator.</p> + +<p>Documents are truly deleted only when the segments which contain them are merged into new ones.</p> + +<h2><a class='u' +name="ABSTRACT_METHODS" +>ABSTRACT METHODS</a></h2> + +<h3><a class='u' +name="delete_by_term" +>delete_by_term</a></h3> + +<pre>$deletions_writer->delete_by_term( + field => $field # required + term => $term # required +);</pre> + +<p>Delete all documents in the index that index the supplied term.</p> + +<ul> +<li><b>field</b> - The name of an indexed field. +(If it is not spec’d as <code>indexed</code>, +an error will occur.)</li> + +<li><b>term</b> - The term which identifies docs to be marked as deleted. +If <code>field</code> is associated with an Analyzer, +<code>term</code> will be processed automatically (so don’t pre-process it yourself).</li> +</ul> + +<h3><a class='u' +name="delete_by_query" +>delete_by_query</a></h3> + +<pre>$deletions_writer->delete_by_query($query);</pre> + +<p>Delete all documents in the index that match <code>query</code>.</p> + +<ul> +<li><b>query</b> - A <a href="../../Lucy/Search/Query.html" class="podlinkpod" +>Query</a>.</li> +</ul> + +<h3><a class='u' +name="updated" +>updated</a></h3> + +<pre>my $bool = $deletions_writer->updated();</pre> + +<p>Returns true if there are updates that need to be written.</p> + +<h3><a class='u' +name="seg_del_count" +>seg_del_count</a></h3> + +<pre>my $int = $deletions_writer->seg_del_count($seg_name);</pre> + +<p>Return the number of deletions for a given segment.</p> + +<ul> +<li><b>seg_name</b> - The name of the segment.</li> +</ul> + +<h2><a class='u' +name="INHERITANCE" +>INHERITANCE</a></h2> + +<p>Lucy::Index::DeletionsWriter isa <a href="../../Lucy/Index/DataWriter.html" class="podlinkpod" +>Lucy::Index::DataWriter</a> isa Clownfish::Obj.</p> + +</div> + + </div> <!-- lucy-main_content_box --> + <div class="clear"></div> + + </div> <!-- lucy-main_content --> + + <div id="lucy-copyright" class="container_16"> + <p>Copyright © 2010-2015 The Apache Software Foundation, Licensed under the + <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>. + <br/> + Apache Lucy, Lucy, Apache, the Apache feather logo, and the Apache Lucy project logo are trademarks of The + Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their + respective owners. + </p> + </div> <!-- lucy-copyright --> + + </div> <!-- lucy-rigid_wrapper --> + + </body> +</html> Added: websites/staging/lucy/trunk/content/docs/perl/Lucy/Index/DocReader.html ============================================================================== --- websites/staging/lucy/trunk/content/docs/perl/Lucy/Index/DocReader.html (added) +++ websites/staging/lucy/trunk/content/docs/perl/Lucy/Index/DocReader.html Mon Apr 4 09:23:29 2016 @@ -0,0 +1,157 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> +<html lang="en"> + <head> + <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> + <title>Lucy::Index::DocReader â Apache Lucy Documentation</title> + <link rel="stylesheet" type="text/css" media="screen" href="/css/lucy.css"> + </head> + + <body> + + <div id="lucy-rigid_wrapper"> + + <div id="lucy-top" class="container_16 lucy-white_box_3d"> + + <div id="lucy-logo_box" class="grid_8"> + <a href="/"><img src="/images/lucy_logo_150x100.png" alt="Apache Lucyâ¢"></a> + </div> <!-- lucy-logo_box --> + + <div #id="lucy-top_nav_box" class="grid_8"> + <div id="lucy-top_nav_bar" class="container_8"> + <ul> + <li><a href="http://www.apache.org/" title="Apache Software Foundation">Apache Software Foundation</a></li> + <li><a href="http://www.apache.org/licenses/" title="License">License</a></li> + <li><a href="http://www.apache.org/foundation/sponsorship.html" title="Sponsorship">Sponsorship</a></li> + <li><a href="http://www.apache.org/foundation/thanks.html" title="Thanks">Thanks</a></li> + <li><a href="http://www.apache.org/security/ " title="Security">Security</a></li> + </ul> + </div> <!-- lucy-top_nav_bar --> + <p><a href="http://www.apache.org/">Apache</a> » <a href="/">Lucy</a> » <a href="/docs/">Docs</a> » <a href="/docs/perl/">Perl</a> » <a href="/docs/perl/Lucy/">Lucy</a> » <a href="/docs/perl/Lucy/Index/">Index</a></p> + <form name="lucy-top_search_box" id="lucy-top_search_box" action="http://www.google.com/search" method="get"> + <input value="*.apache.org" name="sitesearch" type="hidden"/> + <input type="text" name="q" id="query" style="width:85%"> + <input type="submit" id="submit" value="Search"> + </form> + </div> <!-- lucy-top_nav_box --> + + <div class="clear"></div> + + </div> <!-- lucy-top --> + + <div id="lucy-main_content" class="container_16 lucy-white_box_3d"> + + <div class="grid_4" id="lucy-left_nav_box"> + <h6>About</h6> + <ul> + <li><a href="/">Welcome</a></li> + <li><a href="/clownfish.html">Clownfish</a></li> + <li><a href="/faq.html">FAQ</a></li> + <li><a href="/people.html">People</a></li> + </ul> + <h6>Resources</h6> + <ul> + <li><a href="/download.html">Download</a></li> + <li><a href="/mailing_lists.html">Mailing Lists</a></li> + <li><a href="/docs/perl/">Documentation</a></li> + <li><a href="http://wiki.apache.org/lucy/">Wiki</a></li> + <li><a href="https://issues.apache.org/jira/browse/LUCY">Issue Tracker</a></li> + <li><a href="/version_control.html">Version Control</a></li> + </ul> + <h6>Related Projects</h6> + <ul> + <li><a href="http://lucene.apache.org/core/">Lucene</a></li> + <li><a href="http://dezi.org/">Dezi</a></li> + <li><a href="http://lucene.apache.org/solr/">Solr</a></li> + <li><a href="http://lucenenet.apache.org/">Lucene.NET</a></li> + <li><a href="http://lucene.apache.org/pylucene/">PyLucene</a></li> + </ul> + </div> <!-- lucy-left_nav_box --> + + <div id="lucy-main_content_box" class="grid_9"> + <div> +<a name='___top' class='dummyTopAnchor' ></a> + +<h2><a class='u' +name="NAME" +>NAME</a></h2> + +<p>Lucy::Index::DocReader - Retrieve stored documents.</p> + +<h2><a class='u' +name="SYNOPSIS" +>SYNOPSIS</a></h2> + +<pre>my $doc_reader = $seg_reader->obtain("Lucy::Index::DocReader"); +my $doc = $doc_reader->fetch_doc($doc_id);</pre> + +<h2><a class='u' +name="DESCRIPTION" +>DESCRIPTION</a></h2> + +<p>DocReader defines the interface by which documents (with all stored fields) are retrieved from the index. +The default implementation returns <a href="../../Lucy/Document/HitDoc.html" class="podlinkpod" +>HitDoc</a> objects.</p> + +<h2><a class='u' +name="ABSTRACT_METHODS" +>ABSTRACT METHODS</a></h2> + +<h3><a class='u' +name="fetch_doc" +>fetch_doc</a></h3> + +<pre>my $hit_doc = $doc_reader->fetch_doc($doc_id);</pre> + +<p>Retrieve the document identified by <code>doc_id</code>.</p> + +<p>Returns: a HitDoc.</p> + +<h2><a class='u' +name="METHODS" +>METHODS</a></h2> + +<h3><a class='u' +name="aggregator" +>aggregator</a></h3> + +<pre>my $result = $doc_reader->aggregator( + readers => $readers # required + offsets => $offsets # required +);</pre> + +<p>Returns a DocReader which divvies up requests to its sub-readers according to the offset range.</p> + +<ul> +<li><b>readers</b> - An array of DocReaders.</li> + +<li><b>offsets</b> - Doc id start offsets for each reader.</li> +</ul> + +<h2><a class='u' +name="INHERITANCE" +>INHERITANCE</a></h2> + +<p>Lucy::Index::DocReader isa <a href="../../Lucy/Index/DataReader.html" class="podlinkpod" +>Lucy::Index::DataReader</a> isa Clownfish::Obj.</p> + +</div> + + </div> <!-- lucy-main_content_box --> + <div class="clear"></div> + + </div> <!-- lucy-main_content --> + + <div id="lucy-copyright" class="container_16"> + <p>Copyright © 2010-2015 The Apache Software Foundation, Licensed under the + <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>. + <br/> + Apache Lucy, Lucy, Apache, the Apache feather logo, and the Apache Lucy project logo are trademarks of The + Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their + respective owners. + </p> + </div> <!-- lucy-copyright --> + + </div> <!-- lucy-rigid_wrapper --> + + </body> +</html> Added: websites/staging/lucy/trunk/content/docs/perl/Lucy/Index/IndexManager.html ============================================================================== --- websites/staging/lucy/trunk/content/docs/perl/Lucy/Index/IndexManager.html (added) +++ websites/staging/lucy/trunk/content/docs/perl/Lucy/Index/IndexManager.html Mon Apr 4 09:23:29 2016 @@ -0,0 +1,261 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> +<html lang="en"> + <head> + <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> + <title>Lucy::Index::IndexManager â Apache Lucy Documentation</title> + <link rel="stylesheet" type="text/css" media="screen" href="/css/lucy.css"> + </head> + + <body> + + <div id="lucy-rigid_wrapper"> + + <div id="lucy-top" class="container_16 lucy-white_box_3d"> + + <div id="lucy-logo_box" class="grid_8"> + <a href="/"><img src="/images/lucy_logo_150x100.png" alt="Apache Lucyâ¢"></a> + </div> <!-- lucy-logo_box --> + + <div #id="lucy-top_nav_box" class="grid_8"> + <div id="lucy-top_nav_bar" class="container_8"> + <ul> + <li><a href="http://www.apache.org/" title="Apache Software Foundation">Apache Software Foundation</a></li> + <li><a href="http://www.apache.org/licenses/" title="License">License</a></li> + <li><a href="http://www.apache.org/foundation/sponsorship.html" title="Sponsorship">Sponsorship</a></li> + <li><a href="http://www.apache.org/foundation/thanks.html" title="Thanks">Thanks</a></li> + <li><a href="http://www.apache.org/security/ " title="Security">Security</a></li> + </ul> + </div> <!-- lucy-top_nav_bar --> + <p><a href="http://www.apache.org/">Apache</a> » <a href="/">Lucy</a> » <a href="/docs/">Docs</a> » <a href="/docs/perl/">Perl</a> » <a href="/docs/perl/Lucy/">Lucy</a> » <a href="/docs/perl/Lucy/Index/">Index</a></p> + <form name="lucy-top_search_box" id="lucy-top_search_box" action="http://www.google.com/search" method="get"> + <input value="*.apache.org" name="sitesearch" type="hidden"/> + <input type="text" name="q" id="query" style="width:85%"> + <input type="submit" id="submit" value="Search"> + </form> + </div> <!-- lucy-top_nav_box --> + + <div class="clear"></div> + + </div> <!-- lucy-top --> + + <div id="lucy-main_content" class="container_16 lucy-white_box_3d"> + + <div class="grid_4" id="lucy-left_nav_box"> + <h6>About</h6> + <ul> + <li><a href="/">Welcome</a></li> + <li><a href="/clownfish.html">Clownfish</a></li> + <li><a href="/faq.html">FAQ</a></li> + <li><a href="/people.html">People</a></li> + </ul> + <h6>Resources</h6> + <ul> + <li><a href="/download.html">Download</a></li> + <li><a href="/mailing_lists.html">Mailing Lists</a></li> + <li><a href="/docs/perl/">Documentation</a></li> + <li><a href="http://wiki.apache.org/lucy/">Wiki</a></li> + <li><a href="https://issues.apache.org/jira/browse/LUCY">Issue Tracker</a></li> + <li><a href="/version_control.html">Version Control</a></li> + </ul> + <h6>Related Projects</h6> + <ul> + <li><a href="http://lucene.apache.org/core/">Lucene</a></li> + <li><a href="http://dezi.org/">Dezi</a></li> + <li><a href="http://lucene.apache.org/solr/">Solr</a></li> + <li><a href="http://lucenenet.apache.org/">Lucene.NET</a></li> + <li><a href="http://lucene.apache.org/pylucene/">PyLucene</a></li> + </ul> + </div> <!-- lucy-left_nav_box --> + + <div id="lucy-main_content_box" class="grid_9"> + <div> +<a name='___top' class='dummyTopAnchor' ></a> + +<h2><a class='u' +name="NAME" +>NAME</a></h2> + +<p>Lucy::Index::IndexManager - Policies governing index updating, +locking, +and file deletion.</p> + +<h2><a class='u' +name="SYNOPSIS" +>SYNOPSIS</a></h2> + +<pre>use Sys::Hostname qw( hostname ); +my $hostname = hostname() or die "Can't get unique hostname"; +my $manager = Lucy::Index::IndexManager->new( + host => $hostname, +); + +# Index time: +my $indexer = Lucy::Index::Indexer->new( + index => '/path/to/index', + manager => $manager, +); + +# Search time: +my $reader = Lucy::Index::IndexReader->open( + index => '/path/to/index', + manager => $manager, +); +my $searcher = Lucy::Search::IndexSearcher->new( index => $reader );</pre> + +<h2><a class='u' +name="DESCRIPTION" +>DESCRIPTION</a></h2> + +<p>IndexManager is an advanced-use class for controlling index locking, +updating, +merging, +and deletion behaviors.</p> + +<p>IndexManager and <a href="../../Lucy/Plan/Architecture.html" class="podlinkpod" +>Architecture</a> are complementary classes: Architecture is used to define traits and behaviors which cannot change for the life of an index; IndexManager is used for defining rules which may change from process to process.</p> + +<h2><a class='u' +name="CONSTRUCTORS" +>CONSTRUCTORS</a></h2> + +<h3><a class='u' +name="new" +>new</a></h3> + +<pre>my $manager = Lucy::Index::IndexManager->new( + host => $hostname, # default: "" +);</pre> + +<p>Create a new IndexManager.</p> + +<ul> +<li><b>host</b> - An identifier which should be unique per-machine.</li> + +<li><b>lock_factory</b> - A LockFactory.</li> +</ul> + +<h2><a class='u' +name="METHODS" +>METHODS</a></h2> + +<h3><a class='u' +name="set_folder" +>set_folder</a></h3> + +<pre>$index_manager->set_folder($folder); +$index_manager->set_folder(); # default: undef</pre> + +<p>Setter for <code>folder</code> member. +Typical clients (Indexer, +IndexReader) will use this method to install their own Folder instance.</p> + +<h3><a class='u' +name="get_folder" +>get_folder</a></h3> + +<pre>my $folder = $index_manager->get_folder();</pre> + +<p>Getter for <code>folder</code> member.</p> + +<h3><a class='u' +name="get_host" +>get_host</a></h3> + +<pre>my $string = $index_manager->get_host();</pre> + +<p>Getter for <code>host</code> member.</p> + +<h3><a class='u' +name="recycle" +>recycle</a></h3> + +<pre>my $arrayref = $index_manager->recycle( + reader => $reader # required + del_writer => $del_writer # required + cutoff => $cutoff # required + optimize => $optimize # default: false +);</pre> + +<p>Return an array of SegReaders representing segments that should be consolidated. +Implementations must balance index-time churn against search-time degradation due to segment proliferation. +The default implementation prefers small segments or segments with a high proportion of deletions.</p> + +<ul> +<li><b>reader</b> - A PolyReader.</li> + +<li><b>del_writer</b> - A DeletionsWriter.</li> + +<li><b>cutoff</b> - A segment number which all returned SegReaders must exceed.</li> + +<li><b>optimize</b> - A boolean indicating whether to spend extra time optimizing the index for search-time performance.</li> +</ul> + +<h3><a class='u' +name="make_write_lock" +>make_write_lock</a></h3> + +<pre>my $lock = $index_manager->make_write_lock();</pre> + +<p>Create the Lock which controls access to modifying the logical content of the index.</p> + +<h3><a class='u' +name="set_write_lock_timeout" +>set_write_lock_timeout</a></h3> + +<pre>$index_manager->set_write_lock_timeout($timeout);</pre> + +<p>Setter for write lock timeout. +Default: 1000 milliseconds.</p> + +<h3><a class='u' +name="get_write_lock_timeout" +>get_write_lock_timeout</a></h3> + +<pre>my $int = $index_manager->get_write_lock_timeout();</pre> + +<p>Getter for write lock timeout.</p> + +<h3><a class='u' +name="set_write_lock_interval" +>set_write_lock_interval</a></h3> + +<pre>$index_manager->set_write_lock_interval($timeout);</pre> + +<p>Setter for write lock retry interval. +Default: 100 milliseconds.</p> + +<h3><a class='u' +name="get_write_lock_interval" +>get_write_lock_interval</a></h3> + +<pre>my $int = $index_manager->get_write_lock_interval();</pre> + +<p>Getter for write lock retry interval.</p> + +<h2><a class='u' +name="INHERITANCE" +>INHERITANCE</a></h2> + +<p>Lucy::Index::IndexManager isa Clownfish::Obj.</p> + +</div> + + </div> <!-- lucy-main_content_box --> + <div class="clear"></div> + + </div> <!-- lucy-main_content --> + + <div id="lucy-copyright" class="container_16"> + <p>Copyright © 2010-2015 The Apache Software Foundation, Licensed under the + <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>. + <br/> + Apache Lucy, Lucy, Apache, the Apache feather logo, and the Apache Lucy project logo are trademarks of The + Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their + respective owners. + </p> + </div> <!-- lucy-copyright --> + + </div> <!-- lucy-rigid_wrapper --> + + </body> +</html>