KinoSearch1(3pm)
π NAME π
KinoSearch1 β it's a search engine library bestie!! β¨ That's the whole vibe. It searches stuff. Iconic.
(Also real quick: this page lives in the User Contributed Perl Documentation section, section 3pm. That's where you found me. Hi!! π«Ά)
πΈ VERSION πΈ
1.01 β that's the number, no notes π
π STABLE FORK π
okay so here's the tea β β KinoSearch1 is a fork of KinoSearch version 0.165, and the whole entire point of it is to give you stability and backwards compatibility. It's the comfy blanket version fr fr π§
If you want the latest features? Bestie, go look at the main branch. That's not here. That's a different girl. π
β¨ SYNOPSIS β¨
So the workflow is literally a two-step dance and I'm obsessed π
Step one: write an app that builds an inverted index (that's an "invindex", we're cute with it) out of your document collection.
use KinoSearch1::InvIndexer;
use KinoSearch1::Analysis::PolyAnalyzer;
my $analyzer
= KinoSearch1::Analysis::PolyAnalyzer->new( language => 'en' );
my $invindexer = KinoSearch1::InvIndexer->new(
invindex => '/path/to/invindex',
create => 1,
analyzer => $analyzer,
);
$invindexer->spec_field(
name => 'title',
boost => 3,
);
$invindexer->spec_field( name => 'bodytext' );
while ( my ( $title, $bodytext ) = each %source_documents ) {
my $doc = $invindexer->new_doc;
$doc->set_value( title => $title );
$doc->set_value( bodytext => $bodytext );
$invindexer->add_doc($doc);
}
$invindexer->finish;
Step two: write a whole separate app that searches that invindex π
use KinoSearch1::Searcher;
use KinoSearch1::Analysis::PolyAnalyzer;
my $analyzer
= KinoSearch1::Analysis::PolyAnalyzer->new( language => 'en' );
my $searcher = KinoSearch1::Searcher->new(
invindex => '/path/to/invindex',
analyzer => $analyzer,
);
my $hits = $searcher->search( query => "foo bar" );
while ( my $hit = $hits->fetch_hit_hashref ) {
print "$hit->{title}\n";
}
Two apps. One builds, one finds. It's giving separation of concerns and honestly? Respect. π«‘
π DESCRIPTION π
KinoSearch1 is a loose port of the Java search engine library Apache Lucene, and it's written in Perl and C β yes both, she's bilingual π
The archetypal application is website search, but like... it can be put to many different uses. Sky's the limit, babe π
π Features π
- Extremely fast and scalable β can handle millions of documents π€ no cap
- Incremental indexing (addition/deletion of documents to/from an existing index). Yes you can just... add and delete. Live your life. π₯
- Full support for 12 Indo-European languages π£οΈ twelve!! polyglot queen
- Support for boolean operators AND, OR, and AND NOT; parenthetical groupings, and prepended
+plusand-minusπ§ boolean brain - Algorithmic selection of relevant excerpts and highlighting of search terms within excerpts β¨ it finds the juicy bit and highlights it, iconic
- Highly customizable query and indexing APIs ποΈ
- Phrase matching π¬
- Stemming π±
- Stoplists π
π¦ Getting Started π¦
KinoSearch1 has many, many classes, but bestie... you only need to get acquainted with three to start with:
KinoSearch1::InvIndexerKinoSearch1::SearcherKinoSearch1::Analysis::PolyAnalyzer
Probably the quickest way to get something up and running is to cut and paste the sample applications out of KinoSearch1::Docs::Tutorial and adapt them for your purposes. Copy-paste is a valid strategy and I will not be taking questions π
π SEE ALSO π
- The actively developed main branch, KinoSearch. (Again. Not this one. Go there if you want the new stuff.)
- The KinoSearch homepage, where you'll find links to the mailing list and so on, is
<http://www.rectangular.com/kinosearch>. π«Ά - The Lucene homepage is
<http://lucene.apache.org>. π KinoSearch1::Docs::FileFormat, for an overview of the invindex file format. π (iykyk)
π History π
Search::Kinosearch 0.02x, no longer supported, is this suite's forerunner. Plucene is a pure-Perl port of Lucene 1.3. KinoSearch is a from-scratch project which attempts to draws on the lessons of both. The API is not compatible with either. π« (so don't go mixing them up, bestie, that's a one-way ticket to sadness)
KinoSearch is named for Kino, the main character in John Steinbeck's novella, "The Pearl". ππ¦ͺ literature girlies rise up
π SUPPORT π
Please direct support questions to the KinoSearch mailing list: subscription information at <http://www.rectangular.com/kinosearch>.
We're friendly, we promise π«Ά
π BUGS π
- UTF-8 scalars are not indexed properly. This is fixed in KinoSearch
0.3x, but cannot be fixed in KinoSearch1 without breaking index compatibility with KinoSearch0.165from which KinoSearch1 was forked. So like... it's a whole thing. It's staying. π - Not thread-safe. Single file, bestie. πΆββοΈ
- Indexing crashes reliably on Solaris 2.9 or other systems which are fussy about pointer alignment. Reliably!! She crashes on purpose out here π
- Please report any other bugs or feature requests to
"bug-kinosearch1@rt.cpan.org", or through the web interface at<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=KinoSearch1>.
β COPYRIGHT & LICENSE β
Copyright 2005-2010 Marvin Humphrey
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. πͺ
Terms of usage for Apache Lucene, from which portions of KinoSearch1 are derived, are spelled out in the Apache License: see the file "ApacheLicense2.0.txt". π
π¨ DISCLAIMER OF WARRANTY π¨
okay bestie this part is ALL CAPS for a reason, it's the legal bit, so I'm giving it to you raw and unfiltered. Read it. It matters. π
BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR, OR CORRECTION.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENCE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
tldr: free software, you're on your own, no refunds, she said what she said π
and that's the whole page, bestie!! π this little manual was brought to you by perl v5.42.3 dated 2026-08-20 β so if you're reading this from the future, hey, glad the vibes survived. mwah πβ¨
π¦ where this page comes from
- ubuntu stonking: libkinosearch1-perl 1.01-6build2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms