Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

search::xapian::database(3pm) [debian man page]

Xapian::Database(3pm)					User Contributed Perl Documentation				     Xapian::Database(3pm)

NAME
Search::Xapian::Database - Search database object DESCRIPTION
This class represents a Xapian database for searching. See Search::Xapian::WritableDatabase for an object suitable for indexing. To perform searches, this class works with the Search::Xapian::Query object. METHODS
new <database> Class constructor. Can either take a path to an existing database or another database class as the first parameter clone Return a clone of this class. add_database Add an existing database (or group of databases) to those accessed by this object. reopen This re-opens the database(s) to the latest available version(s). It can be used either to make sure the latest results are returned, or to recover from a Xapian::DatabaseModifiedError. close Close the database. This also implies a commit() unless a transaction is in progress. enquire [<query>] Returns a new Search::Xapian::Enquire object. Any extra parameters are passed to set_query. get_doccount Returns the number of document indexed in this database. get_lastdocid Returns the id of the last used document. get_doclength <doc_id> Returns the length of a given document. get_document <doc_id> Returns a Search::Xapian::Document object for the given document. get_avlength Get the average length of the documents in the database. get_termfreq <term> Get the number of documents in the database indexed by a given term. term_exists <term> returns true if this term exists in the database, or false otherwise. get_description return a description of this object. get_spelling_suggestion returns a suggested spelling correction. allterms_begin [<prefix>] Returns a Search::Xapian::TermIterator iterating over the termlist for the the entire database. If the optional prefix argument is non-empty, only terms starting with that string are returned. allterms_end [<prefix>] Returns a Search::Xapian::TermIterator pointing to the end of the termlist corresponding to allterms_begin. termlist_begin <docid> Returns a Search::Xapian::TermIterator pointing to the start of the termlist for a given document. termlist_end <docid> Returns a Search::Xapian::TermIterator pointing to the end of the termlist for a given document. positionlist_begin <docid> <term> Returns a Search::Xapian::PositionIterator pointing to the start of the position list for a given term in the given document. positionlist_end <docid> <term> Returns a Search::Xapian::PositionIterator pointing to the end of the position list for a given term in the given document. postlist_begin <term> Returns a Search::Xapian::PostingIterator pointing to the start of the posting list for a given term. postlist_end <term> Returns a Search::Xapian::PostingIterator pointing to the end of the posting list for a given term. keep_alive Send a "keep-alive" to remote databases to stop them timing out. get_collection_freq <term> Get the number of elements indexed by a certain term. SEE ALSO
Search::Xapian,Search::Xapian::Enquire,Search::Xapian::WritableDatabase perl v5.14.2 2012-05-09 Xapian::Database(3pm)

Check Out this Related Man Page

Xapian::TermGenerator(3pm)				User Contributed Perl Documentation				Xapian::TermGenerator(3pm)

NAME
Search::Xapian::TermGenerator - Parses a piece of text and generates terms. DESCRIPTION
This module takes a piece of text and parses it to produce words which are then used to generate suitable terms for indexing. The terms generated are suitable for use with Search::Xapian::Query objects produced by the Search::Xapian::QueryParser class. SYNOPSIS
use Search::Xapian; my $doc = new Search::Xapian::Document(); my $tg = new Search::Xapian::TermGenerator(); $tg->set_stemmer(new Search::Xapian::Stem("english")); $tg->set_document($doc); $tg->index_text("The cat sat on the mat"); METHODS
new TermGenerator constructor. set_stemmer <stemmer> Set the Search::Xapian::Stem object to be used for generating stemmed terms. set_stopper <stopper> Set the Search::Xapian::Stopper object to be used for identifying stopwords. set_document <document> Set the Search::Xapian::Document object to index terms into. get_document <document> Get the currently set Search::Xapian::Document object. index_text <text> [<weight> [<prefix>]] Indexes the text in string <text>. The optional parameter <weight> sets the wdf increment (default 1). The optional parameter <prefix> sets the term prefix to use (default is no prefix). index_text_without_positions <text> [<weight> [<prefix>]] Just like index_text, but no positional information is generated. This means that the database will be significantly smaller, but that phrase searching and NEAR won't be supported. increase_termpos [<delta>] Increase the termpos used by index_text by <delta> (default 100). This can be used to prevent phrase searches from spanning two unconnected blocks of text (e.g. the title and body text). get_termpos Get the current term position. set_termpos <termpos> Set the current term position. get_description Return a description of this object. REFERENCE
http://www.xapian.org/docs/sourcedoc/html/classXapian_1_1TermGenerator.html perl v5.14.2 2012-05-09 Xapian::TermGenerator(3pm)
Man Page