From 472f06daa3cabb8e4fb9f9d7b19555b73cb1771d Mon Sep 17 00:00:00 2001 From: Thomas Raffray Date: Thu, 31 Oct 2024 07:41:37 +0100 Subject: [PATCH 01/13] fix(java): update browse iterator --- templates/java/api_helpers.mustache | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/java/api_helpers.mustache b/templates/java/api_helpers.mustache index 80213a82fba..37dbf61e5bc 100644 --- a/templates/java/api_helpers.mustache +++ b/templates/java/api_helpers.mustache @@ -347,7 +347,7 @@ public Iterable browseSynonyms(String indexName, SearchSynonymsParam return AlgoliaIterableHelper.createIterable( () -> { SearchSynonymsResponse response = this.searchSynonyms(indexName, params, requestOptions); - currentPage.value = response.getNbHits() < params.getHitsPerPage() ? null : currentPage.value + 1; + currentPage.value = response.getHits().size() < params.getHitsPerPage() ? null : currentPage.value + 1; return response.getHits().iterator(); }, () -> currentPage.value != null @@ -389,7 +389,7 @@ public Iterable browseRules(String indexName, SearchRulesParams params, Re return AlgoliaIterableHelper.createIterable( () -> { SearchRulesResponse response = this.searchRules(indexName, params.setPage(currentPage.value), requestOptions); - currentPage.value = response.getNbHits() < hitsPerPage ? null : currentPage.value + 1; + currentPage.value = response.getHits().size() < hitsPerPage ? null : currentPage.value + 1; return response.getHits().iterator(); }, () -> currentPage.value != null From c9b2001c7fe0bc569ccbacbf573c5101cd5cd91b Mon Sep 17 00:00:00 2001 From: Thomas Raffray Date: Thu, 31 Oct 2024 09:53:09 +0100 Subject: [PATCH 02/13] fix(javascript): update browse iterator --- templates/javascript/clients/client/api/helpers.mustache | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/javascript/clients/client/api/helpers.mustache b/templates/javascript/clients/client/api/helpers.mustache index 7610e01fef2..9e93eff3644 100644 --- a/templates/javascript/clients/client/api/helpers.mustache +++ b/templates/javascript/clients/client/api/helpers.mustache @@ -226,7 +226,7 @@ browseRules( requestOptions ); }, - validate: (response) => response.nbHits < params.hitsPerPage, + validate: (response) => response.hits.length < params.hitsPerPage, ...browseRulesOptions, }); }, @@ -271,7 +271,7 @@ browseSynonyms( params.page += 1; return resp; }, - validate: (response) => response.nbHits < params.hitsPerPage, + validate: (response) => response.hits.length < params.hitsPerPage, ...browseSynonymsOptions, }); }, From 0509a62223858fcb0293bebeb88d410d252f5329 Mon Sep 17 00:00:00 2001 From: Thomas Raffray Date: Thu, 31 Oct 2024 11:57:27 +0100 Subject: [PATCH 03/13] fix(swift): update browse iterators --- .../Sources/Search/Extra/SearchClientExtension.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/clients/algoliasearch-client-swift/Sources/Search/Extra/SearchClientExtension.swift b/clients/algoliasearch-client-swift/Sources/Search/Extra/SearchClientExtension.swift index fefa966a70c..435d2083ba2 100644 --- a/clients/algoliasearch-client-swift/Sources/Search/Extra/SearchClientExtension.swift +++ b/clients/algoliasearch-client-swift/Sources/Search/Extra/SearchClientExtension.swift @@ -298,7 +298,7 @@ public extension SearchClient { ) }, validate: validate ?? { response in - response.nbHits < hitsPerPage + response.hits.count < hitsPerPage }, aggregator: aggregator ) @@ -341,7 +341,7 @@ public extension SearchClient { ) }, validate: validate ?? { response in - response.nbHits < hitsPerPage + response.hits.count < hitsPerPage }, aggregator: aggregator ) From e225f7377e0a1c9c9a58a45d6ab551778a8df4f7 Mon Sep 17 00:00:00 2001 From: Thomas Raffray Date: Thu, 31 Oct 2024 12:00:07 +0100 Subject: [PATCH 04/13] fix(ruby): update browse iterators --- templates/ruby/search_helpers.mustache | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/ruby/search_helpers.mustache b/templates/ruby/search_helpers.mustache index 2c54d095a30..2209cae4428 100644 --- a/templates/ruby/search_helpers.mustache +++ b/templates/ruby/search_helpers.mustache @@ -130,7 +130,7 @@ def browse_rules(index_name, search_rules_params = Search::SearchRulesParams.new rules.concat(res.hits) end search_rules_params.page += 1 - break if res.nb_hits < search_rules_params.hits_per_page + break if res.hits.length < search_rules_params.hits_per_page end rules unless block_given? @@ -154,7 +154,7 @@ def browse_synonyms(index_name, search_synonyms_params = Search::SearchSynonymsP synonyms.concat(res.hits) end search_synonyms_params.page += 1 - break if res.nb_hits < search_synonyms_params.hits_per_page + break if res.hits.length < search_synonyms_params.hits_per_page end synonyms unless block_given? From 8f9b1879b07940d82e8a20a16a2ac55a7f583dbb Mon Sep 17 00:00:00 2001 From: Thomas Raffray Date: Thu, 31 Oct 2024 12:08:28 +0100 Subject: [PATCH 05/13] fix(php): update browse iterators --- clients/algoliasearch-client-php/lib/Iterators/RuleIterator.php | 2 +- .../algoliasearch-client-php/lib/Iterators/SynonymIterator.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/clients/algoliasearch-client-php/lib/Iterators/RuleIterator.php b/clients/algoliasearch-client-php/lib/Iterators/RuleIterator.php index 5dc3de34f57..2b1259c494c 100644 --- a/clients/algoliasearch-client-php/lib/Iterators/RuleIterator.php +++ b/clients/algoliasearch-client-php/lib/Iterators/RuleIterator.php @@ -15,7 +15,7 @@ protected function fetchNextPage() { if ( is_array($this->response) - && $this->key >= $this->response['nbHits'] + && $this->key >= count($this->response['hits']) ) { return; } diff --git a/clients/algoliasearch-client-php/lib/Iterators/SynonymIterator.php b/clients/algoliasearch-client-php/lib/Iterators/SynonymIterator.php index 7c2d3f0c158..6cc7f4ceaef 100644 --- a/clients/algoliasearch-client-php/lib/Iterators/SynonymIterator.php +++ b/clients/algoliasearch-client-php/lib/Iterators/SynonymIterator.php @@ -15,7 +15,7 @@ protected function fetchNextPage() { if ( is_array($this->response) - && $this->key >= $this->response['nbHits'] + && $this->key >= count($this->response['hits']) ) { return; } From fcda577c2c838ba65538acb13d9c369947231b6b Mon Sep 17 00:00:00 2001 From: Thomas Raffray Date: Thu, 31 Oct 2024 12:11:43 +0100 Subject: [PATCH 06/13] fix(csharp): update browse iterators --- .../algoliasearch/Utils/SearchClientExtensions.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Utils/SearchClientExtensions.cs b/clients/algoliasearch-client-csharp/algoliasearch/Utils/SearchClientExtensions.cs index d621aa09722..04854c3db94 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Utils/SearchClientExtensions.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Utils/SearchClientExtensions.cs @@ -344,7 +344,7 @@ public async Task> BrowseRulesAsync(string indexName, SearchRu var page = prevResp?.Item2 ?? 0; var searchSynonymsResponse = await SearchRulesAsync(indexName, searchRulesParams, requestOptions); return new Tuple(searchSynonymsResponse, page + 1); - }, resp => resp?.Item1 is { NbHits: < hitsPerPage }).ConfigureAwait(false); + }, resp => resp?.Item1 is { Hits.Count: < hitsPerPage }).ConfigureAwait(false); return all.SelectMany(u => u.Item1.Hits); } @@ -367,7 +367,7 @@ public async Task> BrowseSynonymsAsync(string indexName, var searchSynonymsResponse = await SearchSynonymsAsync(indexName, synonymsParams, requestOptions); page = page + 1; return new Tuple(searchSynonymsResponse, page); - }, resp => resp?.Item1 is { NbHits: < hitsPerPage }).ConfigureAwait(false); + }, resp => resp?.Item1 is { Hits.Count: < hitsPerPage }).ConfigureAwait(false); return all.SelectMany(u => u.Item1.Hits); } From 6fe3c5f515ef0004017cee0cf6f1ef653296b885 Mon Sep 17 00:00:00 2001 From: Thomas Raffray Date: Thu, 31 Oct 2024 12:13:53 +0100 Subject: [PATCH 07/13] fix(go): update browse iterators --- templates/go/search_helpers.mustache | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/go/search_helpers.mustache b/templates/go/search_helpers.mustache index 0845019265b..aa7e9102ee2 100644 --- a/templates/go/search_helpers.mustache +++ b/templates/go/search_helpers.mustache @@ -363,7 +363,7 @@ func (c *APIClient) BrowseRules( ) }, func(response *SearchRulesResponse, err error) (bool, error) { - return err != nil || (response != nil && response.NbHits < hitsPerPage), err + return err != nil || (response != nil && int32(len(response.Hits)) < hitsPerPage), err }, opts..., ) @@ -409,7 +409,7 @@ func (c *APIClient) BrowseSynonyms( ) }, func(response *SearchSynonymsResponse, err error) (bool, error) { - return err != nil || (response != nil && response.NbHits < hitsPerPage), err + return err != nil || (response != nil && int32(len(response.Hits)) < hitsPerPage), err }, opts..., ) From 855018d9fb041a802102e945b934450905156268 Mon Sep 17 00:00:00 2001 From: Thomas Raffray Date: Thu, 31 Oct 2024 12:17:52 +0100 Subject: [PATCH 08/13] fix(python): update browse iterators --- templates/python/search_helpers.mustache | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/python/search_helpers.mustache b/templates/python/search_helpers.mustache index 80a7343761d..a2e61f0ee7c 100644 --- a/templates/python/search_helpers.mustache +++ b/templates/python/search_helpers.mustache @@ -167,7 +167,7 @@ ) return {{^isSyncClient}}await {{/isSyncClient}}create_iterable{{#isSyncClient}}_sync{{/isSyncClient}}( func=_func, - validate=lambda _resp: _resp.nb_hits < hits_per_page, + validate=lambda _resp: len(_resp.hits) < hits_per_page, aggregator=aggregator, ) @@ -197,7 +197,7 @@ return resp return {{^isSyncClient}}await {{/isSyncClient}}create_iterable{{#isSyncClient}}_sync{{/isSyncClient}}( func=_func, - validate=lambda _resp: _resp.nb_hits < hits_per_page, + validate=lambda _resp: len(_resp.hits) < hits_per_page, aggregator=aggregator, ) From 8745249eca0878c53665297f8cf11a4ed75af982 Mon Sep 17 00:00:00 2001 From: Thomas Raffray Date: Thu, 31 Oct 2024 12:39:04 +0100 Subject: [PATCH 09/13] chore(go): int casting --- templates/go/search_helpers.mustache | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/go/search_helpers.mustache b/templates/go/search_helpers.mustache index aa7e9102ee2..24c015d38e1 100644 --- a/templates/go/search_helpers.mustache +++ b/templates/go/search_helpers.mustache @@ -363,7 +363,7 @@ func (c *APIClient) BrowseRules( ) }, func(response *SearchRulesResponse, err error) (bool, error) { - return err != nil || (response != nil && int32(len(response.Hits)) < hitsPerPage), err + return err != nil || (response != nil && len(response.Hits) < int(hitsPerPage)), err }, opts..., ) @@ -409,7 +409,7 @@ func (c *APIClient) BrowseSynonyms( ) }, func(response *SearchSynonymsResponse, err error) (bool, error) { - return err != nil || (response != nil && int32(len(response.Hits)) < hitsPerPage), err + return err != nil || (response != nil && len(response.Hits) < int(hitsPerPage)), err }, opts..., ) From 15a4013e3099ad95b461859bd063fd3dd2c2fec9 Mon Sep 17 00:00:00 2001 From: Thomas Raffray Date: Thu, 31 Oct 2024 15:06:49 +0100 Subject: [PATCH 10/13] chore(clients): add default hitsPerPage for browse objects helper --- .../Sources/Search/Extra/SearchClientExtension.swift | 8 ++++++-- templates/go/search_helpers.mustache | 4 ++++ templates/java/api_helpers.mustache | 4 ++++ templates/javascript/clients/client/api/helpers.mustache | 4 ++++ templates/python/search_helpers.mustache | 2 ++ templates/ruby/search_helpers.mustache | 2 ++ 6 files changed, 22 insertions(+), 2 deletions(-) diff --git a/clients/algoliasearch-client-swift/Sources/Search/Extra/SearchClientExtension.swift b/clients/algoliasearch-client-swift/Sources/Search/Extra/SearchClientExtension.swift index 435d2083ba2..8870757f8c5 100644 --- a/clients/algoliasearch-client-swift/Sources/Search/Extra/SearchClientExtension.swift +++ b/clients/algoliasearch-client-swift/Sources/Search/Extra/SearchClientExtension.swift @@ -243,9 +243,13 @@ public extension SearchClient { aggregator: @escaping (BrowseResponse) -> Void, requestOptions: RequestOptions? = nil ) async throws -> BrowseResponse { - try await createIterable( + var updatedBrowseParams = browseParams + if updatedBrowseParams.hitsPerPage == nil { + updatedBrowseParams.hitsPerPage = 1000 + } + + return try await createIterable( execute: { previousResponse in - var updatedBrowseParams = browseParams if let previousResponse { updatedBrowseParams.cursor = previousResponse.cursor } diff --git a/templates/go/search_helpers.mustache b/templates/go/search_helpers.mustache index 24c015d38e1..c40b20fb85f 100644 --- a/templates/go/search_helpers.mustache +++ b/templates/go/search_helpers.mustache @@ -305,6 +305,10 @@ func (c *APIClient) BrowseObjects( browseParams BrowseParamsObject, opts ...IterableOption, ) error { + if browseParams.HitsPerPage == nil { + browseParams.HitsPerPage = utils.ToPtr(int32(1000)) + } + _, err := CreateIterable( //nolint:wrapcheck func(previousResponse *BrowseResponse, previousErr error) (*BrowseResponse, error) { if previousResponse != nil { diff --git a/templates/java/api_helpers.mustache b/templates/java/api_helpers.mustache index 37dbf61e5bc..439b1924220 100644 --- a/templates/java/api_helpers.mustache +++ b/templates/java/api_helpers.mustache @@ -298,6 +298,10 @@ public GetApiKeyResponse waitForApiKey(String key, ApiKeyOperation operation) { public Iterable browseObjects(String indexName, BrowseParamsObject params, Class innerType, RequestOptions requestOptions) { final Holder currentCursor = new Holder<>(); + if (params.getHitsPerPage() == null) { + params.setHitsPerPage(1000); + } + return AlgoliaIterableHelper.createIterable( () -> { BrowseResponse response = this.browse(indexName, params, innerType, requestOptions); diff --git a/templates/javascript/clients/client/api/helpers.mustache b/templates/javascript/clients/client/api/helpers.mustache index 9e93eff3644..9a761b7b669 100644 --- a/templates/javascript/clients/client/api/helpers.mustache +++ b/templates/javascript/clients/client/api/helpers.mustache @@ -169,6 +169,10 @@ browseObjects( }: BrowseOptions> & BrowseProps, requestOptions?: RequestOptions ): Promise> { + if (browseParams.hitsPerPage == null) { + browseParams.hitsPerPage = 1000; + } + return createIterablePromise>({ func: (previousResponse) => { return this.browse( diff --git a/templates/python/search_helpers.mustache b/templates/python/search_helpers.mustache index a2e61f0ee7c..f7d214eefe2 100644 --- a/templates/python/search_helpers.mustache +++ b/templates/python/search_helpers.mustache @@ -128,6 +128,8 @@ """ Helper: Iterate on the `browse` method of the client to allow aggregating objects of an index. """ + browse_params.hits_per_page = browse_params.hits_per_page or 1000 + {{^isSyncClient}}async {{/isSyncClient}}def _func(_prev: Optional[BrowseResponse]) -> BrowseResponse: if _prev is not None and _prev.cursor is not None: browse_params.cursor = _prev.cursor diff --git a/templates/ruby/search_helpers.mustache b/templates/ruby/search_helpers.mustache index 2209cae4428..d602cf38558 100644 --- a/templates/ruby/search_helpers.mustache +++ b/templates/ruby/search_helpers.mustache @@ -95,6 +95,8 @@ end # @param request_options [Hash] the requestOptions to send along with the query, they will be forwarded to the `browse` method. # @param block [Proc] the block to execute on each object of the index. def browse_objects(index_name, browse_params = Search::BrowseParamsObject.new, request_options = {}, &block) + browse_params[:hits_per_page] = browse_params[:hits_per_page] || 1000 + hits = [] loop do res = browse(index_name, browse_params, request_options) From 7ac0df2ca96d08b24867cca7cc182cd8a9442a7a Mon Sep 17 00:00:00 2001 From: Thomas Raffray Date: Thu, 31 Oct 2024 15:52:00 +0100 Subject: [PATCH 11/13] chore(javascript): fix typings --- templates/javascript/clients/client/api/helpers.mustache | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/javascript/clients/client/api/helpers.mustache b/templates/javascript/clients/client/api/helpers.mustache index 9a761b7b669..5f071804bfa 100644 --- a/templates/javascript/clients/client/api/helpers.mustache +++ b/templates/javascript/clients/client/api/helpers.mustache @@ -169,8 +169,8 @@ browseObjects( }: BrowseOptions> & BrowseProps, requestOptions?: RequestOptions ): Promise> { - if (browseParams.hitsPerPage == null) { - browseParams.hitsPerPage = 1000; + if (browseParams == null) { + browseParams = { hitsPerPage: 1000 }; } return createIterablePromise>({ From 9f794ed043994724947f3406b63befcfcd1f477e Mon Sep 17 00:00:00 2001 From: Thomas Raffray Date: Thu, 31 Oct 2024 16:30:52 +0100 Subject: [PATCH 12/13] chore(csharp): fix custom tests --- .../csharp/src/ClientExtensionsTests.cs | 122 ++---------------- 1 file changed, 11 insertions(+), 111 deletions(-) diff --git a/tests/output/csharp/src/ClientExtensionsTests.cs b/tests/output/csharp/src/ClientExtensionsTests.cs index b399fbb096c..dd304dbf544 100644 --- a/tests/output/csharp/src/ClientExtensionsTests.cs +++ b/tests/output/csharp/src/ClientExtensionsTests.cs @@ -213,7 +213,7 @@ public async Task ShouldBrowseSynonyms() It.IsAny() ) ) - // First call return 1000 Hits + // Only one call since it will take the hit list length and conclude there isn't more .Returns( Task.FromResult( new AlgoliaHttpResponse @@ -228,56 +228,8 @@ public async Task ShouldBrowseSynonyms() { new() { ObjectID = "XXX", Type = SynonymType.Altcorrection1 }, new() { ObjectID = "XXX", Type = SynonymType.Altcorrection1 }, - }, // Not 1000 but it doesn't matter - NbHits = 1000, - } - ) - ) - ), - } - ) - ) - // Second call return again 1000 Hits - .Returns( - Task.FromResult( - new AlgoliaHttpResponse - { - HttpStatusCode = 200, - Body = new MemoryStream( - Encoding.UTF8.GetBytes( - serializer.Serialize( - new SearchSynonymsResponse() - { - Hits = new List() - { - new() { ObjectID = "XXX", Type = SynonymType.Altcorrection1 }, - new() { ObjectID = "XXX", Type = SynonymType.Altcorrection1 }, - }, // Not 1000 but it doesn't matter - NbHits = 1000, - } - ) - ) - ), - } - ) - ) - // Third call return 999 Hits - .Returns( - Task.FromResult( - new AlgoliaHttpResponse - { - HttpStatusCode = 200, - Body = new MemoryStream( - Encoding.UTF8.GetBytes( - serializer.Serialize( - new SearchSynonymsResponse - { - Hits = new List - { - new() { ObjectID = "XXX", Type = SynonymType.Altcorrection1 }, - new() { ObjectID = "XXX", Type = SynonymType.Altcorrection1 }, - }, // Not 1000 but it doesn't matter - NbHits = 999, + }, + NbHits = 2, } ) ) @@ -302,10 +254,10 @@ public async Task ShouldBrowseSynonyms() It.IsAny(), It.IsAny() ), - Times.Exactly(3) + Times.Exactly(1) ); - Assert.Equal(6, browseSynonymsAsync.Count()); + Assert.Equal(2, browseSynonymsAsync.Count()); } [Fact] @@ -323,59 +275,7 @@ public async Task ShouldBrowseRules() It.IsAny() ) ) - // First call return 1000 Hits - .Returns( - Task.FromResult( - new AlgoliaHttpResponse - { - HttpStatusCode = 200, - Body = new MemoryStream( - Encoding.UTF8.GetBytes( - serializer.Serialize( - new SearchRulesResponse - { - Page = 0, - NbPages = 2, - Hits = new List - { - new() { ObjectID = "XXX" }, - new() { ObjectID = "XXX" }, - }, // Not 1000 but it doesn't matter - NbHits = 1000, - } - ) - ) - ), - } - ) - ) - // Second call return again 1000 Hits - .Returns( - Task.FromResult( - new AlgoliaHttpResponse - { - HttpStatusCode = 200, - Body = new MemoryStream( - Encoding.UTF8.GetBytes( - serializer.Serialize( - new SearchRulesResponse - { - Page = 0, - NbPages = 2, - Hits = new List - { - new() { ObjectID = "XXX" }, - new() { ObjectID = "XXX" }, - }, // Not 1000 but it doesn't matter - NbHits = 1000, - } - ) - ) - ), - } - ) - ) - // Third call return 999 Hits + // Only one call since it will take the hit list length and conclude there isn't more .Returns( Task.FromResult( new AlgoliaHttpResponse @@ -387,13 +287,13 @@ public async Task ShouldBrowseRules() new SearchRulesResponse { Page = 0, - NbPages = 2, + NbPages = 1, Hits = new List { new() { ObjectID = "XXX" }, new() { ObjectID = "XXX" }, - }, // Not 1000 but it doesn't matter - NbHits = 999, + }, + NbHits = 2, } ) ) @@ -416,10 +316,10 @@ public async Task ShouldBrowseRules() It.IsAny(), It.IsAny() ), - Times.Exactly(3) + Times.Exactly(1) ); - Assert.Equal(6, browseSynonymsAsync.Count()); + Assert.Equal(2, browseSynonymsAsync.Count()); } [Fact] From 669fa67a75a885c4cf6752b90f224f58ba9286ab Mon Sep 17 00:00:00 2001 From: Thomas Raffray Date: Thu, 31 Oct 2024 16:42:25 +0100 Subject: [PATCH 13/13] chore(javascript): fix fix fix --- templates/javascript/clients/client/api/helpers.mustache | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/templates/javascript/clients/client/api/helpers.mustache b/templates/javascript/clients/client/api/helpers.mustache index 5f071804bfa..3feea7cf5ea 100644 --- a/templates/javascript/clients/client/api/helpers.mustache +++ b/templates/javascript/clients/client/api/helpers.mustache @@ -169,10 +169,6 @@ browseObjects( }: BrowseOptions> & BrowseProps, requestOptions?: RequestOptions ): Promise> { - if (browseParams == null) { - browseParams = { hitsPerPage: 1000 }; - } - return createIterablePromise>({ func: (previousResponse) => { return this.browse( @@ -180,6 +176,7 @@ browseObjects( indexName, browseParams: { cursor: previousResponse ? previousResponse.cursor : undefined, + hitsPerPage: 1000, ...browseParams, }, },