[PATCH] D40780: [clangd] Incorporate fuzzy-match into result rankings.

Eric Liu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Dec 5 02:24:05 PST 2017


ioeric added inline comments.


================
Comment at: clangd/ClangdUnit.cpp:377
+      : Result(&Result), SymbolScore(score(Result)), FilterScore(FilterScore),
+        Score(FilterScore * SymbolScore) {}
 
----------------
It might worth mentioning how well `FilterScore * SymbolScore` performs. I think it could be affected by the distribution of the filtering score and symbol scores. We might want to do some tweaks on the numbers depending on the distributions...


================
Comment at: clangd/ClangdUnit.cpp:380
   CodeCompletionResult *Result;
-  float Score; // 0 to 1, higher is better.
+  float SymbolScore; // higher is better
+  float FilterScore; // 0 to 1, higher is better.
----------------
Any reason not to use `CompletionItemScores` here? Maybe copy over some comments?


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D40780





More information about the cfe-commits mailing list