Skip to content

Commit 1b3c08e

Browse files
committed
Default highlight fields
1 parent bdc7a72 commit 1b3c08e

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

src/Eloquent/Docs/ModelDocs.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
* @method static $this orSearchPhrase($phrase, $fields = ['*'], $options = [])
6363
* @method static $this orSearchPhrasePrefix($phrase, $fields = ['*'], $options = [])
6464
* @method static $this orSearchBoolPrefix($phrase, $fields = ['*'], $options = [])
65-
* @method static $this withHighlights(array $fields = [], string|array $preTag = '<em>', string|array $postTag = '</em>', array $globalOptions = [])
65+
* @method static $this highlight(array $fields = [], string|array $preTag = '<em>', string|array $postTag = '</em>', array $globalOptions = [])
6666
* @method static $this asFuzzy(?int $depth = null)
6767
* @method static $this setMinShouldMatch(int $value)
6868
* @method static $this setBoost(int $value)

src/Query/Builder.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1952,11 +1952,11 @@ public function push($column, $value = null, $unique = false)
19521952
/**
19531953
* Add highlights to query.
19541954
*
1955-
* @param string|string[] $column
1955+
* @param string|string[] $columns
19561956
*/
1957-
public function highlight($column = ['*'], $preTag = '<em>', $postTag = '</em>', array $options = []): self
1957+
public function highlight($columns = [], $preTag = '<em>', $postTag = '</em>', array $options = []): self
19581958
{
1959-
$column = Arr::wrap($column);
1959+
$column = Arr::wrap($columns);
19601960

19611961
$this->highlight = compact('column', 'preTag', 'postTag', 'options');
19621962

src/Query/Options/FuzzyOptions.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
<?php
22

33
namespace PDPhilip\Elasticsearch\Query\Options;
4+
45
/**
5-
* @method $this fuzziness(string $value)
6+
* @method $this fuzziness(string|int $value)
67
* @method $this maxExpansions(int $value)
78
* @method $this prefixLength(int $value)
89
* @method $this transpositions(bool $value)

0 commit comments

Comments
 (0)