forked from studioespresso/craft-scout
-
Notifications
You must be signed in to change notification settings - Fork 0
/
scout.php
86 lines (75 loc) · 2.99 KB
/
scout.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
<?php
/*
* Config scout.php
*
* This file exists only as a template for the Scout settings.
* It does nothing on its own.
*
* Don't edit this file, instead copy it to 'craft/config' as 'scout.php'
* and make your changes there to override default settings.
*
* Once copied to 'craft/config', this file will be multi-environment aware as
* well, so you can have different settings groups for each environment, just as
* you do for 'general.php'
*/
return [
/*
* Scout listens to numerous Element events to keep them updated in
* their respective indices. You can disable these and update
* your indices manually using the commands.
*/
'sync' => true,
/*
* By default Scout handles all indexing in a queued job, you can disable
* this so the indices are updated as soon as the elements are updated
*/
'queue' => true,
/*
* If queue is enabled, you can override the default time-to-reserve a job.
* https://www.yiiframework.com/extension/yiisoft/yii2-queue/doc/api/2.0/yii-queue-queue#$ttr-detail
*/
'ttr' => 300,
/*
* If queue is enabled, you can override the default priority for a job.
* https://www.yiiframework.com/extension/yiisoft/yii2-queue/doc/api/2.0/yii-queue-queue#priority()-detail
*/
'priority' => 1024,
/*
* The connection timeout (in seconds), increase this only if necessary
*/
'connect_timeout' => 1,
/*
* The batch size Scout uses when importing a large amount of elements
*/
'batch_size' => 1000,
/*
* The Algolia Application ID, this id can be found in your Algolia Account
* https://www.algolia.com/api-keys. This id is used to update records.
*/
'application_id' => '$ALGOLIA_APPLICATION_ID',
/*
* The Algolia Admin API key, this key can be found in your Algolia Account
* https://www.algolia.com/api-keys. This key is used to update records.
*/
'admin_api_key' => '$ALGOLIA_ADMIN_API_KEY',
/*
* The Algolia search API key, this key can be found in your Algolia Account
* https://www.algolia.com/api-keys. This search key is not used in Scout
* but can be used through the Scout variable in your template files.
*/
'search_api_key' => '$ALGOLIA_SEARCH_API_KEY', //optional
/*
* A collection of indices that Scout should sync to, these can be configured
* by using the \rias\scout\ScoutIndex::create('IndexName') command. Each
* index should define an ElementType, criteria and a transformer.
*/
'indices' => [],
/**
* Elements can create multiple records by using `splitElementsOn()`,
* which split the element on specified array values. If the array has just one item,
* no splitting occurs. The legacy and default behavior is to simply use the
* original, unchanged record, which means the value is still wrapped in an array.
* Make this false to use the single item itself.
*/
'useOriginalRecordIfSplitValueIsArrayOfOne' => true,
];