1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace GroupByInc\API\Model; |
4
|
|
|
|
5
|
|
|
use JMS\Serializer\Annotation as JMS; |
6
|
|
|
|
7
|
|
|
class Results |
8
|
|
|
{ |
9
|
|
|
/** |
10
|
|
|
* @var int |
11
|
|
|
* @JMS\Type("integer") |
12
|
|
|
*/ |
13
|
|
|
public $totalRecordCount; |
14
|
|
|
/** |
15
|
|
|
* @var string |
16
|
|
|
* @JMS\Type("string") |
17
|
|
|
*/ |
18
|
|
|
public $area; |
19
|
|
|
/** |
20
|
|
|
* @var string |
21
|
|
|
* @JMS\Type("string") |
22
|
|
|
*/ |
23
|
|
|
public $biasingProfile; |
24
|
|
|
/** |
25
|
|
|
* @var string |
26
|
|
|
* @JMS\Type("string") |
27
|
|
|
*/ |
28
|
|
|
public $redirect; |
29
|
|
|
/** |
30
|
|
|
* @var string |
31
|
|
|
* @JMS\Type("string") |
32
|
|
|
*/ |
33
|
|
|
public $errors; |
34
|
|
|
/** |
35
|
|
|
* @var string |
36
|
|
|
* @JMS\Type("string") |
37
|
|
|
*/ |
38
|
|
|
public $query; |
39
|
|
|
/** |
40
|
|
|
* @var string |
41
|
|
|
* @JMS\Type("string") |
42
|
|
|
*/ |
43
|
|
|
public $originalQuery; |
44
|
|
|
/** |
45
|
|
|
* @var string |
46
|
|
|
* @JMS\Type("string") |
47
|
|
|
*/ |
48
|
|
|
public $correctedQuery; |
49
|
|
|
|
50
|
|
|
/** |
51
|
|
|
* @var Template |
52
|
|
|
* @JMS\Type("GroupByInc\API\Model\Template") |
53
|
|
|
*/ |
54
|
|
|
public $template; |
55
|
|
|
/** |
56
|
|
|
* @var PageInfo |
57
|
|
|
* @JMS\Type("GroupByInc\API\Model\PageInfo") |
58
|
|
|
*/ |
59
|
|
|
public $pageInfo; |
60
|
|
|
/** |
61
|
|
|
* @var Navigation[] |
62
|
|
|
* @JMS\Type("array<GroupByInc\API\Model\Navigation>") |
63
|
|
|
*/ |
64
|
|
|
public $availableNavigation = array(); |
65
|
|
|
/** |
66
|
|
|
* @var Navigation[] |
67
|
|
|
* @JMS\Type("array<GroupByInc\API\Model\Navigation>") |
68
|
|
|
*/ |
69
|
|
|
public $selectedNavigation = array(); |
70
|
|
|
|
71
|
|
|
/** |
72
|
|
|
* @var Record[] |
73
|
|
|
* @JMS\Type("array<GroupByInc\API\Model\Record>") |
74
|
|
|
*/ |
75
|
|
|
public $records = array(); |
76
|
|
|
/** |
77
|
|
|
* @var string[] |
78
|
|
|
* @JMS\Type("array<string>") |
79
|
|
|
*/ |
80
|
|
|
public $didYouMean = array(); |
81
|
|
|
/** |
82
|
|
|
* @var string[] |
83
|
|
|
* @JMS\Type("array<string>") |
84
|
|
|
*/ |
85
|
|
|
public $relatedQueries = array(); |
86
|
|
|
/** |
87
|
|
|
* @var string[] |
88
|
|
|
* @JMS\Type("array<string>") |
89
|
|
|
*/ |
90
|
|
|
public $rewrites = array(); |
91
|
|
|
/** |
92
|
|
|
* @var Metadata[] |
93
|
|
|
* @JMS\Type("array<GroupByInc\API\Model\Metadata>") |
94
|
|
|
*/ |
95
|
|
|
public $siteParams = array(); |
96
|
|
|
// /** |
97
|
|
|
// * @var Cluster[] |
98
|
|
|
// * @JMS\Type("array<GroupByInc\API\Model\Cluster>") |
99
|
|
|
// */ |
100
|
|
|
// public $clusters = array(); |
101
|
|
|
|
102
|
|
|
/** |
103
|
|
|
* @return string[] A list of spell corrections based on the search term. |
104
|
|
|
*/ |
105
|
|
|
public function getDidYouMean() |
106
|
|
|
{ |
107
|
|
|
return $this->didYouMean; |
108
|
|
|
} |
109
|
|
|
|
110
|
|
|
/** |
111
|
|
|
* @param string[] $didYouMean Set the list. |
112
|
|
|
*/ |
113
|
|
|
public function setDidYouMean($didYouMean) |
114
|
|
|
{ |
115
|
|
|
$this->didYouMean = $didYouMean; |
116
|
|
|
} |
117
|
|
|
|
118
|
|
|
/** |
119
|
|
|
* @return string[] A list of related queries for a given search term. |
120
|
|
|
*/ |
121
|
|
|
public function getRelatedQueries() |
122
|
|
|
{ |
123
|
|
|
return $this->relatedQueries; |
124
|
|
|
} |
125
|
|
|
|
126
|
|
|
/** |
127
|
|
|
* @param string[] $relatedQueries Set the related queries for a search term. |
128
|
|
|
*/ |
129
|
|
|
public function setRelatedQueries($relatedQueries) |
130
|
|
|
{ |
131
|
|
|
$this->relatedQueries = $relatedQueries; |
132
|
|
|
} |
133
|
|
|
|
134
|
|
|
/** |
135
|
|
|
* @return Record[] A list of the records for this search and navigation state. |
136
|
|
|
*/ |
137
|
|
|
public function getRecords() |
138
|
|
|
{ |
139
|
|
|
return $this->records; |
140
|
|
|
} |
141
|
|
|
|
142
|
|
|
/** |
143
|
|
|
* @param Record[] $records Set the records. |
144
|
|
|
*/ |
145
|
|
|
public function setRecords($records) |
146
|
|
|
{ |
147
|
|
|
$this->records = $records; |
148
|
|
|
} |
149
|
|
|
|
150
|
|
|
/** |
151
|
|
|
* @return Template If a rule has fired, the associated template will be returned. |
152
|
|
|
*/ |
153
|
|
|
public function getTemplate() |
154
|
|
|
{ |
155
|
|
|
return $this->template; |
156
|
|
|
} |
157
|
|
|
|
158
|
|
|
/** |
159
|
|
|
* @param Template $template Set the template. |
160
|
|
|
*/ |
161
|
|
|
public function setTemplate($template) |
162
|
|
|
{ |
163
|
|
|
$this->template = $template; |
164
|
|
|
} |
165
|
|
|
|
166
|
|
|
/** |
167
|
|
|
* @return PageInfo Information about the results page. |
168
|
|
|
*/ |
169
|
|
|
public function getPageInfo() |
170
|
|
|
{ |
171
|
|
|
return $this->pageInfo; |
172
|
|
|
} |
173
|
|
|
|
174
|
|
|
/** |
175
|
|
|
* @param PageInfo $pageInfo Set the page info. |
176
|
|
|
*/ |
177
|
|
|
public function setPageInfo($pageInfo) |
178
|
|
|
{ |
179
|
|
|
$this->pageInfo = $pageInfo; |
180
|
|
|
} |
181
|
|
|
|
182
|
|
|
/** |
183
|
|
|
* @return Navigation[] A list of all the ways in which you can filter the current result set. |
184
|
|
|
*/ |
185
|
|
|
public function getAvailableNavigation() |
186
|
|
|
{ |
187
|
|
|
return $this->availableNavigation; |
188
|
|
|
} |
189
|
|
|
|
190
|
|
|
/** |
191
|
|
|
* @param Navigation[] $availableNavigation Set the available navigation. |
192
|
|
|
*/ |
193
|
|
|
public function setAvailableNavigation($availableNavigation) |
194
|
|
|
{ |
195
|
|
|
$this->availableNavigation = $availableNavigation; |
196
|
|
|
} |
197
|
|
|
|
198
|
|
|
/** |
199
|
|
|
* @return Navigation[] A list of the currently selected navigations. Also known as breadcrumbs. |
200
|
|
|
*/ |
201
|
|
|
public function getSelectedNavigation() |
202
|
|
|
{ |
203
|
|
|
return $this->selectedNavigation; |
204
|
|
|
} |
205
|
|
|
|
206
|
|
|
/** |
207
|
|
|
* @param Navigation[] $selectedNavigation Set the selected navigations. |
208
|
|
|
*/ |
209
|
|
|
public function setSelectedNavigation($selectedNavigation) |
210
|
|
|
{ |
211
|
|
|
$this->selectedNavigation = $selectedNavigation; |
212
|
|
|
} |
213
|
|
|
|
214
|
|
|
/** |
215
|
|
|
* @return string A URL to redirect to based on this search term. |
216
|
|
|
*/ |
217
|
|
|
public function getRedirect() |
218
|
|
|
{ |
219
|
|
|
return $this->redirect; |
220
|
|
|
} |
221
|
|
|
|
222
|
|
|
/** |
223
|
|
|
* @param string $redirect Set the redirect. |
224
|
|
|
*/ |
225
|
|
|
public function setRedirect($redirect) |
226
|
|
|
{ |
227
|
|
|
$this->redirect = $redirect; |
228
|
|
|
} |
229
|
|
|
|
230
|
|
|
/** |
231
|
|
|
* @return string representation of any errors encountered. |
232
|
|
|
*/ |
233
|
|
|
public function getErrors() |
234
|
|
|
{ |
235
|
|
|
return $this->errors; |
236
|
|
|
} |
237
|
|
|
|
238
|
|
|
/** |
239
|
|
|
* @param string $errors Set errors. |
240
|
|
|
*/ |
241
|
|
|
public function setErrors($errors) |
242
|
|
|
{ |
243
|
|
|
$this->errors = $errors; |
244
|
|
|
} |
245
|
|
|
|
246
|
|
|
/** |
247
|
|
|
* @return int A count of the total number of records in this search and navigation state. |
248
|
|
|
*/ |
249
|
|
|
public function getTotalRecordCount() |
250
|
|
|
{ |
251
|
|
|
return $this->totalRecordCount; |
252
|
|
|
} |
253
|
|
|
|
254
|
|
|
/** |
255
|
|
|
* @param int $totalRecordCount Set the total record count. |
256
|
|
|
*/ |
257
|
|
|
public function setTotalRecordCount($totalRecordCount) |
258
|
|
|
{ |
259
|
|
|
$this->totalRecordCount = $totalRecordCount; |
260
|
|
|
} |
261
|
|
|
|
262
|
|
|
// /** |
263
|
|
|
// * @return Cluster[] The list of clusters. |
264
|
|
|
// */ |
265
|
|
|
// public function getClusters() |
266
|
|
|
// { |
267
|
|
|
// return $this->clusters; |
268
|
|
|
// } |
269
|
|
|
// |
270
|
|
|
// /** |
271
|
|
|
// * @param Cluster[] $clusters Set the search clusters. |
272
|
|
|
// */ |
273
|
|
|
// public function setClusters($clusters) |
274
|
|
|
// { |
275
|
|
|
// $this->clusters = $clusters; |
276
|
|
|
// } |
277
|
|
|
|
278
|
|
|
/** |
279
|
|
|
* @return Metadata[] A list of metadata as set in the area management section of the command center. |
280
|
|
|
*/ |
281
|
|
|
public function getSiteParams() |
282
|
|
|
{ |
283
|
|
|
return $this->siteParams; |
284
|
|
|
} |
285
|
|
|
|
286
|
|
|
/** |
287
|
|
|
* @param Metadata[] $siteParams Set the site metadata. |
288
|
|
|
*/ |
289
|
|
|
public function setSiteParams($siteParams) |
290
|
|
|
{ |
291
|
|
|
$this->siteParams = $siteParams; |
292
|
|
|
} |
293
|
|
|
|
294
|
|
|
/** |
295
|
|
|
* @return string The query sent to the bridge. |
296
|
|
|
*/ |
297
|
|
|
public function getQuery() |
298
|
|
|
{ |
299
|
|
|
return $this->query; |
300
|
|
|
} |
301
|
|
|
|
302
|
|
|
/** |
303
|
|
|
* @param string $query Sets the query to the bridge. |
304
|
|
|
*/ |
305
|
|
|
public function setQuery($query) |
306
|
|
|
{ |
307
|
|
|
$this->query = $query; |
308
|
|
|
} |
309
|
|
|
|
310
|
|
|
/** |
311
|
|
|
* @return string The original query sent to the search service. |
312
|
|
|
*/ |
313
|
|
|
public function getOriginalQuery() |
314
|
|
|
{ |
315
|
|
|
return $this->originalQuery; |
316
|
|
|
} |
317
|
|
|
|
318
|
|
|
/** |
319
|
|
|
* @param string $originalQuery Sets the original query sent to the search service. |
320
|
|
|
*/ |
321
|
|
|
public function setOriginalQuery($originalQuery) |
322
|
|
|
{ |
323
|
|
|
$this->originalQuery = $originalQuery; |
324
|
|
|
} |
325
|
|
|
|
326
|
|
|
/** |
327
|
|
|
* @return string The corrected query sent to the engine, if auto-correction is enabled. |
328
|
|
|
*/ |
329
|
|
|
public function getCorrectedQuery() |
330
|
|
|
{ |
331
|
|
|
return $this->correctedQuery; |
332
|
|
|
} |
333
|
|
|
|
334
|
|
|
/** |
335
|
|
|
* @param string $correctedQuery Sets the corrected query sent to the engine, if auto-correction is enabled. |
336
|
|
|
*/ |
337
|
|
|
public function setCorrectedQuery($correctedQuery) |
338
|
|
|
{ |
339
|
|
|
$this->correctedQuery = $correctedQuery; |
340
|
|
|
} |
341
|
|
|
|
342
|
|
|
/** |
343
|
|
|
* @return string[] A list of rewrites (spellings, synonyms, etc...) that occurred. |
344
|
|
|
*/ |
345
|
|
|
public function getRewrites() |
346
|
|
|
{ |
347
|
|
|
return $this->rewrites; |
348
|
|
|
} |
349
|
|
|
|
350
|
|
|
/** |
351
|
|
|
* @param string[] $rewrites Sets the rewrites that occurred. |
352
|
|
|
*/ |
353
|
|
|
public function setRewrites($rewrites) |
354
|
|
|
{ |
355
|
|
|
$this->rewrites = $rewrites; |
356
|
|
|
} |
357
|
|
|
|
358
|
|
|
/** |
359
|
|
|
* @return string The area that the search fired against. |
360
|
|
|
*/ |
361
|
|
|
public function getArea() |
362
|
|
|
{ |
363
|
|
|
return $this->area; |
364
|
|
|
} |
365
|
|
|
|
366
|
|
|
/** |
367
|
|
|
* @param string $area Sets the area. |
368
|
|
|
*/ |
369
|
|
|
public function setArea($area) |
370
|
|
|
{ |
371
|
|
|
$this->area = $area; |
372
|
|
|
} |
373
|
|
|
|
374
|
|
|
/** |
375
|
|
|
* @return string |
376
|
|
|
*/ |
377
|
|
|
public function getBiasingProfile() |
378
|
|
|
{ |
379
|
|
|
return $this->biasingProfile; |
380
|
|
|
} |
381
|
|
|
|
382
|
|
|
/** |
383
|
|
|
* @param string $biasingProfile |
384
|
|
|
*/ |
385
|
|
|
public function setBiasingProfile($biasingProfile) |
386
|
|
|
{ |
387
|
|
|
$this->biasingProfile = $biasingProfile; |
388
|
|
|
} |
389
|
|
|
} |
390
|
|
|
|
391
|
|
|
|