This is a command-line application demonstrating simple Lucene indexing. Run it with no command-line arguments for usage information.
It's based on a demo provided by the lucene project.
Important Note
The pom.xml uses an outdated lucene version. Replace that version with the latest version to avoid security risks like CVE-2024-45772.
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv static void | indexDocs(org.
Writer to the index where the given file/dir info will be stored writer,The file to index, or the directory to recurse into to find files to index file)Indexes the given file using the given writer, or if a directory is given, recurses over files and directories found under the given directory. |
| public static void |
| IndexPDFFiles | back to summary |
|---|---|
| private IndexPDFFiles() | |
| indexDocs | back to summary |
|---|---|
| pack-priv static void indexDocs(org. Indexes the given file using the given writer, or if a directory is given, recurses over files and directories found under the given directory. Note This method indexes one document per input file. This is slow. For good throughput, put multiple documents into your input file(s). An example of this is in the benchmark module, which can create "line doc" files, one document per line, using the WriteLineDocTask.
| |
| main | back to summary |
|---|---|
| public static void main(String[] args) Index all text files under a directory.
| |