{
    "content": [
        {
            "type": "text",
            "text": "# Plucene::TestCase (perldoc)\n\n## NAME\n\nPlucene::TestCase - Handy functions when testing Plucene\n\n## SYNOPSIS\n\nuse Test::More tests => 10;\nuse Plucene::TestCase;\nnewindex {\nadddocument( foo => \"bar\" );\n};\nreindex {\nadddocument( foo => \"baz\" );\n}\nwithreader {\n$READER->whatever;\n}\nmy $hits = search(\"foo:ba*\");\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **EXPORTS** (1 subsections)\n- **POD ERRORS**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "Plucene::TestCase",
        "section": "",
        "mode": "perldoc",
        "summary": "Plucene::TestCase - Handy functions when testing Plucene",
        "synopsis": "use Test::More tests => 10;\nuse Plucene::TestCase;\nnewindex {\nadddocument( foo => \"bar\" );\n};\nreindex {\nadddocument( foo => \"baz\" );\n}\nwithreader {\n$READER->whatever;\n}\nmy $hits = search(\"foo:ba*\");",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 17,
                "subsections": []
            },
            {
                "name": "EXPORTS",
                "lines": 31,
                "subsections": [
                    {
                        "name": "add_document",
                        "lines": 11
                    }
                ]
            },
            {
                "name": "POD ERRORS",
                "lines": 6,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "Plucene::TestCase - Handy functions when testing Plucene\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "use Test::More tests => 10;\nuse Plucene::TestCase;\n\nnewindex {\nadddocument( foo => \"bar\" );\n};\n\nreindex {\nadddocument( foo => \"baz\" );\n}\n\nwithreader {\n$READER->whatever;\n}\n\nmy $hits = search(\"foo:ba*\");\n",
                "subsections": []
            },
            "EXPORTS": {
                "content": "$DIR\nA directory which is created for the purposes of this test, in which\nthe index will be placed. It will normally be cleaned up at the end\nof the test, unless $Plucene::TestCase::DEBUG is set to allow you to\nperuse the entrails.\n\n$WRITER\nA variable holding the current \"Index::Writer\" object, if there is\none.\n\n$READER\nA variable holding the current \"Index::Reader\" object, if there is\none.\n\n$ANALYZER\nA variable holding the class name of the desired \"Analysis::Analyzer\"\nclass.\n\nnewindex BLOCK (Analyzer)\nCreate a new index, and do the following stuff in the block before\nclosing the index writer. $WRITER is set for the duration of the\nblock.\n\nThe optional parameter should be the class name of the analyzer to\nuse; if not specified, the value from $ANALYZER, which in turn\ndefaults to \"Plucene::Analysis::SimpleAnalyzer\", will be used.\n\nreindex BLOCK (Analyzer)\nSame as \"newindex\", but doesn't create a new index, rather re-uses\nan old one.\n",
                "subsections": [
                    {
                        "name": "add_document",
                        "content": "Add a new document to the index, with the given fields and values\n\nwithreader BLOCK\nOpens an index reader in $READER and runs the block.\n\nsearch\nSearches for the query given. If any fields are not specified, they\nwill be assumed to be the default \"text\". Returns a\n\"Plucene::Search::Hits\" object. The value of $ANALYZER will be used\nto construct an analyzer for the query string.\n"
                    }
                ]
            },
            "POD ERRORS": {
                "content": "Hey! The above document had some coding errors, which are explained\nbelow:\n\nAround line 49:\n=over without closing =back\n",
                "subsections": []
            }
        }
    }
}