From 67a87bb13c0548fb8d1006ee9c1d54f015392725 Mon Sep 17 00:00:00 2001 From: Gerdriaan Mulder Date: Thu, 5 Dec 2024 10:43:48 +0100 Subject: [PATCH] FIX: typofix in function name WithCollapse --- effdsl.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/effdsl.go b/effdsl.go index 2f2fc87..57d1f76 100644 --- a/effdsl.go +++ b/effdsl.go @@ -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