This project is a Python application that implements gRPC-based similarity search
functionality. It consists of both client and server components for adding items to a search
index, searching for similar items, and retrieving search results.
● Add Items:You can add items to the search index by making gRPC requests to the server.
Each item consists of an item_id and a description.
● Search Items: The server allows you to search for items similar to a given query.
The search query consists of a description.
● AGet Search Results: You can retrieve the search results from the server.
python3 -m venv venv
For Windows
.\venv\Scripts\activate
For MacOS
source venv/bin/activate
pip install -r requirements.txt
CREATE TABLE items (
id SERIAL PRIMARY KEY,
item_id VARCHAR(255) NOT NULL,
description TEXT NOT NULL
);
DB_NAME=<your_database_name>
DB_USER=<your_database_user>
DB_PASSWORD=<your_database_password>
DB_HOST=<your_database_host>
DB_PORT=<your_database_port>
python -m grpc_tools.protoc -I. --python_out=. --grpc_python_out=. similarity_search.proto
python server.py
python client.py
python -m unittest tests/test_server.py