Xapian:...enerator(3)
π Xapian:...enerator(3) β Search::Xapian::TermGenerator π
okay bestie, welcome to the User Contributed Perl Documentation page for Search::Xapian::TermGenerator β aka the Xapian:...enerator(3) glow-up. Itβs lowkey iconic: this module parses text and generates terms, and the vibes are very βindexing but make it cute.β π
β¨ NAME β¨
Search::Xapian::TermGenerator β parses a piece of text and generates terms. π
πΈ DESCRIPTION πΈ
This module grabs a piece of text, parses it into words, and then uses those words to generate suitable terms for indexing. The terms it generates are suitable for use with Search::Xapian::Query objects produced by the Search::Xapian::QueryParser class. No cap, thatβs the whole plot. π¦
π§ 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 theSearch::Xapian::Stemobject to be used for generating stemmed terms. π±set_stopper <stopper>β Set theSearch::Xapian::Stopperobject to be used for identifying stopwords. πset_document <document>β Set theSearch::Xapian::Documentobject to index terms into. πget_document <document>β Get the currently setSearch::Xapian::Documentobject. πindex_text <text> [<wdf_inc> [<prefix>]]β Indexes the text in string<text>. The optional parameter<wdf_inc>sets the wdf increment (default1). The optional parameter<prefix>sets the term prefix to use (default is no prefix). π₯index_text_without_positions <text> [<wdf_inc> [<prefix>]]β Just likeindex_text, but no positional information is generated. This means that the database will be significantly smaller, but that phrase searching andNEARwonβt be supported. π«Άincrease_termpos [<delta>]β Increase the termpos used byindex_textby<delta>(default100).
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 π
https://xapian.org/docs/sourcedoc/html/classXapian_1_1TermGenerator.html
mwah π this page is from perl v5.42.0, dated 2022-02-28, and itβs the Xapian:...enerator(3) manual page. periodt. π
π¦ where this page comes from
- opensuse-leap 16.0: perl-Search-Xapian 1.2.25.5-bp160.1.7 Β· Artistic-1.0 OR GPL-1.0-or-later
- opensuse-leap 16.0: perl-Search-Xapian 1.2.25.5-bp160.1.7 Β· Artistic-1.0 OR GPL-1.0-or-later
- opensuse-leap 16.0: perl-Search-Xapian 1.2.25.5-bp160.1.7 Β· Artistic-1.0 OR GPL-1.0-or-later
- opensuse-leap 16.0: perl-Search-Xapian 1.2.25.5-bp160.1.7 Β· Artistic-1.0 OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms