{
    "mode": "perldoc",
    "parameter": "Plucene",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/perldoc/Plucene/json",
    "generated": "2026-06-14T13:44:06Z",
    "synopsis": "",
    "sections": {
        "NAME": {
            "content": "Plucene - A Perl port of the Lucene search engine\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "",
            "subsections": [
                {
                    "name": "Create Documents by adding Fields:",
                    "content": "my $doc = Plucene::Document->new;\n$doc->add(Plucene::Document::Field->Text(content => $content));\n$doc->add(Plucene::Document::Field->Text(author => \"Your Name\"));\n"
                },
                {
                    "name": "Choose Your Analyser and add documents to an Index Writer",
                    "content": "my $analyzer = Plucene::Analysis::SimpleAnalyzer->new();\nmy $writer = Plucene::Index::Writer->new(\"myindex\", $analyzer, 1);\n\n$writer->adddocument($doc);\nundef $writer; # close\n\nSearch by building a Query\nmy $parser = Plucene::QueryParser->new({\nanalyzer => Plucene::Analysis::SimpleAnalyzer->new(),\ndefault  => \"text\" # Default field for non-specified queries\n});\nmy $query = $parser->parse('author:\"Your Name\"');\n\nThen pass the Query to an IndexSearcher and collect hits\nmy $searcher = Plucene::Search::IndexSearcher->new(\"myindex\");\n\nmy @docs;\nmy $hc = Plucene::Search::HitCollector->new(collect => sub {\nmy ($self, $doc, $score) = @;\npush @docs, $searcher->doc($doc);\n});\n\n$searcher->searchhc($query => $hc);\n"
                }
            ]
        },
        "DESCRIPTION": {
            "content": "Plucene is a fully-featured and highly customizable search engine toolkit based on the Lucene\nAPI. (<http://jakarta.apache.org/lucene>)\n\nIt is not, in and of itself, a functional search engine - you are expected to subclass and tie\nall the pieces together to suit your own needs. The synopsis above gives a rough indication of\nhow to use the engine in simple cases. See Plucene::Simple for one example of tying it all\ntogether.\n\nThe tests shipped with Plucene provide a variety of other examples of how use this.\n",
            "subsections": []
        },
        "EXTENSIONS": {
            "content": "Plucene comes shipped with some default Analyzers. However it is expected that users will want\nto create Analyzers to meet their own needs. To avoid namespace corruption, anyone releasing\nsuch Analyzers to CPAN (which is encouraged!) should place them in the namespace\nPlucene::Plugin::Analyzer::.\n",
            "subsections": []
        },
        "DOCUMENTATION": {
            "content": "Although most of the Perl modules should be well documented, the Perl API mirrors Lucene's to\nsuch an extent that reading Lucene's documentation will give you a good idea of how to do more\nadvanced stuff with Plucene. See particularly the ONJava articles\n<http://www.onjava.com/pub/a/onjava/2003/01/15/lucene.html> and\n<http://www.onjava.com/pub/a/onjava/2003/03/05/lucene.html>. These are brilliant introductions\nto the concepts surrounding Lucene, how it works, and how to extend it.\n",
            "subsections": []
        },
        "COMPATIBILITY": {
            "content": "For the most part Lucene and Plucene indexes are created in the same manner. However, due to\ncurrent implementation details, the indexes will generally not be compatible. It should\ntheoretically be possible to convert index files in either direction between Plucene and Lucene,\nbut no tools are currently provided to do so.\n\nAs Plucene is still undergoing development, we cannot guarantee index format compatibility\nacross releases. If you're using Plucene in production code, you need to ensure that you can\nrecreate the indexes.\n",
            "subsections": []
        },
        "MISSING FEATURES": {
            "content": "The following features have not yet been fully implemented:\n\n*   Wildcard searches\n\n*   Range searches\n",
            "subsections": []
        },
        "MAILING LIST": {
            "content": "Bug reports, patches, queries, discussion etc should be addressed to the mailing list. More\ninformation on the list can be found at:\n\n<http://www.kasei.com/mailman/listinfo/plucene>\n",
            "subsections": []
        },
        "AUTHORS": {
            "content": "Initially ported by Simon Cozens and Marc Kerr.\n\nCurrently maintained by Tony Bowden and Marty Pauley.\n\nOriginal Java Lucene by Doug Cutting and others.\n",
            "subsections": []
        },
        "THANKS": {
            "content": "The initial development and ongoing maintenance of Plucene has been funded and supported by\nKasei <http://www.kasei.com/>\n",
            "subsections": []
        },
        "LICENSE": {
            "content": "This software is licensed under the same terms as Perl itself.\n",
            "subsections": []
        }
    },
    "summary": "Plucene - A Perl port of the Lucene search engine",
    "flags": [],
    "examples": [],
    "see_also": []
}