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


Manual Reference Pages  -  SEARCH::XAPIAN::TERMGENERATOR (3)

.ds Aq ’

NAME

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

CONTENTS

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



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


perl v5.20.3 XAPIAN::TERMGENERATOR (3) 2011-01-14

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