Skip to content

Commit 499079b

Browse files
committed
Increase search query results from 48 to 96
1 parent 8ccf8d5 commit 499079b

3 files changed

Lines changed: 33 additions & 2 deletions

File tree

src/actions/search/__tests__/domain.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ describe('performSearch', () => {
5959
expect(indexFn).toHaveBeenCalledWith('default')
6060
expect(searchFn).toHaveBeenCalledWith({
6161
query: 'typescript',
62-
limit: 24,
62+
limit: 48,
6363
reranking: true,
6464
semanticWeight: 0.5,
6565
keepOriginalQueryAfterEnrichment: true,

src/actions/search/domain.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ export const performSearch = async (
3838
const requestedLimit = typeof limit === 'number' && Number.isFinite(limit) ? limit : 8
3939
// Over-fetch to compensate for section-chunked documents. Multiple chunks
4040
// from the same page may match; dedup in responder.ts collapses them.
41-
const limitValue = Math.min(requestedLimit * 6, 50)
41+
// Upstash Search API caps limit at 100.
42+
const limitValue = Math.min(requestedLimit * 6, 100)
4243
const url = getUpstashUrl()
4344
const token = getUpstashPublicToken()
4445

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
---
2+
export type Props = {
3+
color: string
4+
classes?: string
5+
size: number
6+
accessible: boolean
7+
focusable: boolean
8+
isListMarker?: boolean
9+
id?: string
10+
}
11+
12+
const { color, classes, size, accessible, focusable, isListMarker, id } = Astro.props
13+
---
14+
15+
<svg
16+
id={id}
17+
xmlns="http://www.w3.org/2000/svg"
18+
class:list={["shrink-0", `w-${size} h-${size}`, `text-${color}`, classes, isListMarker ? "mt-0.5" : ""]}
19+
fill="currentColor"
20+
stroke="none"
21+
viewBox="0 0 24 24"
22+
aria-hidden={accessible ? "false" : "true"}
23+
focusable={focusable ? "true" : "false"}
24+
>
25+
{accessible && <title>Minimize Icon</title>}
26+
<path
27+
stroke-width="2"
28+
d="m 24,10.909091 v 2.181818 H 0 v -2.181818 z"
29+
></path>
30+
</svg>

0 commit comments

Comments
 (0)