5 ms·
I wish github would add an option for a case sensitive search. Tired of getting back ThisThing when I specifically want thisthing (lower case). Also, the sear
by tyingq 10y ago
I wish github would add an option for a case sensitive search. Tired of getting back ThisThing when I specifically want thisthing (lower case).
Also, the search documentation is spread out and seems to be missing guidance on features that are crucial. For example, AND works as you would expect (like: hello AND world), but it isn't mentioned anywhere.
- dajohnson89 10y agoThis this this. I would spend so much time on GitHub if the search were better. I'm tempted to say that search is less than OK. I do have a huge Java repo, but I'm usually shocked when I quickly find what im querying for.
- iSnow 10y agoUsing google and site:github.com? I never use the search on the site...
- Gracana 10y agoAnd then clicking Tools->Verbatim because google otherwise gives results that are wildly different from what you specify..
- GrinningFool 10y agoI can't believe I've missed this. The quality of my search results at google has been steadily going downhill, and I'm often left with a thought along the lines of, "But if you just searched for only the words I used..." Anyway, thanks for posting it!
- dajohnson89 10y agoThere should be a search mode for IT professionals. That way, things like curly braces, numbers, and non-words are still treated as meaningful.
- avn2109 10y agoIt still boggles my mind that there is no (good) way to search all an organization's repos at once. The docs (e.g. [0] but also in other places) claim you can just put "org:foo" in the search bar, but it has never worked for me. [0] https://help.github.com/articles/searching-code/ https://help.github.com/articles/searching-code/
- thebelal 10y ago"user:foo" will search an organisation named foo.
- EmielMols 10y agoI'm always stuped by the fact that when I search for SomeClass I get a dozen of results from tests and the actual class SomeClass in a file called SomeClass.x appears on page 4. Haven't found a way yet to exclude those pesky tests.
- flamedoge 10y agowhy not just full regex
- mbell 10y agoregex search is slow and difficult to index efficiently.
- jcoffland 10y agoIt's plenty fast for many purposes. I grep large source code repos all the time. It's very fast as long as you avoid grepping large binary files for no reason. The link below shows timings for various regex on a 20MiB text file for several different regex softwares. The best code never exceeds half a second for even the worst expressions. Most are much faster. http://sljit.sourceforge.net/regex_perf.html http://sljit.sourceforge.net/regex_perf.html
- bdonlan 10y agoFor most reasonable search regexes, it's reasonably fast if your repository is already cached in memory. However, it's still fairly heavyweight, and the cost of running even these reasonable searches hundreds or thousands of times a second becomes significant. When you add to this the fact that it's possible to deliberately construct regexes that are much more complicated to evaluate (particularly if you allow extensions beyond a true regular language) - potentially being a DoS target - and many repos won't be cached when the search comes in (or caching them would also be very expensive), the costs just get higher. In contrast, a simple keyword search can be performed with a predictable, low cost, so it's no wonder that they'd prefer to implement this instead.
- milesrout 10y ago>When you add to this the fact that it's possible to deliberately construct regexes that are much more complicated to evaluate (particularly if you allow extensions beyond a true regular language) - potentially being a DoS target Only if you allow extensions, but then they aren't regular expressions.
- brettlangdon 10y agoI am always amazed at how hard it is to find something with GitHub's search, when `git grep` works so well.
- kevincox 10y agogit grep is far more expensive and slower the what GitHub does, especially on large repositories.
- justinclift 10y agoSo... ?
- josteink 10y agogrep works on the actual, full repo data and not a precomputed index (which is computationally speaking orders of magnitude faster). No online service in the world does not index things. If you need full access to everything, why not just clone the repo and do these things in the comfort of your command line?