Skip to content

Search Engine is a project that implements a basic search engine using C++, Python, and Cython. It builds a reverse index and ranks pages with the PageRank algorithm based on keyword relevance and page importance.

License

Notifications You must be signed in to change notification settings

pedrobiqua/Search_Engine

Repository files navigation

Search Engine

Contributor Covenant CMake Build and Test


Search Engine is a simple, efficient engine that builds a reverse index for keyword searching and ranks results using the PageRank algorithm.

📋 Requirements

Before compiling the project, ensure your environment meets the following requirements:

  • CMake 3.10 or higher
  • Google Test for unit testing
  • A C++11 compatible compiler or higher

📂 Project Structure

The project is organized as follows:

  • src/: Main implementation of the search engine, including reverse indexing and the PageRank algorithm.
  • tests/: Unit tests to verify the functionality of the system.
  • CMakeLists.txt: Configuration file for building the project with CMake.

🔧 Building the Project

To compile the project, follow these steps:

  1. Create a build directory and navigate into it:

    mkdir build && cd build
  2. Run CMake to generate the build files:

    cmake ..
  3. Compile the project using make:

    make

🧪 Running Tests

Run unit tests to ensure the correctness of the system.

  1. After building the project, navigate to the build directory and execute:

    ./tests/unit-tests/LibUnitTests

This will run the tests covering search engine functionality, reverse indexing, and the PageRank algorithm.


🚀 Running Examples

The first step is building the project, for this to run:

poetry install
poetry build

After building it, run this command to see the library working:

poetry run python Examples/graph_example.py

⚙️ How It Works

  • Reverse Indexing: Maps keywords to the documents where they appear.
  • PageRank: An algorithm that assigns a relevance score to each document based on its links and structure.
  • Querying: Searches for documents related to a keyword and ranks them according to their PageRank score.

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.


Keep learning,
Pedro;)

About

Search Engine is a project that implements a basic search engine using C++, Python, and Cython. It builds a reverse index and ranks pages with the PageRank algorithm based on keyword relevance and page importance.

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks