[PATCH] D42060: [clangd] Use fuzzy match to select top N index results.

Sam McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jan 15 04:10:19 PST 2018


sammccall created this revision.
sammccall added a reviewer: hokein.
Herald added subscribers: cfe-commits, ilya-biryukov, klimek.

This makes performance slower but more predictable (it always processes
every symbol). We need to find ways to make this fast, possibly by precomputing
short queries or capping the number of scored results. But our current approach
is too naive.

It also no longer returns results in a "good" order. In fact it's pathological:
the top N results are ranked from worst to best. Indexes aren't responsible for
ranking and MergedIndex can't do a good job, so I'm pleased that this will make
any hidden assumptions we have more noticeable :-)


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D42060

Files:
  clangd/index/MemIndex.cpp
  unittests/clangd/IndexTests.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D42060.129833.patch
Type: text/x-patch
Size: 3336 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180115/108730ba/attachment.bin>


More information about the cfe-commits mailing list