Skip to content

Commit

Permalink
Merge pull request #4 from mrngm/patch-2
Browse files Browse the repository at this point in the history
FIX: typofix in function name WithCollapse
  • Loading branch information
sdqri authored Dec 16, 2024
2 parents 7026032 + 67a87bb commit a9a35d5
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion effdsl.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,9 +140,14 @@ func WithSort(sortClauseResults ...SortClauseResult) BodyOption {
}
}

// Deprecated: use WithCollapse
func WithCollpse(field string) BodyOption {
return WithCollapse(field)
}

// You can use the collapse parameter to collapse search results based on field values. The collapsing is done by selecting only the top sorted document per collapse key.
// [Collapse search results]: https://www.elastic.co/guide/en/elasticsearch/reference/current/collapse-search-results.html
func WithCollpse(field string) BodyOption {
func WithCollapse(field string) BodyOption {
searchCollapse := Collapse(field)
return func(sb *SearchBody) error {
sb.Collapse = searchCollapse
Expand Down

0 comments on commit a9a35d5

Please sign in to comment.