From fa05bc8f0a2fdcbccc901ae6ebccedc55c4e8bff Mon Sep 17 00:00:00 2001 From: jitendra Date: Mon, 6 Jul 2020 13:22:46 +0530 Subject: [PATCH] Issue #3425 fixed --- config/elastic.scout_driver.php | 5 + packages/Webkul/Core/src/Config/scout.php | 91 +++++++++++++++++++ .../src/Providers/CoreServiceProvider.php | 1 + 3 files changed, 97 insertions(+) create mode 100644 config/elastic.scout_driver.php create mode 100644 packages/Webkul/Core/src/Config/scout.php diff --git a/config/elastic.scout_driver.php b/config/elastic.scout_driver.php new file mode 100644 index 000000000..b28fe35a3 --- /dev/null +++ b/config/elastic.scout_driver.php @@ -0,0 +1,5 @@ + env('ELASTIC_SCOUT_DRIVER_REFRESH_DOCUMENTS', false) +]; diff --git a/packages/Webkul/Core/src/Config/scout.php b/packages/Webkul/Core/src/Config/scout.php new file mode 100644 index 000000000..b2f0f4d22 --- /dev/null +++ b/packages/Webkul/Core/src/Config/scout.php @@ -0,0 +1,91 @@ + env('SCOUT_DRIVER', null), + + /* + |-------------------------------------------------------------------------- + | 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', true), + + /* + |-------------------------------------------------------------------------- + | 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, + + /* + |-------------------------------------------------------------------------- + | 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', ''), + ], + +]; diff --git a/packages/Webkul/Core/src/Providers/CoreServiceProvider.php b/packages/Webkul/Core/src/Providers/CoreServiceProvider.php index cc6fe420b..d64dfdca2 100755 --- a/packages/Webkul/Core/src/Providers/CoreServiceProvider.php +++ b/packages/Webkul/Core/src/Providers/CoreServiceProvider.php @@ -43,6 +43,7 @@ class CoreServiceProvider extends ServiceProvider $this->publishes([ dirname(__DIR__) . '/Config/concord.php' => config_path('concord.php'), + dirname(__DIR__) . '/Config/scout.php' => config_path('scout.php'), ]); $this->app->bind(