diff options
Diffstat (limited to 'clang-tools-extra/clangd/index/dex/Dex.cpp')
-rw-r--r-- | clang-tools-extra/clangd/index/dex/Dex.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/clang-tools-extra/clangd/index/dex/Dex.cpp b/clang-tools-extra/clangd/index/dex/Dex.cpp index 08f168dddef..59cd8fc4304 100644 --- a/clang-tools-extra/clangd/index/dex/Dex.cpp +++ b/clang-tools-extra/clangd/index/dex/Dex.cpp @@ -156,7 +156,9 @@ bool Dex::fuzzyFind(const FuzzyFindRequest &Req, "There must be no :: in query."); trace::Span Tracer("Dex fuzzyFind"); FuzzyMatcher Filter(Req.Query); - bool More = false; + // For short queries we use specialized trigrams that don't yield all results. + // Prevent clients from postfiltering them for longer queries. + bool More = !Req.Query.empty() && Req.Query.size() < 3; std::vector<std::unique_ptr<Iterator>> TopLevelChildren; const auto TrigramTokens = generateQueryTrigrams(Req.Query); |