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],而不是使用問題跟踪器。
麻省理工學院許可證(麻省理工學院)。請參閱許可證文件以獲取更多信息。