jeroenherczeg/laravel-scout-solr
Composer 安装命令:
composer require jeroenherczeg/laravel-scout-solr
包简介
Solr Driver for Laravel Scout
README 文档
README
Documentation
You can read the documentation here.
Problems, questions or comments?
If you have any problems, questions or comments, feel free to submit an issue and I will reply to you as soon as possible.
Prerequisites
Install Laravel Scout.
Install
Install via Composer
$ composer require jeroenherczeg/laravel-scout-solr
Set your SCOUT_DRIVER to solr:
// .env
...
SCOUT_DRIVER=solr
You must add the Scout service provider and the Solr engine service provider in your app.php config:
// config/app.php
'providers' => [
...
/*
* Package Service Providers...
*/
Laravel\Scout\ScoutServiceProvider::class,
ScoutEngines\Solr\SolrProvider::class,
],
Add the Solr configuration to the scout config file:
// config/scout.php ... /* |-------------------------------------------------------------------------- | Solr Configuration |-------------------------------------------------------------------------- | | Here you may configure your Solr settings. Solr is the popular, blazing | -fast, open source enterprise search platform built on Apache Lucene. | If necessary, you can override the configuration in your .env file. | */ 'solr' => [ 'host' => env('SOLR_HOST', '127.0.0.1'), 'port' => env('SOLR_PORT', '8983'), 'path' => env('SOLR_PATH', '/solr/'), 'core' => env('SOLR_CORE', 'scout'), ],
Usage
Now you can use Laravel Scout as described in the official documentation
Using Solr with Laravel Homestead
You can install Solr within your Homestead virtual machine.
Add the port forwarding to your Homestead.yaml
// ~/Homestead/Homestead.yaml
...
ports:
- send: 18983
to: 8983
...
Add the following install steps to your Homestead after.sh script.
// ~/Homestead/after.sh
#!/bin/sh
# If you would like to do some extra provisioning you may
# add any commands you wish to this file and they will
# be run after the Homestead machine is provisioned.
#
# If you have user-specific configurations you would like
# to apply, you may also create user-customizations.sh,
# which will be run after this script.
# Install Java Runtime Enviroment
sudo apt-get update
sudo apt-get install default-jre -y
# Install Solr 7.5
wget http://www-eu.apache.org/dist/lucene/solr/7.5.0/solr-7.5.0.tgz
tar zxf solr-7.5.0.tgz
cd solr-7.5.0
bin/solr create -c scout
bin/solr start
You will need to recreate your the virtual machine.
vagrant destroy && vagrant up
Once the virtual machine is installed and running, you can access Solr admin on http://127.0.0.1:18983/solr/#/ .
Change log
Please see CHANGELOG for more information on what has changed recently.
Testing
$ composer test
Contributing
Please see CONTRIBUTING and CODE_OF_CONDUCT for details.
Security
If you discover any security related issues, please email jeroen@herczeg.be instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.
jeroenherczeg/laravel-scout-solr 适用场景与选型建议
jeroenherczeg/laravel-scout-solr 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 1k 次下载、GitHub Stars 达 12, 最近一次更新时间为 2018 年 10 月 06 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「solr」 「laravel」 「scout」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 jeroenherczeg/laravel-scout-solr 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 jeroenherczeg/laravel-scout-solr 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 jeroenherczeg/laravel-scout-solr 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
A bundle which extend ibexa solr search handler
This extension provides integration with solr to output content from TYPO3 in JSON format.
Laminas Module for interaction between a laminas application and a SOLR search engine using Solarium
Elastic Driver for Laravel Scout
An Apache Solr driver for laravel scout
Scout support for MoonShine
统计信息
- 总下载量: 1k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 12
- 点击次数: 3
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2018-10-06