3 ms·
Mostly 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 sear
by petters 8y ago
Mostly 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.