PERLINDEX(1)

πŸ“¦
version 1.606 Β· 4 versions
, in epel 9

πŸ’– 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 is 15.
  • -menu β€” Use the matches as a menu for calling man. Default is -menu.q.
  • -nomenu β€” Don't use the matches as a menu for calling man.
  • -cbreak β€” Switch to cbreak in menu mode. -cbreak is 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