https://github.com/bytebuff/dj-poetry-es
django+es搭建的前后端分离,唐诗宋词搜索引擎。
https://github.com/bytebuff/dj-poetry-es
Last synced: about 1 year ago
JSON representation
django+es搭建的前后端分离,唐诗宋词搜索引擎。
- Host: GitHub
- URL: https://github.com/bytebuff/dj-poetry-es
- Owner: bytebuff
- Created: 2020-05-14T03:16:47.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2022-04-22T23:16:06.000Z (about 4 years ago)
- Last Synced: 2024-03-04T22:35:39.786Z (about 2 years ago)
- Language: Python
- Size: 55 MB
- Stars: 34
- Watchers: 3
- Forks: 14
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# django + es 实现唐诗宋词搜索引擎
通过django和elasticsearch实现的对大约311860首唐诗宋词的搜索引擎,主要使用了一下技术以及依赖:
- docker
- elasticsearch
- django
- djangorestframe
- vue
- semantic-ui
## 启动方式
1. 新建虚拟环境(当然也可以不新建)
- python3 -m venv env
- . env/bin/activate
2. 数据库迁移
- python manage.py makemigrations
- python manage.py migrate
3. 数据填充
把古诗数据填充进数据库:
- python manage.py shell
- from poems.models import Poem
- Poem().populate()
4. 创建es索引
- python manage.py search_index --rebuild
5. 启动
- python manage.py runserver
6. 查看
- 在浏览器: 127.0.0.1:8000 查看
7. 截图

