The simple search is a command line driven text search engine written in java. This tool read all the text files in the given directory, building an in-memory representation of the files and their contents (inverted index), and then give a command prompt at which interactive searches can be performed.
Tools used:
- OpenJDK 17.0.5
- Apache Maven 3.9.0
- Docker 20.10.20
You can run unit tests with the following command:
mvn test
The code coverage report will be generated in the target/site
repository.
If you want to build the application with maven, run the following command:
mvn clean package
The generated application will be available under the target
folder.
You can run the Cli with the following command:
java -jar target/simple-search.jar [searchPath]
If you want to build the application with Docker, run the following command:
docker build -t simple-search .
And then, execute with:
docker run -it -v [localSearchPath]:/search simple-search .