Laravel5.6/vue/scout/elasticserach6.4/scout-Elasticsearch-driver 搜索 demo
前言
这个小项目主要是为了学习elasticsearch Api,前端非常简单,因为重心不在前端。主要实现功能为主,代码没有过多的优化。给大家提供了简单的数据,后期不定期维护,开发过程中遇到个 小插曲。
功能
简单搜索,嵌套搜索,定位功能,聚合操作。
安装
github地址:https://github.com/yb19890724/laravel-es
composer update
执行命令
- 简单方式
php artisan laraveles
- 按步骤来
php artisan migrate php artisan elastic:create-index App\Es\Index\ProductIndexConfigurator php artisan elastic:create-index App\Es\Index\CategoryIndexConfigurator php artisan elastic:create-index App\Es\Index\ShopIndexConfigurator php artisan migrate php artisan db:seed
- 安装js扩展
npm install npm run dev
修改配置 .env
DB_HOST=
DB_PORT=
DB_DATABASE=
DB_USERNAME=
DB_PASSWORD=
SCOUT_DRIVER=elastic #scout驱动
SCOUT_ELASTIC_HOST=localhost:9200 #es host
界面
访问:yourhost/dashboard
本作品采用《CC 协议》,转载必须注明作者和本文链接
6666 正好要用 es
兄弟能提供下源码嘛?最近也在学ES
@fanfan 忘了放了 额````
@fanfan 已经加上了