scout.php 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. <?php
  2. return [
  3. /*
  4. |--------------------------------------------------------------------------
  5. | Default Search Engine
  6. |--------------------------------------------------------------------------
  7. |
  8. | This option controls the default search connection that gets used while
  9. | using Laravel Scout. This connection is used when syncing all models
  10. | to the search service. You should adjust this based on your needs.
  11. |
  12. | Supported: "algolia", "null"
  13. |
  14. */
  15. 'driver' => env('SCOUT_DRIVER', 'algolia'),
  16. /*
  17. |--------------------------------------------------------------------------
  18. | Index Prefix
  19. |--------------------------------------------------------------------------
  20. |
  21. | Here you may specify a prefix that will be applied to all search index
  22. | names used by Scout. This prefix may be useful if you have multiple
  23. | "tenants" or applications sharing the same search infrastructure.
  24. |
  25. */
  26. 'prefix' => env('SCOUT_PREFIX', ''),
  27. /*
  28. |--------------------------------------------------------------------------
  29. | Queue Data Syncing
  30. |--------------------------------------------------------------------------
  31. |
  32. | This option allows you to control if the operations that sync your data
  33. | with your search engines are queued. When this is set to "true" then
  34. | all automatic data syncing will get queued for better performance.
  35. |
  36. */
  37. 'queue' => [
  38. 'queue' => 'search'
  39. ],
  40. /*
  41. |--------------------------------------------------------------------------
  42. | Chunk Sizes
  43. |--------------------------------------------------------------------------
  44. |
  45. | These options allow you to control the maximum chunk size when you are
  46. | mass importing data into the search engine. This allows you to fine
  47. | tune each of these chunk sizes based on the power of the servers.
  48. |
  49. */
  50. 'chunk' => [
  51. 'searchable' => 500,
  52. 'unsearchable' => 500,
  53. ],
  54. /*
  55. |--------------------------------------------------------------------------
  56. | Soft Deletes
  57. |--------------------------------------------------------------------------
  58. |
  59. | This option allows to control whether to keep soft deleted records in
  60. | the search indexes. Maintaining soft deleted records can be useful
  61. | if your application still needs to search for the records later.
  62. |
  63. */
  64. 'soft_delete' => false,
  65. /*
  66. |--------------------------------------------------------------------------
  67. | Algolia Configuration
  68. |--------------------------------------------------------------------------
  69. |
  70. | Here you may configure your Algolia settings. Algolia is a cloud hosted
  71. | search engine which works great with Scout out of the box. Just plug
  72. | in your application ID and admin API key to get started searching.
  73. |
  74. */
  75. 'algolia' => [
  76. 'id' => env('ALGOLIA_APP_ID', ''),
  77. 'secret' => env('ALGOLIA_SECRET', ''),
  78. ],
  79. /*
  80. |--------------------------------------------------------------------------
  81. | Elasticsearch 配置
  82. |--------------------------------------------------------------------------
  83. |
  84. | 配置 Elasticsearch 的地址端口与密码.以及index
  85. |
  86. */
  87. 'elasticsearch' => [
  88. 'host' => [
  89. 'host' => env('ELASTICSEARCH_HOST', 'localhost'),
  90. //'port' => env('ELASTICSEARCH_PORT', 9200),
  91. //'scheme' => env('ELASTICSEARCH_SCHEME', 'http'),
  92. //'user' => env('ELASTICSEARCH_USER', 'elastic'),
  93. //'pass' => env('ELASTICSEARCH_PASS', 'changeme')
  94. ]
  95. ],
  96. 'elasticsearch_index_prefix' => env('ELASTICSEARCH_INDEX_PREFIX', '')
  97. ];