laravel scout solr
v0.1.3
您可以在此处阅读文档。
如果您有任何问题,疑问或评论,请随时提交问题,我会尽快回复您。
安装Laravel Scout。
通过作曲家安装
$ composer require jeroenherczeg/laravel-scout-solr将您的Scout_driver设置为Solr:
// .env
...
SCOUT_DRIVER=solr
您必须在app.php配置中添加侦察服务提供商和Solr Engine服务提供商:
// config/app.php
'providers' => [
...
/*
* Package Service Providers...
*/
LaravelScoutScoutServiceProvider::class,
ScoutEnginesSolrSolrProvider::class,
],
将Solr配置添加到Scout配置文件:
// 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 ' ),
],现在,您可以按照正式文档中所述使用Laravel Scout
您可以在宅基地虚拟机中安装solr。
将端口转发到您的宅基地。
// ~/Homestead/Homestead.yaml
...
ports:
- send: 18983
to: 8983
...
将以下安装步骤添加到您的Homestead之后。SH脚本。
// ~/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
您需要重新创建虚拟机。
vagrant destroy && vagrant up
安装和运行虚拟机后,您可以在http://127.0.0.1:18983/solr/#/上访问Solr Admin。
有关最近发生了变化的更多信息,请参见ChangElog。
$ composer test 有关详细信息,请参见贡献和code_of_conduct。
如果发现任何与安全有关的问题,请发送电子邮件至[email protected],而不是使用问题跟踪器。
麻省理工学院许可证(麻省理工学院)。请参阅许可证文件以获取更多信息。