Enforce search typed queries

This commit is contained in:
Guillaume Gomez 2021-06-30 14:11:09 +02:00
parent 451e98e7b0
commit 7b62d28cf2

View file

@ -801,7 +801,8 @@ window.initSearch = function(rawSearchIndex) {
results_returned[fullId].lev =
Math.min(results_returned[fullId].lev, returned);
}
if (index !== -1 || lev <= MAX_LEV_DISTANCE) {
if (typePassesFilter(typeFilter, ty.ty) &&
(index !== -1 || lev <= MAX_LEV_DISTANCE)) {
if (index !== -1 && paths.length < 2) {
lev = 0;
}