From c0cbb11b3e00486f2993d44945dee683cb1a65d0 Mon Sep 17 00:00:00 2001 From: Alex Wellnitz Date: Tue, 13 Feb 2024 00:50:19 +0100 Subject: [PATCH] docs: update README.md with project details --- README.md | 34 +++++++++++++++++++++++++++++++--- 1 file changed, 31 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 6749375..f09b29e 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,36 @@ [![Rust](https://github.com/alexohneander/rustysearch/actions/workflows/rust.yml/badge.svg)](https://github.com/alexohneander/rustysearch/actions/workflows/rust.yml) [![codecov](https://codecov.io/gh/alexohneander/rustysearch/graph/badge.svg?token=IE0019X6NK)](https://codecov.io/gh/alexohneander/rustysearch) -# rustysearch -This is my attempt to implement a search index in Rust -### Installation +# RustySearch + +This project is a simple implementation of a search engine in Rust. It uses the BM25 algorithm for ranking documents. + +### Features + +- Indexing documents: The search engine maintains an index of documents, where each document is associated with a unique identifier. +- Searching: Given a query, the search engine returns the most relevant documents. ### Usage + +#### Creating a new instance of SearchEngine + +You can create a new instance of the SearchEngine with the new function. It takes two parameters: + +- `k1`: The k1 parameter of the BM25 algorithm. +- `b`: The b parameter of the BM25 algorithm. + +### Project Structure + +The main components of the project are: + +- `SearchEngine`: This is the main class that provides the functionality of the search engine. +- `index`: A HashMap that stores the index of the documents. +- `documents`: A HashMap that stores the documents with their unique identifiers. + +### Contributing + +Contributions are welcome. Please submit a pull request. + +### License + +This project is licensed under the MIT License. \ No newline at end of file