fix(tasks): limit to max 250 entries when using typesense
Resolves https://community.vikunja.io/t/typesense-250-hits-limit/2536/8
This commit is contained in:
parent
2c6bc7742f
commit
2982acc0ec
@ -573,6 +573,10 @@ func (t *typesenseTaskSearcher) Search(opts *taskSearchOptions) (tasks []*Task,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if opts.perPage > 0 {
|
if opts.perPage > 0 {
|
||||||
|
if opts.perPage > 250 {
|
||||||
|
log.Warningf("Typesense only supports up to 250 results per page, requested %d.", opts.perPage)
|
||||||
|
opts.perPage = 250
|
||||||
|
}
|
||||||
params.PerPage = pointer.Int(opts.perPage)
|
params.PerPage = pointer.Int(opts.perPage)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user