forked from sourcegraph/zoekt
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
matchtree: disable word search optimization for symbol search (source…
…graph#571) Before this change case sensitive symbol searches of the form \bLITERAL\b would result in the error message found *zoekt.andMatchTree inside query.Symbol The root cause is the symbol search code is pretty janky. It constructs a matchtree and then pulls out either the regex matchtree or the substr matchtree, then creates a specific symbol searcher for those. It feels like it could be more generic rather than a bunch of hard to follow copy pasta. For now this was a more straightforward fix than creating a word search for symbols. Test Plan: expanded the unit tests to cover word search more often. Additionally run zoekt-webserver and checked that a search like the following works now: sym:\bnewMatchTree\b case:yes
- Loading branch information
1 parent
704a5cc
commit 2fdbd60
Showing
3 changed files
with
64 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters