Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Limit was set on matching fields
Flexsearch returns results grouped on matching field, for instance: ``` { "path": [doc1, doc2, ...], "name": [doc2, doc4, ...] } ``` It enforces the limit on each field. Which mean we might end up in a situation where a file is skipped from the `name` array, but appear on the `path` array. As we have a sort order making the results appear first when it has a match on the `name` compared to those with a match on the `path`, it can lead to inconsistent results display. Therefore, we enforce our own limit restriction, after sorting.
- Loading branch information