Skip to content

Commit

Permalink
Merge branch 'main' into jemalloc
Browse files Browse the repository at this point in the history
  • Loading branch information
lalinsky authored Dec 18, 2024
2 parents 0cea6a3 + bb60cb7 commit 819cbfd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/server.zig
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ pub fn run(allocator: std.mem.Allocator, indexes: *MultiIndex, address: []const
const default_search_timeout = 500;
const max_search_timeout = 10000;

const default_search_limit = 10;
const default_search_limit = 40;
const min_search_limit = 1;
const max_search_limit = 100;

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

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

Expand Down

0 comments on commit 819cbfd

Please sign in to comment.