perlindex1p
Index and query perl manual pages
Usage
perlindex -index
perlindex tell
me
where
the
flowers
are
Overview
""perlindex -index"" generates an AnyDBM_File index which can be searched with free text queries ""perlindex" a verbose query".
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 stemed 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 word in the document, and |
$maxtf{$document}
|
is the maximum frequency of any word in document. |
Options
All options may be abbreviated.
-
-maxhits maxhits -
Maximum numer of hits to display. Default is 15.
-
-cbreak
-
-nocbreak -
Switch to cbreak in menu mode or don't.
-cbreakis the default.
-
-verbose -
Generates additional information which query words have been not found in the database and which words of the query are stopwords.
-
-conf -
Use another config than the default config (/etc/perlindex/config).
Examples
perlindex foo bar1 3.735 lib/pod/perlbot.pod2 2.640 lib/pod/perlsec.pod3 2.153 lib/pod/perldata.pod4 1.920 lib/Symbol.pm5 1.802 lib/pod/perlsub.pod6 1.586 lib/Getopt/Long.pm7 1.190 lib/File/Path.pm8 1.042 lib/pod/perlop.pod9 0.857 lib/pod/perlre.poda 0.830 lib/Shell.pmb 0.691 lib/strict.pmc 0.691 lib/Carp.pmd 0.680 lib/pod/perlpod.pode 0.680 lib/File/Find.pmf 0.626 lib/pod/perlsyn.podEnter 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 termindex_if # term -> (docid, frequency)*index_seen # fn -> indexed?
Releases
11 releases since Debian 3.1 (Sarge); the text changed 8 times.