From cfbb73948cebaf3508f9e6478a9c1f6de1d5ae14 Mon Sep 17 00:00:00 2001 From: Yury Melnichek Date: Mon, 6 Jun 2011 04:48:38 +0200 Subject: [PATCH] [search] Comment out spelling to make search faster. --- search/query.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/search/query.cpp b/search/query.cpp index 834963293d..de776c5e35 100644 --- a/search/query.cpp +++ b/search/query.cpp @@ -19,30 +19,26 @@ uint32_t KeywordMatch(strings::UniChar const * sA, uint32_t sizeA, strings::UniChar const * sB, uint32_t sizeB, uint32_t maxCost) { - /* if (sizeA != sizeB) return maxCost + 1; for (uint32_t i = 0; i< sizeA; ++i) if (sA[i] != sB[i]) return maxCost + 1; return 0; - */ - return StringMatchCost(sA, sizeA, sB, sizeB, DefaultMatchCost(), maxCost, false); + // return StringMatchCost(sA, sizeA, sB, sizeB, DefaultMatchCost(), maxCost, false); } uint32_t PrefixMatch(strings::UniChar const * sA, uint32_t sizeA, strings::UniChar const * sB, uint32_t sizeB, uint32_t maxCost) { - /* if (sizeA > sizeB) return maxCost + 1; for (uint32_t i = 0; i< sizeA; ++i) if (sA[i] != sB[i]) return maxCost + 1; return 0; - */ - return StringMatchCost(sA, sizeA, sB, sizeB, DefaultMatchCost(), maxCost, true); + // return StringMatchCost(sA, sizeA, sB, sizeB, DefaultMatchCost(), maxCost, true); } inline uint32_t GetMaxKeywordMatchScore() { return 512; }