PluginProbe
ElasticPress / 4.7.2
ElasticPress v4.7.2
5.3.5 5.3.4 3.6.5 3.6.6 4.0.0 4.0.1 4.1.0 4.2.0 4.2.1 4.2.2 4.3.0 4.3.1 4.4.0 4.4.1 4.5.0 4.5.1 4.5.2 4.6.0 4.6.1 4.7.0 4.7.1 4.7.2 5.0.0 5.0.1 5.0.2 All 108 releases
elasticpress / includes / mappings / user / initial.php

initial.php in ElasticPress 4.7.2, at includes/mappings/user/initial.php

263 lines 6.8 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Elasticsearch mapping for users
4 *
5 * @since 3.0
6 * @package elasticpress
7 */
8
9 if ( ! defined( 'ABSPATH' ) ) {
10 exit; // Exit if accessed directly.
11 }
12
13 return array(
14 'settings' => array(
15 /**
16 * Filter number of Elasticsearch shards to use in indices
17 *
18 * @hook ep_default_index_number_of_shards
19 * @param {int} $shards Number of shards
20 * @return {int} New number
21 */
22 'index.number_of_shards' => apply_filters( 'ep_default_index_number_of_shards', 5 ),
23 /**
24 * Filter number of Elasticsearch replicas to use in indices
25 *
26 * @hook ep_default_index_number_of_replicas
27 * @param {int} $replicas Number of replicas
28 * @return {int} New number
29 */
30 'index.number_of_replicas' => apply_filters( 'ep_default_index_number_of_replicas', 1 ),
31 /**
32 * Filter Elasticsearch total field limit for users
33 *
34 * @hook ep_user_total_field_limit
35 * @param {int} $number Number of fields
36 * @return {int} New number
37 */
38 'index.mapping.total_fields.limit' => apply_filters( 'ep_user_total_field_limit', 5000 ),
39 /**
40 * Filter Elasticsearch max result window for users
41 *
42 * @hook ep_user_max_result_window
43 * @param {int} $number Size of result window
44 * @return {int} New number
45 */
46 'index.max_result_window' => apply_filters( 'ep_user_max_result_window', 1000000 ),
47 'analysis' => array(
48 'analyzer' => array(
49 'default' => array(
50 'tokenizer' => 'standard',
51 'filter' => array( 'standard', 'ewp_word_delimiter', 'lowercase', 'ep_stop', 'ewp_snowball' ),
52 /* This filter is documented in includes/mappings/post/7-0.php */
53 'language' => apply_filters( 'ep_analyzer_language', 'english', 'analyzer_default' ),
54 ),
55 'shingle_analyzer' => array(
56 'type' => 'custom',
57 'tokenizer' => 'standard',
58 'filter' => array( 'lowercase', 'shingle_filter' ),
59 ),
60 'ewp_lowercase' => array(
61 'type' => 'custom',
62 'tokenizer' => 'keyword',
63 'filter' => array( 'lowercase' ),
64 ),
65 ),
66 'filter' => array(
67 'shingle_filter' => array(
68 'type' => 'shingle',
69 'min_shingle_size' => 2,
70 'max_shingle_size' => 5,
71 ),
72 'ewp_word_delimiter' => array(
73 'type' => 'word_delimiter',
74 'preserve_original' => true,
75 ),
76 'ewp_snowball' => array(
77 'type' => 'snowball',
78 /* This filter is documented in includes/mappings/post/7-0.php */
79 'language' => apply_filters( 'ep_analyzer_language', 'english', 'filter_ewp_snowball' ),
80 ),
81 'edge_ngram' => array(
82 'side' => 'front',
83 'max_gram' => 10,
84 'min_gram' => 3,
85 'type' => 'edgeNGram',
86 ),
87 'ep_stop' => [
88 'type' => 'stop',
89 'ignore_case' => true,
90 /* This filter is documented in includes/mappings/post/7-0.php */
91 'stopwords' => apply_filters( 'ep_analyzer_language', 'english', 'filter_ep_stop' ),
92 ],
93 ),
94 'normalizer' => array(
95 'lowerasciinormalizer' => array(
96 'type' => 'custom',
97 'filter' => array( 'lowercase', 'asciifolding' ),
98 ),
99 ),
100 ),
101 ),
102 'mappings' => array(
103 'user' => array(
104 'date_detection' => false,
105 'dynamic_templates' => array(
106 array(
107 'template_meta_types' => array(
108 'path_match' => 'meta.*',
109 'mapping' => array(
110 'type' => 'object',
111 'path' => 'full',
112 'properties' => array(
113 'value' => array(
114 'type' => 'text',
115 'fields' => array(
116 'sortable' => array(
117 'type' => 'keyword',
118 'ignore_above' => 10922,
119 'normalizer' => 'lowerasciinormalizer',
120 ),
121 'raw' => array(
122 'type' => 'keyword',
123 'ignore_above' => 10922,
124 ),
125 ),
126 ),
127 'raw' => array( /* Left for backwards compat */
128 'type' => 'keyword',
129 'ignore_above' => 10922,
130 ),
131 'long' => array(
132 'type' => 'long',
133 ),
134 'double' => array(
135 'type' => 'double',
136 ),
137 'boolean' => array(
138 'type' => 'boolean',
139 ),
140 'date' => array(
141 'type' => 'date',
142 'format' => 'yyyy-MM-dd',
143 ),
144 'datetime' => array(
145 'type' => 'date',
146 'format' => 'yyyy-MM-dd HH:mm:ss',
147 ),
148 'time' => array(
149 'type' => 'date',
150 'format' => 'HH:mm:ss',
151 ),
152 ),
153 ),
154 ),
155 ),
156 array(
157 'template_capabilities' => array(
158 'path_match' => 'capabilities.*',
159 'mapping' => array(
160 'type' => 'object',
161 'path' => 'full',
162 'properties' => array(
163 'roles' => array(
164 'type' => 'keyword',
165 ),
166 ),
167 ),
168 ),
169 ),
170 ),
171 '_all' => array(
172 'analyzer' => 'simple',
173 ),
174 'properties' => array(
175 'ID' => array(
176 'type' => 'long',
177 ),
178 'user_registered' => array(
179 'type' => 'date',
180 'format' => 'YYYY-MM-dd HH:mm:ss',
181 ),
182 'user_nicename' => array(
183 'type' => 'text',
184 'fields' => array(
185 'user_nicename' => array(
186 'type' => 'text',
187 ),
188 'raw' => array(
189 'type' => 'keyword',
190 'ignore_above' => 10922,
191 ),
192 ),
193 ),
194 'user_login' => array(
195 'type' => 'text',
196 'fields' => array(
197 'user_login' => array(
198 'type' => 'text',
199 ),
200 'raw' => array(
201 'type' => 'keyword',
202 'ignore_above' => 10922,
203 ),
204 ),
205 ),
206 'display_name' => array(
207 'type' => 'text',
208 'fields' => array(
209 'raw' => array(
210 'type' => 'keyword',
211 'ignore_above' => 10922,
212 ),
213 'sortable' => array(
214 'type' => 'keyword',
215 'ignore_above' => 10922,
216 'normalizer' => 'lowerasciinormalizer',
217 ),
218 ),
219 ),
220 'user_email' => array(
221 'type' => 'text',
222 'fields' => array(
223 'user_email' => array(
224 'type' => 'text',
225 ),
226 'raw' => array(
227 'type' => 'keyword',
228 'ignore_above' => 10922,
229 ),
230 ),
231 ),
232 'capabilities' => array(
233 'type' => 'object',
234 ),
235 'user_url' => array(
236 'type' => 'text',
237 'fields' => array(
238 'user_url' => array(
239 'type' => 'text',
240 ),
241 'raw' => array(
242 'type' => 'keyword',
243 'ignore_above' => 10922,
244 ),
245 ),
246 ),
247 'status' => array(
248 'type' => 'long',
249 ),
250 'spam' => array(
251 'type' => 'long',
252 ),
253 'deleted' => array(
254 'type' => 'long',
255 ),
256 'meta' => array(
257 'type' => 'object',
258 ),
259 ),
260 ),
261 ),
262 );
263