Xapian::TermGenerator(3pm) | User Contributed Perl Documentation | Xapian::TermGenerator(3pm) |
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");
This can be used to prevent phrase searches from spanning two unconnected blocks of text (e.g. the title and body text).
https://xapian.org/docs/sourcedoc/html/classXapian_1_1TermGenerator.html
2022-11-23 | perl v5.36.0 |