sourcegraph / sourcegraph-public-snapshot

Code AI platform with Code Search & Cody
https://sourcegraph.com
Other
10.12k stars 1.29k forks source link

Immediate no results in structural search #9079

Closed sqs closed 4 years ago

sqs commented 4 years ago

Repro:

  1. Go to https://sourcegraph.com/search?q=repo:github.com/sourcegraph/sourcegraph+%22New%28:%5Bargs%5D%29.:%5Bimmcall%5D%28%22+lang:go&patternType=structural

Expected: see some results (clicking "Show more" does result in results being shown fairly quickly) Actual: immediate empty search results page with "Show more" button

Also, it is unexpected that it says "No results" definitively but also shows "Show more".

image

rvantonder commented 4 years ago

Yeah the UX here isn't great here. This is a known issue, but I don't think we're tracking it. The reason this happen is because two kinds of regex searches for structural search are performed and cascaded (the first tries to find results quickly, the second more expensive).

This should either

By the way the query contains an unbalanced (. This isn't intended to be valid. You might get a result, but really this should raise en error or alert so that the query can be correctly interpreted.