Skip to content

Commit bb60cb7

Browse files
committed
Increase default search limit
1 parent d0ff764 commit bb60cb7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/server.zig

+2-2
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ pub fn run(allocator: std.mem.Allocator, indexes: *MultiIndex, address: []const
104104
const default_search_timeout = 500;
105105
const max_search_timeout = 10000;
106106

107-
const default_search_limit = 10;
107+
const default_search_limit = 40;
108108
const min_search_limit = 1;
109109
const max_search_limit = 100;
110110

@@ -313,7 +313,7 @@ fn handleSearch(ctx: *Context, req: *httpz.Request, res: *httpz.Response) !void
313313

314314
var collector = SearchResults.init(req.arena, .{
315315
.max_results = limit,
316-
.min_score = @intCast(body.query.len / 20),
316+
.min_score = @intCast((body.query.len + 19) / 20),
317317
.min_score_pct = 10,
318318
});
319319

0 commit comments

Comments
 (0)