This project is an Elasticsearch management system with a FastAPI backend and a Streamlit frontend. It provides a user-friendly interface for managing Elasticsearch indices, documents, and performing various search operations.
- Create and delete Elasticsearch indices
- Insert, update, and delete documents
- Perform text and KNN (K-Nearest Neighbors) searches
- Manage index mappings
- Create and manage embeddings for semantic search
- User-friendly Streamlit interface for easy interaction
- Backend: FastAPI
- Frontend: Streamlit
- Database: Elasticsearch
- Embedding Model: [Specify the model you're using, e.g., Sentence Transformers]
- Python 3.7+
- Elasticsearch 7.x or 8.x
- pip (Python package manager)
- Clone the repository:
git clone
https://github.com/MohammadMdv/Elasticseach.gitcd elasticsearch-management-system - Set up a virtual environment (optional but recommended):
python -m venv venvsource venv/bin/activate # On Windows use venv\Scripts\activate - Install the required packages:
pip install -r requirements.txt - Set up Elasticsearch:
- Ensure Elasticsearch is installed and running on your system
- Update the Elasticsearch connection settings in
app/config.py
-
Start the backend server:
cd backendthenuvicorn app.main:app --reload -
In a new terminal, start the Streamlit frontend:
cd frontendthenstreamlit run app.pyThe Streamlit interface will open in your default web browser.
Once the backend is running, you can access the API documentation at http://localhost:8000/docs
- Use the Streamlit interface to interact with the Elasticsearch management system
- Create indices, add documents, and perform searches through the user-friendly UI
- For advanced usage, interact directly with the FastAPI backend using the API documentation
Contributions are welcome! Please feel free to submit a Pull Request.