Verified Commit 003941f8 authored by Camil Staps's avatar Camil Staps 🚀

Don't compute ngrams of all names in results for exact result ratios (takes too much time)

parent 299aef08
......@@ -394,7 +394,7 @@ where
# rn = toReal n
# annots =
[ MatchingNGramsQuery (rn / qsize)
, MatchingNGramsResult (rn / toReal (max 1 $ length $ 'NGrams'.ngrams NGRAMS_CI NGRAMS_N name))
, MatchingNGramsResult (rn / toReal (size name))
]
= ((idx, annots), db)
......
......@@ -12,8 +12,8 @@ from Cloogle.DB import :: Annotation, :: CloogleEntry, :: CloogleDB
* are given by this record.
*/
:: RankSettings =
{ rs_matching_ngrams_q :: !Real //* matching n-grams in the query
, rs_matching_ngrams_r :: !Real //* matching n-grams in the result
{ rs_matching_ngrams_q :: !Real //* ratio of matching query n-grams
, rs_matching_ngrams_r :: !Real //* nr. of matching n-grams divided by the size of the result
, rs_record_field :: !Real //* record fields
, rs_constructor :: !Real //* constructors
......
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