@@ -230,6 +230,10 @@ discard block |
||
230 | 230 | /* |
231 | 231 | Set the highlight fields for subsequent searches |
232 | 232 | */ |
233 | + |
|
234 | + /** |
|
235 | + * @param string[] $newHighlightedFields |
|
236 | + */ |
|
233 | 237 | public function setHighlightedFields($newHighlightedFields) { |
234 | 238 | $this->highlightedFields = $newHighlightedFields; |
235 | 239 | } |
@@ -242,7 +246,7 @@ discard block |
||
242 | 246 | * @param string $queryText query string, e.g. 'New Zealand' |
243 | 247 | * @param array $fieldsToSearch Mapping of name to an array of mapping Weight and Elastic mapping, |
244 | 248 | * e.g. array('Title' => array('Weight' => 2, 'Type' => 'string')) |
245 | - * @return ArrayList SilverStripe DataObjects returned from the search against ElasticSearch |
|
249 | + * @return \PaginatedList SilverStripe DataObjects returned from the search against ElasticSearch |
|
246 | 250 | */ |
247 | 251 | public function search($queryText, $fieldsToSearch = null, $testMode = false) { |
248 | 252 | if ($this->locale == null) { |
@@ -307,6 +311,10 @@ discard block |
||
307 | 311 | |
308 | 312 | |
309 | 313 | /* Perform an autocomplete search */ |
314 | + |
|
315 | + /** |
|
316 | + * @param string $queryText |
|
317 | + */ |
|
310 | 318 | public function autocomplete_search($queryText, $field) { |
311 | 319 | if ($this->locale == null) { |
312 | 320 | if (class_exists('Translatable') && \SiteTree::has_extension('Translatable')) { |
@@ -362,7 +370,7 @@ discard block |
||
362 | 370 | * @param array $fieldsToSearch array of fieldnames to search, mapped to weighting |
363 | 371 | * @param $$testMode Use all shards, not just one, for consistent results during unit testing. See |
364 | 372 | * https://www.elastic.co/guide/en/elasticsearch/guide/current/relevance-is-broken.html#relevance-is-broken |
365 | - * @return resultList List of results |
|
373 | + * @return \PaginatedList List of results |
|
366 | 374 | */ |
367 | 375 | public function moreLikeThis($indexedItem, $fieldsToSearch, $testMode = false) { |
368 | 376 | echo "INDEXED ITEM:".$indexedItem; |
@@ -469,6 +477,9 @@ discard block |
||
469 | 477 | return $result; |
470 | 478 | } |
471 | 479 | |
480 | + /** |
|
481 | + * @return string |
|
482 | + */ |
|
472 | 483 | public function getSuggestedQuery() { |
473 | 484 | return $this->SuggestedQuery; |
474 | 485 | } |
@@ -334,7 +334,7 @@ |
||
334 | 334 | $queryField->setDisabled(true); |
335 | 335 | $actions = $form->Actions(); |
336 | 336 | |
337 | - if (!empty($actions)) { |
|
337 | + if(!empty($actions)) { |
|
338 | 338 | foreach($actions as $field) { |
339 | 339 | $field->setDisabled(true); |
340 | 340 | } |