[PATCH] D50517: [clangd] Generate incomplete trigrams for the Dex index

Eric Liu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Aug 10 02:35:42 PDT 2018


ioeric added a comment.

In https://reviews.llvm.org/D50517#1194976, @kbobyrev wrote:

> As discussed offline with @ilya-biryukov, the better approach would be to prefix match first symbols of each distinct identifier piece instead of prefix matching (just looking at the first letter of the identifier) the whole identifier.
>
> Example:
>
> - Query: `"u"`
> - Symbols: `"unique_ptr"`, `"user"`, `"super_user"`
>
>   Current implementation would match `"unique_ptr"` and `"user"` only. Proposed implementation would match all three symbols, because the second piece of `"super_user"` starts with `u`.


I agree that this can be useful sometime, but I suspect it's relatively rare and might actually compromise ranking quality for the more common use case e.g. the first character users type is the first character of the expected identifier.


https://reviews.llvm.org/D50517





More information about the cfe-commits mailing list