This project is designed to generate thousands of fake products, store them in a CSV file, and later index them using RediSearch for efficient searching. Additionally, a FastAPI-based API is provided to manually register products in RediSearch and search for products by description.
- The script creates thousands of fake product entries.
- These entries are stored in a CSV file for later indexing.
- The generated products can be indexed in RediSearch for fast retrieval.
- A FastAPI endpoint allows manual addition of products to RediSearch.
- The FastAPI application provides an endpoint to search for products by description.
- RediSearch enables efficient full-text search over the indexed products.
First, navigate to the root directory of the project where the docker-compose.yaml file is located. Then, build and start the container using the following command:
docker-compose up --build
This will build the image and start the API application inside a container.
Once the container is running, the API application will be available at:
http://localhost:8400/docs
source .venv/bin/activate
python -m app.utils.generate_fake_products
python -m app.utils.generate_indexed_products