make translatable
[civicrm-core.git] / settings / Search.setting.php
CommitLineData
6a488035
TO
1<?php
2/*
3 +--------------------------------------------------------------------+
6b7eb9df 4 | Copyright CiviCRM LLC. All rights reserved. |
6a488035 5 | |
6b7eb9df
TO
6 | This work is published under the GNU AGPLv3 license with some |
7 | permitted exceptions and without any warranty. For full license |
8 | and copyright information, see https://civicrm.org/licensing |
6a488035 9 +--------------------------------------------------------------------+
d25dd0ee 10 */
6a488035
TO
11
12/**
13 *
14 * @package CRM
ca5cec67 15 * @copyright CiviCRM LLC https://civicrm.org/licensing
6a488035
TO
16 * $Id$
17 *
18 */
19/*
20 * Settings metadata file
21 */
dfe1f88a
CW
22return [
23 'search_autocomplete_count' => [
6a488035
TO
24 'group_name' => 'Search Preferences',
25 'group' => 'Search Preferences',
26 'name' => 'search_autocomplete_count',
6a488035
TO
27 'type' => 'Integer',
28 'quick_form_type' => 'Element',
bfd9c358 29 'html_type' => 'number',
6a488035
TO
30 'default' => 10,
31 'add' => '4.3',
32 'title' => 'Autocomplete Results',
33 'is_domain' => 1,
34 'is_contact' => 0,
35 'description' => 'The maximum number of contacts to show at a time when typing in an autocomplete field.',
08e57c58 36 'help_text' => NULL,
dfe1f88a
CW
37 ],
38 'enable_innodb_fts' => [
56c2750b
TO
39 'group_name' => 'Search Preferences',
40 'group' => 'Search Preferences',
41 'name' => 'enable_innodb_fts',
56c2750b
TO
42 'type' => 'Boolean',
43 'quick_form_type' => 'YesNo',
44 'default' => 0,
45 'add' => '4.4',
46 'title' => 'InnoDB Full Text Search',
47 'is_domain' => 1,
48 'is_contact' => 0,
49 'description' => "Enable InnoDB full-text search optimizations. (Requires MySQL 5.6+)",
08e57c58 50 'help_text' => NULL,
dfe1f88a
CW
51 'on_change' => [
52 ['CRM_Core_InnoDBIndexer', 'onToggleFts'],
53 ],
54 ],
55 'fts_query_mode' => [
7d1b110a
TO
56 'group_name' => 'Search Preferences',
57 'group' => 'Search Preferences',
58 'name' => 'fts_query_mode',
7d1b110a
TO
59 'type' => 'String',
60 'quick_form_type' => 'Element',
dfe1f88a 61 'html_attributes' => [
7d1b110a
TO
62 'size' => 64,
63 'maxlength' => 64,
dfe1f88a 64 ],
c1a2145a 65 'html_type' => 'text',
7d1b110a
TO
66 'default' => 'simple',
67 'add' => '4.5',
68 'title' => 'How to handle full-tet queries',
69 'is_domain' => 1,
70 'is_contact' => 0,
08e57c58
TO
71 'description' => NULL,
72 'help_text' => NULL,
dfe1f88a
CW
73 ],
74 'includeOrderByClause' => [
08f4ab8d 75 'group_name' => 'Search Preferences',
76 'group' => 'Search Preferences',
77 'name' => 'includeOrderByClause',
08f4ab8d 78 'type' => 'Boolean',
79 'quick_form_type' => 'YesNo',
80 'default' => 1,
81 'add' => '4.6',
82 'title' => 'Include Order By Clause',
83 'is_domain' => 1,
84 'is_contact' => 0,
85 'description' => 'If disabled, the search results will not be ordered. This may improve response time on search results on large datasets',
86 'help_text' => NULL,
dfe1f88a
CW
87 ],
88 'includeWildCardInName' => [
c3bc1eaf 89 'group_name' => 'Search Preferences',
90 'group' => 'Search Preferences',
91 'name' => 'includeWildCardInName',
c3bc1eaf 92 'type' => 'Boolean',
93 'quick_form_type' => 'YesNo',
94 'default' => 1,
95 'add' => '4.6',
96 'title' => 'Automatic Wildcard',
97 'is_domain' => 1,
98 'is_contact' => 0,
99 'description' => "If enabled, wildcards are automatically added to the beginning AND end of the search term when users search for contacts by Name. EXAMPLE: Searching for 'ada' will return any contact whose name includes those letters - e.g. 'Adams, Janet', 'Nadal, Jorge', etc. If disabled, a wildcard is added to the end of the search term only. EXAMPLE: Searching for 'ada' will return any contact whose last name begins with those letters - e.g. 'Adams, Janet' but NOT 'Nadal, Jorge'. Disabling this feature will speed up search significantly for larger databases, but users must manually enter wildcards ('%' or '_') to the beginning of the search term if they want to find all records which contain those letters. EXAMPLE: '%ada' will return 'Nadal, Jorge'.",
100 'help_text' => NULL,
dfe1f88a
CW
101 ],
102 'includeEmailInName' => [
c3bc1eaf 103 'group_name' => 'Search Preferences',
104 'group' => 'Search Preferences',
105 'name' => 'includeEmailInName',
c3bc1eaf 106 'type' => 'Boolean',
107 'quick_form_type' => 'YesNo',
108 'default' => 1,
109 'add' => '4.6',
110 'title' => 'Include Email',
111 'is_domain' => 1,
112 'is_contact' => 0,
113 'description' => 'If enabled, email addresses are automatically included when users search by Name. Disabling this feature will speed up search significantly for larger databases, but users will need to use the Email search fields (from Advanced Search, Search Builder, or Profiles) to find contacts by email address.',
114 'help_text' => NULL,
dfe1f88a
CW
115 ],
116 'includeNickNameInName' => [
c3bc1eaf 117 'group_name' => 'Search Preferences',
118 'group' => 'Search Preferences',
119 'name' => 'includeNickNameInName',
c3bc1eaf 120 'type' => 'Boolean',
121 'quick_form_type' => 'YesNo',
dc378d98 122 'default' => 0,
c3bc1eaf 123 'add' => '4.6',
124 'title' => 'Include Nickname',
125 'is_domain' => 1,
126 'is_contact' => 0,
127 'description' => 'If enabled, nicknames are automatically included when users search by Name.',
128 'help_text' => NULL,
dfe1f88a
CW
129 ],
130 'includeAlphabeticalPager' => [
c3bc1eaf 131 'group_name' => 'Search Preferences',
132 'group' => 'Search Preferences',
133 'name' => 'includeAlphabeticalPager',
c3bc1eaf 134 'type' => 'Boolean',
135 'quick_form_type' => 'YesNo',
136 'default' => 1,
137 'add' => '4.6',
138 'title' => 'Include Alphabetical Pager',
139 'is_domain' => 1,
140 'is_contact' => 0,
141 'description' => 'If disabled, the alphabetical pager will not be displayed on the search screens. This will improve response time on search results on large datasets.',
142 'help_text' => NULL,
dfe1f88a
CW
143 ],
144 'smartGroupCacheTimeout' => [
c3bc1eaf 145 'group_name' => 'Search Preferences',
146 'group' => 'Search Preferences',
147 'name' => 'smartGroupCacheTimeout',
c3bc1eaf 148 'type' => 'Integer',
dc378d98 149 'quick_form_type' => 'Element',
bfd9c358 150 'html_type' => 'number',
dc378d98 151 'default' => 5,
c3bc1eaf 152 'add' => '4.6',
153 'title' => 'Smart group cache timeout',
154 'is_domain' => 1,
155 'is_contact' => 0,
156 'description' => 'The number of minutes to cache smart group contacts. We strongly recommend that this value be greater than zero, since a value of zero means no caching at all. If your contact data changes frequently, you should set this value to at least 5 minutes.',
157 'help_text' => NULL,
dfe1f88a
CW
158 ],
159 'defaultSearchProfileID' => [
c3bc1eaf 160 'group_name' => 'Search Preferences',
161 'group' => 'Search Preferences',
162 'name' => 'defaultSearchProfileID',
c3bc1eaf 163 'type' => 'Integer',
dc378d98
TO
164 'quick_form_type' => 'Select',
165 'html_type' => 'Select',
dfe1f88a 166 'html_attributes' => [
dc378d98 167 'class' => 'crm-select2',
dfe1f88a
CW
168 ],
169 'pseudoconstant' => [
dc378d98 170 'callback' => 'CRM_Admin_Form_Setting_Search::getAvailableProfiles',
dfe1f88a 171 ],
dc378d98 172 'default' => NULL,
c3bc1eaf 173 'add' => '4.6',
174 'title' => 'Default Contact Search Profile',
175 'is_domain' => 1,
176 'is_contact' => 0,
177 'description' => 'If set, this will be the default profile used for contact search.',
178 'help_text' => NULL,
dfe1f88a
CW
179 ],
180 'prevNextBackend' => [
e28bf654
TO
181 'group_name' => 'Search Preferences',
182 'group' => 'Search Preferences',
183 'name' => 'prevNextBackend',
184 'type' => 'String',
185 'quick_form_type' => 'Select',
186 'html_type' => 'Select',
dfe1f88a 187 'html_attributes' => [
e28bf654 188 //'class' => 'crm-select2',
dfe1f88a 189 ],
e28bf654 190 'default' => 'default',
4d8899e3 191 'add' => '5.9',
e28bf654
TO
192 'title' => 'PrevNext Cache',
193 'is_domain' => 1,
194 'is_contact' => 0,
dfe1f88a 195 'pseudoconstant' => [
e28bf654 196 'callback' => 'CRM_Core_BAO_PrevNextCache::getPrevNextBackends',
dfe1f88a 197 ],
e28bf654
TO
198 'description' => 'When performing a search, how should the search-results be cached?',
199 'help_text' => '',
dfe1f88a
CW
200 ],
201 'searchPrimaryDetailsOnly' => [
b3e1c09d 202 'group_name' => 'Search Preferences',
203 'group' => 'Search Preferences',
a3fccfc7 204 'name' => 'searchPrimaryDetailsOnly',
b3e1c09d 205 'type' => 'Boolean',
206 'quick_form_type' => 'YesNo',
207 'default' => 1,
208 'add' => '4.7',
0e4873ff 209 'title' => 'Search Primary Details Only',
b3e1c09d 210 'is_domain' => 1,
211 'is_contact' => 0,
0e4873ff 212 'description' => 'If enabled, only primary details (eg contact\'s primary email, phone, etc) will be included in Basic and Advanced Search results. Disabling this feature will allow users to match contacts using any email, phone etc detail.',
b3e1c09d 213 'help_text' => NULL,
dfe1f88a
CW
214 ],
215 'quicksearch_options' => [
4235341b
CW
216 'group_name' => 'Search Preferences',
217 'group' => 'Search Preferences',
218 'name' => 'quicksearch_options',
219 'type' => 'string',
220 'serialize' => CRM_Core_DAO::SERIALIZE_SEPARATOR_BOOKEND,
4235341b 221 'html_type' => 'checkboxes',
4e086328 222 'sortable' => TRUE,
dfe1f88a 223 'pseudoconstant' => [
4235341b 224 'callback' => 'CRM_Core_SelectValues::quicksearchOptions',
dfe1f88a
CW
225 ],
226 'default' => ['sort_name', 'contact_id', 'external_identifier', 'first_name', 'last_name', 'email', 'phone_numeric', 'street_address', 'city', 'postal_code', 'job_title'],
4235341b
CW
227 'add' => '5.8',
228 'title' => ts('Quicksearch options'),
229 'is_domain' => '1',
230 'is_contact' => 0,
231 'description' => ts("Which fields can be searched on in the menubar quicksearch box? Don't see your custom field here? Make sure it is marked as Searchable."),
232 'help_text' => NULL,
dfe1f88a
CW
233 ],
234];