Completed
Push — dev2 ( e3a184...69174b )
by Gordon
03:03
created
src/SilverStripe/Elastica/ElasticaSearcher.php 1 patch
Doc Comments   +13 added lines, -2 removed lines patch added patch discarded remove patch
@@ -230,6 +230,10 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 	}
Please login to merge, or discard this patch.
searchpage/ElasticSearchPage_Controller.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -334,7 +334,7 @@
 block discarded – undo
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
 				}
Please login to merge, or discard this patch.