Skip to content

Commit b250598

Browse files
committed
chore(swift): remove unused variable from disjunctive faceting
1 parent 1770cdc commit b250598

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

clients/algoliasearch-client-swift/Sources/Search/Extra/DisjunctiveFaceting.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,7 @@ struct DisjunctiveFacetingHelper {
8989

9090
/// Merge received search responses into single one with combined facets information
9191
func mergeResponses<T: Codable>(
92-
_ responses: [SearchResponse<T>],
93-
keepSelectedEmptyFacets _: Bool = true
92+
_ responses: [SearchResponse<T>]
9493
) throws -> SearchDisjunctiveFacetingResponse<T> {
9594
guard var mainResponse = responses.first else {
9695
throw DisjunctiveFacetingError.emptyResponses

clients/algoliasearch-client-swift/Sources/Search/Extra/SearchClientExtension.swift

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -644,7 +644,7 @@ public extension SearchClient {
644644
/// - Parameter searchParamsObject: The search query params.
645645
/// - Parameter refinements: Refinements to apply to the search in form of dictionary with
646646
/// facet attribute as a key and a list of facet values for the designated attribute.
647-
/// Any facet in this list not present in the `disjunctiveFacets` set will be filtered conjunctively.
647+
/// Any facet in this list not present in the `disjunctiveFacets` set will be filtered conjunctively (with AND operator).
648648
/// - Parameter disjunctiveFacets: Set of facets attributes applied disjunctively (with OR operator)
649649
/// - Parameter keepSelectedEmptyFacets: Whether the selected facet values might be preserved even
650650
/// in case of their absence in the search response
@@ -657,7 +657,6 @@ public extension SearchClient {
657657
searchParamsObject: SearchSearchParamsObject,
658658
refinements: [String: [String]],
659659
disjunctiveFacets: Set<String>,
660-
keepSelectedEmptyFacets: Bool = true,
661660
requestOptions: RequestOptions? = nil
662661
) async throws -> SearchDisjunctiveFacetingResponse<T> {
663662
let helper = DisjunctiveFacetingHelper(
@@ -670,6 +669,6 @@ public extension SearchClient {
670669
searchMethodParams: SearchMethodParams(requests: queries),
671670
requestOptions: requestOptions
672671
)
673-
return try helper.mergeResponses(responses, keepSelectedEmptyFacets: keepSelectedEmptyFacets)
672+
return try helper.mergeResponses(responses)
674673
}
675674
}

0 commit comments

Comments
 (0)