diff --git a/headers/private/file_systems/QueryParser.h b/headers/private/file_systems/QueryParser.h index bcc6a29616..7c5fcc70f6 100644 --- a/headers/private/file_systems/QueryParser.h +++ b/headers/private/file_systems/QueryParser.h @@ -768,9 +768,14 @@ Equation::CalculateScore(Index &index) } // if we have a pattern, how much does it help our search? - if (fIsPattern) + if (fIsPattern) { fScore = getFirstPatternSymbol(fString) << 3; - else { + + // Even if the first pattern symbol is at position 0, + // there's still an index, so don't let our score revert to zero. + if (fScore == 0) + fScore = 1; + } else { // Score by operator if (Term::fOp == OP_EQUAL) { // higher than pattern="255 chars+*"