PERLINDEX(1)
π perlindex(1) π
okay bestie, welcome to the PERLINDEX(1) page from the User Contributed Perl Documentation β this is your group-chat-friendly guide to perlindex, the tool that indexes and queries perl manual pages. Every flag, path, formula, and example is still here. We just gave it main-character energy. β¨
πΈ NAME πΈ
perlindex β index and query perl manual pages
π¦ SYNOPSIS π¦
perlindex -index
perlindex tell me where the flowers are
π₯ DESCRIPTION π₯
Okay so perlindex -index generates an AnyDBM_File index, and that index can be searched with free text queries like perlindex followed by a verbose query. obsessed with a searchable manual page, honestly. π
Each word of the query is searched in the index, and a score is generated for each document containing it. Scores for all words are added, and the documents with the highest score are printed. All words are stemmed with Porters algorithm (see Text::English) before indexing and searching happens.
The score is computed as:
$score{$document} += $tf{$word,$document}/$maxtf{$document}
* log ($N/$n{$word});
where:
$Nβ is the number of documents in the index.$n{$word}β is the number of documents containing the word.$tf{$word,$document}β is the number of occurrences of the word in the document.$maxtf{$document}β is the maximum frequency of any word in the document.
π OPTIONS π
All options may be abbreviated. Yes, the page spells it abreviated, and honestly? iconic. π
-maxhits maxhitsβ Maximum number of hits to display. Default is15.-menuβ Use the matches as a menu for callingman. Default is-menu.q.-nomenuβ Don't use the matches as a menu for callingman.-cbreakβ Switch to cbreak in menu mode.-cbreakis the default.-nocbreakβ Don't switch to cbreak in menu mode.-verboseβ Generates additional information: which query words have not been found in the database, and which words of the query are stopwords.
π EXAMPLE π
perlindex foo bar
1 3.735 lib/pod/perlbot.pod
2 2.640 lib/pod/perlsec.pod
3 2.153 lib/pod/perldata.pod
4 1.920 lib/Symbol.pm
5 1.802 lib/pod/perlsub.pod
6 1.586 lib/Getopt/Long.pm
7 1.190 lib/File/Path.pm
8 1.042 lib/pod/perlop.pod
9 0.857 lib/pod/perlre.pod
a 0.830 lib/Shell.pm
b 0.691 lib/strict.pm
c 0.691 lib/Carp.pm
d 0.680 lib/pod/perlpod.pod
e 0.680 lib/File/Find.pm
f 0.626 lib/pod/perlsyn.pod
Enter Number or 'q'>
Hitting the keys 1 to f will display the corresponding manual page. Hitting q quits. All other keys display this manual page.
π FILES π
The index will be generated in your man directory. Strictly speaking in $Config{man1direxp}/...
The following files will be generated:
index_fn # docid -> (max frequency, filename)
index_idf # term -> number of documents containing term
index_if # term -> (docid, frequency)*
index_seen # fn -> indexed?
π«Ά AUTHOR π«Ά
Ulrich Pfeifer <pfeifer@ls6.informatik.uni-dortmund.de>
That's the whole page, bestie. Source/version check: perl v5.32.1, dated 2024-09-25, and yes β this is PERLINDEX(1). Now go index something iconic. π
π
π¦ where this page comes from
- epel 9: perl-perlindex 1.606-33.el9 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms