[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:40:44 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`.


And in the case where users want to match `super_user`, I think it's reasonable to have users type two more characters and match it with `use`.


https://reviews.llvm.org/D50517





More information about the cfe-commits mailing list