-
-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #53 from WillTheDeveloper/scout-search
Scout search
- Loading branch information
Showing
10 changed files
with
456 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,137 @@ | ||
<?php | ||
|
||
return [ | ||
|
||
/* | ||
|-------------------------------------------------------------------------- | ||
| Default Search Engine | ||
|-------------------------------------------------------------------------- | ||
| | ||
| This option controls the default search connection that gets used while | ||
| using Laravel Scout. This connection is used when syncing all models | ||
| to the search service. You should adjust this based on your needs. | ||
| | ||
| Supported: "algolia", "meilisearch", "database", "collection", "null" | ||
| | ||
*/ | ||
|
||
'driver' => env('SCOUT_DRIVER', 'algolia'), | ||
|
||
/* | ||
|-------------------------------------------------------------------------- | ||
| Index Prefix | ||
|-------------------------------------------------------------------------- | ||
| | ||
| Here you may specify a prefix that will be applied to all search index | ||
| names used by Scout. This prefix may be useful if you have multiple | ||
| "tenants" or applications sharing the same search infrastructure. | ||
| | ||
*/ | ||
|
||
'prefix' => env('SCOUT_PREFIX', ''), | ||
|
||
/* | ||
|-------------------------------------------------------------------------- | ||
| Queue Data Syncing | ||
|-------------------------------------------------------------------------- | ||
| | ||
| This option allows you to control if the operations that sync your data | ||
| with your search engines are queued. When this is set to "true" then | ||
| all automatic data syncing will get queued for better performance. | ||
| | ||
*/ | ||
|
||
'queue' => env('SCOUT_QUEUE', false), | ||
|
||
/* | ||
|-------------------------------------------------------------------------- | ||
| Database Transactions | ||
|-------------------------------------------------------------------------- | ||
| | ||
| This configuration option determines if your data will only be synced | ||
| with your search indexes after every open database transaction has | ||
| been committed, thus preventing any discarded data from syncing. | ||
| | ||
*/ | ||
|
||
'after_commit' => false, | ||
|
||
/* | ||
|-------------------------------------------------------------------------- | ||
| Chunk Sizes | ||
|-------------------------------------------------------------------------- | ||
| | ||
| These options allow you to control the maximum chunk size when you are | ||
| mass importing data into the search engine. This allows you to fine | ||
| tune each of these chunk sizes based on the power of the servers. | ||
| | ||
*/ | ||
|
||
'chunk' => [ | ||
'searchable' => 500, | ||
'unsearchable' => 500, | ||
], | ||
|
||
/* | ||
|-------------------------------------------------------------------------- | ||
| Soft Deletes | ||
|-------------------------------------------------------------------------- | ||
| | ||
| This option allows to control whether to keep soft deleted records in | ||
| the search indexes. Maintaining soft deleted records can be useful | ||
| if your application still needs to search for the records later. | ||
| | ||
*/ | ||
|
||
'soft_delete' => false, | ||
|
||
/* | ||
|-------------------------------------------------------------------------- | ||
| Identify User | ||
|-------------------------------------------------------------------------- | ||
| | ||
| This option allows you to control whether to notify the search engine | ||
| of the user performing the search. This is sometimes useful if the | ||
| engine supports any analytics based on this application's users. | ||
| | ||
| Supported engines: "algolia" | ||
| | ||
*/ | ||
|
||
'identify' => env('SCOUT_IDENTIFY', false), | ||
|
||
/* | ||
|-------------------------------------------------------------------------- | ||
| Algolia Configuration | ||
|-------------------------------------------------------------------------- | ||
| | ||
| Here you may configure your Algolia settings. Algolia is a cloud hosted | ||
| search engine which works great with Scout out of the box. Just plug | ||
| in your application ID and admin API key to get started searching. | ||
| | ||
*/ | ||
|
||
'algolia' => [ | ||
'id' => env('ALGOLIA_APP_ID', ''), | ||
'secret' => env('ALGOLIA_SECRET', ''), | ||
], | ||
|
||
/* | ||
|-------------------------------------------------------------------------- | ||
| MeiliSearch Configuration | ||
|-------------------------------------------------------------------------- | ||
| | ||
| Here you may configure your MeiliSearch settings. MeiliSearch is an open | ||
| source search engine with minimal configuration. Below, you can state | ||
| the host and key information for your own MeiliSearch installation. | ||
| | ||
| See: https://docs.meilisearch.com/guides/advanced_guides/configuration.html | ||
| | ||
*/ | ||
|
||
'meilisearch' => [ | ||
'host' => env('MEILISEARCH_HOST', 'http://localhost:7700'), | ||
'key' => env('MEILISEARCH_KEY', null), | ||
], | ||
|
||
]; |
36 changes: 36 additions & 0 deletions
36
database/migrations/2022_03_15_183358_create_jobs_table.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<?php | ||
|
||
use Illuminate\Database\Migrations\Migration; | ||
use Illuminate\Database\Schema\Blueprint; | ||
use Illuminate\Support\Facades\Schema; | ||
|
||
return new class extends Migration | ||
{ | ||
/** | ||
* Run the migrations. | ||
* | ||
* @return void | ||
*/ | ||
public function up() | ||
{ | ||
Schema::create('jobs', function (Blueprint $table) { | ||
$table->bigIncrements('id'); | ||
$table->string('queue')->index(); | ||
$table->longText('payload'); | ||
$table->unsignedTinyInteger('attempts'); | ||
$table->unsignedInteger('reserved_at')->nullable(); | ||
$table->unsignedInteger('available_at'); | ||
$table->unsignedInteger('created_at'); | ||
}); | ||
} | ||
|
||
/** | ||
* Reverse the migrations. | ||
* | ||
* @return void | ||
*/ | ||
public function down() | ||
{ | ||
Schema::dropIfExists('jobs'); | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.