This project implements a search engine using Elasticsearch, allowing you to index and search product data. It's built with Python 3.12 and utilizes Flask for the API.
Before you begin, ensure you have the following installed:
- Python 3.12: Make sure you have Python 3.12 installed on your system.
- Elasticsearch: You need a running Elasticsearch instance. You can download and install it from the official Elasticsearch website ([https://www.elastic.co/
downloads/elasticsearch](https://www.elastic.co/downloads/elasticsearch)). * Note: Ensure Elasticsearch is running on the default port (9200) or configure the connection details in the project accordingly. * Docker (Recommended):
- Pip: Python's package installer. It usually comes with Python.
Follow these steps to set up the project:
-
Clone the Repository: git clone github.com/Zeh237/Elasticsearch-Products-Search-Engine.git
-
Create a Virtual Environment (Highly Recommended): python3 -m venv venv
-
Activate the Virtual Environment:
- Linux/macOS: source venv/bin/activate
- Windows: env\Scripts\activate
-
Install Dependencies: pip install -r requirements.txt
-
Environment Variables:
- Create a
.envfile in the root directory of the project. - use the env.example file as a guide for the environment variables needed:
- Create a
-
Database Setup
- Make sure you have a database running, and that you have created the database for the project(mysql database).
- in the root folder of this project, you will see the database sql file called search_db. import it into your database using workbench or any other tool of your choice
-
Run the Application: flask run