This project is developed with Apache Lucene, a Java full-text search engine software library, for building a simple indexer and index searcher.
- Java: 15.0.2
- Lucene: 7.4.0
- Clone the repository:
git clone https://github.com/mohsenMahmoodzadeh/lucene-index-searcher.git
- Download java suitable for your machine from here. After installation, you can use the following command to check that java is installed correctly:
java --version
# you should see something like these outputs on your command line interface:
# java 15.0.2 2021-01-19
# Java(TM) SE Runtime Environment (build 15.0.2+7-27)
# Java HotSpot(TM) 64-Bit Server VM (build 15.0.2+7-27, mixed mode, sharing)
Download lucene 7.4.0 from here, unzip it and add these four .jar files to your project:
lucene-core-7.4.0.jar
: Lucene core library(located at lucene-7.4.0/core)lucene-demo-7.4.0.jar
: Simple example code(located at lucene-7.4.0/demo)lucene-queryparser-7.4.0.jar
: Query parsers and parsing framework(located at lucene-7.4.0/queryparser)lucene-analyzers-common-7.4.0.jar
: Analyzers for indexing content in different languages and domains(located at lucene-7.4.0/analysis/common)
Run main()
method of Main.java
, and enter the directories of data and index(the path you want to save).
- Rewrite the project with PyLucene, a Python extension for accessing Java Lucene™.
Fixes and improvements are more than welcome, so raise an issue or send a PR!