This is a simple text search engine built in Go. It loads documents, indexes them, and allows you to perform keyword searches.
- Load documents from a specified data dump file.
- Index and search for keywords within the documents.
- Go (version 1.15 or later)
-
Clone the repository:
git clone https://github.com/likhithkp/go-text-search-engine cd go-text-search-engine
-
Install the required Go packages:
go mod tidy
-
Prepare your data dump file (e.g.,
enwiki-latest-abstract1.xml.gz
). Make sure it’s in the project directory or specify its path in the command.
Run the search engine with the following command:
go run main.go -p <path_to_data_dump> -q <search_query>
Example:
go run main.go -p enwiki-latest-abstract1.xml.gz -q "Small wild cat"
The application logs the number of documents loaded, indexed, and how many matches were found during the search.
Feel free to contribute by opening issues or submitting pull requests!
This project is licensed under the MIT License.