NAME

Pod::POM::Web::Indexer - full-text search for Pod::POM::Web

SYNOPSIS

  perl -MPod::POM::Web::Indexer -e index

DESCRIPTION

Adds full-text search capabilities to the Pod::POM::Web application. This requires Search::Indexer to be installed.

Queries may include plain terms, "exact phrases", '+' or '-' prefixes, Boolean operators and parentheses. See Search::QueryParser for details.

METHODS

index

    Pod::POM::Web::Indexer->new->index(%options)

Walks through directories in @INC and indexes all *.pm and *.pod files, skipping shadowed files (files for which a similar loading path was already found in previous @INC directories), and skipping files that are too big.

Default indexing is incremental : files whose modification time has not changed since the last indexing operation will not be indexed again.

Options can be

-max_size

Size limit (in bytes) above which files will not be indexed. The default value is 300K. Files of size above this limit are usually not worth indexing because they only contain big configuration tables (like for example Module::CoreList or Unicode::Charname).

-from_scratch

If true, the previous index is deleted, so all files will be freshly indexed. If false (the default), indexation is incremental, i.e. files whose modification time has not changed will not be re-indexed.

-positions

If true, the indexer will also store word positions in documents, so that it can later answer to "exact phrase" queries.

So if -positions are on, a search for "more than one way" will only return documents which contain that exact sequence of contiguous words; whereas if -positions are off, the query is equivalent to more AND than AND one AND way, i.e. it returns all documents which contain these words anywhere and in any order.

The option is off by default, because it requires much more disk space, and does not seem to be very relevant for searching Perl documentation.

The index function is exported into the main:: namespace if perl is called with the -e flag, so that you can write

  perl -MPod::POM::Web::Indexer -e index