Skip to content

Commit 2ea20e4

Browse files
Freeform search: fix handling of 'size' and 'from' parameters (#4432)
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
1 parent e400f49 commit 2ea20e4

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

catalog/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ where verb is one of
1818

1919
## Changes
2020

21+
- [Fixed] Freeform search: pass 'size' set to 0 to backend, properly handle 'from' ([#4432](https://github.com/quiltdata/quilt/pull/4432))
2122
- [Changed] Increase font size in tooltips and make them uniform ([#4425](https://github.com/quiltdata/quilt/pull/4425))
2223
- [Added] Detect directories and redirect to trailing-slash URLs (e.g., `catalog-host/dir``catalog-host/dir/`). ([#4398](https://github.com/quiltdata/quilt/pull/4398))
2324
- [Fixed] Respect `packageRoot` config property when creating text files using Catalog UI ([#4397](https://github.com/quiltdata/quilt/pull/4397))

catalog/app/containers/Bucket/Queries/requests/search.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ async function search({ req, query }: SearchArgs): Promise<ElasticSearchResults>
3131
action: 'freeform',
3232
body: JSON.stringify(query.body),
3333
}
34-
if (query.size) requestOptions.size = query.size
35-
if (query.from) requestOptions.from = query.size
34+
if (query.size !== undefined) requestOptions.size = query.size
35+
if (query.from !== undefined) requestOptions.from = query.from
3636
const qs = mkSearch(requestOptions)
3737
return req(`/search${qs}`)
3838
} catch (e) {

0 commit comments

Comments
 (0)