Skip to content

Commit

Permalink
Add tieBreaker description
Browse files Browse the repository at this point in the history
  • Loading branch information
babenkoivan committed Sep 17, 2020
1 parent e431c19 commit 350d1c9
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -856,7 +856,7 @@ Available methods:
* [prefixLength](#match-prefix-length)
* [query](#match-query)
* [slop](#match-phrase-slop)
* [tieBreaker](#match-tie-breaker)
* [tieBreaker](#multi-match-tie-breaker)
* [type](#multi-match-type)
* [zeroTermsQuery](#match-zero-terms-query)

Expand All @@ -883,6 +883,19 @@ $searchResult = Book::multiMatchSearch()
->execute();
```

##### <a name="multi-match-tie-breaker"></a> tieBreaker

`tieBreaker` is used to increase the [relevance scores](https://www.elastic.co/guide/en/elasticsearch/reference/current/query-filter-context.html#relevance-scores)
of records matching the query:

```php
$searchResult = Book::multiMatchSearch()
->fields(['title', 'description'])
->query('My book')
->tieBreaker(0.3)
->execute();
```

##### <a name="multi-match-type"></a> type

Use `type` to define [how the query must be executed](https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-multi-match-query.html#multi-match-types):
Expand Down

0 comments on commit 350d1c9

Please sign in to comment.