Verified Commit ca925919 authored by Camil Staps's avatar Camil Staps 🙂

Be a bit less restrictive on small queries (e.g. "len" should still match "length")

parent 5aea4e31
......@@ -412,7 +412,7 @@ where
#! rn = toReal n
#! query_ratio = rn / qsize
#! result_ratio = rn / toReal (size name)
| result_ratio < 0.2 && (size query <= NGRAMS_N || query_ratio < 0.8)
| result_ratio < 0.2 && (size query < NGRAMS_N || query_ratio < 0.6)
/* Prevent large amount of results for small queries to speed up ranking */
= (Nothing, db)
#! annots =
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment