laravel scout solr
v0.1.3
ここでドキュメントを読むことができます。
問題、質問、コメントがある場合は、問題をお気軽に送信してください。できるだけ早く返信します。
Laravel Scoutをインストールします。
Composer経由でインストールします
$ composer require jeroenherczeg/laravel-scout-solrscout_driverをsolrに設定します:
// .env
...
SCOUT_DRIVER=solr
app.php configにスカウトサービスプロバイダーとsolrエンジンサービスプロバイダーを追加する必要があります。
// config/app.php
'providers' => [
...
/*
* Package Service Providers...
*/
LaravelScoutScoutServiceProvider::class,
ScoutEnginesSolrSolrProvider::class,
],
solr構成をスカウト構成ファイルに追加します:
// 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を使用できます
Homestead Virtual MachineにSolrをインストールできます。
homestead.yamlにポート転送を追加します
// ~/Homestead/Homestead.yaml
...
ports:
- send: 18983
to: 8983
...
次のインストール手順をHomestead after.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]にメールしてください。
MITライセンス(MIT)。詳細については、ライセンスファイルをご覧ください。