GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Xapian::TermGenerator(3) User Contributed Perl Documentation Xapian::TermGenerator(3)

Search::Xapian::TermGenerator - Parses a piece of text and generates terms.

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.

  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");

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> [<wdf_inc> [<prefix>]]
Indexes the text in string <text>. The optional parameter <wdf_inc> 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> [<wdf_inc> [<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.

  https://xapian.org/docs/sourcedoc/html/classXapian_1_1TermGenerator.html
2018-07-09 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.