{
    "mode": "perldoc",
    "parameter": "Plucene::Search::HitCollector",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/perldoc/Plucene%3A%3ASearch%3A%3AHitCollector/json",
    "generated": "2026-06-14T13:45:54Z",
    "synopsis": "# used in conjunction with the IndexSearcher\nmy $searcher = Plucene::Search::IndexSearcher->new($DIRECTORY);\nmy $hc = Plucene::Search::HitCollector->new( collect =>\nsub {\nmy ($self, $doc, $score) = @;\n...\n});\n$searcher->searchhc($QUERY, $hc);",
    "sections": {
        "NAME": {
            "content": "Plucene::Search::HitCollector\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "# used in conjunction with the IndexSearcher\n\nmy $searcher = Plucene::Search::IndexSearcher->new($DIRECTORY);\n\nmy $hc = Plucene::Search::HitCollector->new( collect =>\nsub {\nmy ($self, $doc, $score) = @;\n...\n});\n\n$searcher->searchhc($QUERY, $hc);\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "This is used in conjunction with the IndexSearcher, in that whenever a non-zero scoring document\nis found, the subref with with the HitCollector was made will get called.\n",
            "subsections": []
        },
        "METHODS": {
            "content": "new\nmy $hc = Plucene::Search::HitCollector->new( collect =>\nsub {\nmy ($self, $doc, $score) = @;\n...\n});\n\nThis will create a new Plucene::Search::HitCollector with the passed subref.\n\ncollect\nThis is called once for every non-zero scoring document, with the document number and its score.\n",
            "subsections": []
        }
    },
    "summary": "Plucene::Search::HitCollector",
    "flags": [],
    "examples": [],
    "see_also": []
}