คุณสามารถอ่านเอกสารได้ที่นี่
หากคุณมีปัญหาคำถามหรือความคิดเห็น ใด ๆ อย่าลังเลที่จะส่งปัญหาและฉันจะตอบกลับคุณโดยเร็วที่สุด
ติดตั้ง Laravel Scout
ติดตั้งผ่านนักแต่งเพลง
$ composer require jeroenherczeg/laravel-scout-solrตั้งค่า Scout_driver ของคุณเป็น Solr:
// .env
...
SCOUT_DRIVER=solr
คุณต้องเพิ่มผู้ให้บริการลูกเสือและผู้ให้บริการ SOLR Engine ในการกำหนดค่า App.php ของคุณ:
// 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 ของคุณ
// ~/Homestead/Homestead.yaml
...
ports:
- send: 18983
to: 8983
...
เพิ่มขั้นตอนการติดตั้งต่อไปนี้ไปยังที่อยู่อาศัยของคุณหลังจากสคริปต์ 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
เมื่อติดตั้งและทำงานเครื่องเสมือนคุณสามารถเข้าถึง SOLR Admin ได้ที่ http://127.0.0.1:18983/solr/#/
โปรดดู Changelog สำหรับข้อมูลเพิ่มเติมเกี่ยวกับสิ่งที่เปลี่ยนแปลงไปเมื่อเร็ว ๆ นี้
$ composer test โปรดดูรายละเอียดที่มีส่วนร่วมและ code_of_conduct
หากคุณค้นพบปัญหาที่เกี่ยวข้องกับความปลอดภัยโปรดส่งอีเมล [email protected] แทนที่จะใช้ตัวติดตามปัญหา
ใบอนุญาต MIT (MIT) โปรดดูไฟล์ใบอนุญาตสำหรับข้อมูลเพิ่มเติม