4 ms·
I wish GitHub had decent search functionality.
by petters 8y ago
I wish GitHub had decent search functionality.
- enriquto 8y agoyou mean, searching the past history of all codes?
- petters 8y agoMostly searching for regexes in code and in filenames. But yes, history would sometimes be useful too. And this is really the bare minimum. An even better search would e.g. allow searching for identifiers (comments and strings disregarded).
- enriquto 8y agoyeah, that would be wonderful indeed! The current search functionality of github is nearly useless, which is a shame.
- rpedela 8y agoI believe GitHub uses ES, and currently allowing users to perform regex can bog down the entire cluster if the regex is malformed. This is a problem with Solr too. I believe there was some effort to resolve this at the Lucene level, but I am not sure the status. In other words, I agree with you but I also know it is an extremely hard problem to solve at Github's scale.
- avar 8y agoIf they use ES (or other Lucene) they could already be doing fuzzy search via ES's own ngram support. At that point indexed regex search as described in the article isn't far away. You just need to bridge the gap between a regex and a trigram index.
- rpedela 8y agoAgreed, but its not obvious to me how you would bridge that gap without a lot of custom code.
- sp1982 8y agoI am hacking on something that allows searching based on identifiers. Feel free to play around at https://www.codegrep.com https://www.codegrep.com, currently indexing few thousand popular repositories.
- PunchTornado 8y agoalso searching other branches than master
- nickysielicki 8y agoYou joke, but building and retaining an extra Xapian database would be something that lots of people would be willing to pay for. I'm surprised that this isn't something they sell. Git is easy to host, especially now with several good web frontends.
- enriquto 8y agoI was not joking! I would love to do searches with regular expressions over commits. For example, to look for all projects that have deleted code with the GPL license, you could simply do a search on '^-This program is free software: you can redistribute it and/or modify'
- hoorayimhelping 8y agoI can't believe they don't adopt something like https://github.com/etsy/hound https://github.com/etsy/hound. It's all right there, it's super easy to setup, and it's a game changer. Lightning fast search that you can link to. Check it out for your org, I was at Etsy when Kelly wrote it, and I've taken it with me to other jobs.
- karmakaze 8y agoI thought the very same thing which is how I SaaSified etsy/hound as Gitgrep.com[0]. [0] https://gitgrep.com https://gitgrep.com
- espeed 8y agoNow that Microsoft has acquired GitHub, no doubt they will be upgrading GitHub search with SOTA algos.
- manigandham 8y agoHighly recommend Sourcegraph. Fast, free, and understands code by using language servers. Install extension to replace github.com search. https://sourcegraph.com/start https://sourcegraph.com/start