Re:Searchcode: A source code search engine
by boyter on Wednesday June 25, 2014 @08:32PM
(#7947537)
Hi. That's actually a very good point. I need to have a think on how to allow forcing exact matches, perhaps an advanced option which does this for you. Thanks for the feedback.
[ Parent
| on HN ]
Re:Searchcode: A source code search engine
by JoshTriplett on Wednesday June 25, 2014 @10:21PM
(#7947839)
As a first pass, a "match whole words" checkbox should suffice. Eventually you might want a syntax that allows more flexibility, whether full regexes or something more scalable, but "match whole words" would solve a large fraction of the problem. (You might even want to make that the default, and have a checkbox for "match partial words" instead; for code search, I'd bet that most of the time you want the whole word matches.)
That sounds reasonable. I will probably go with that. Added to the queue and thanks for the feedback.
Re:Searchcode: A source code search engine
by LukeShu on Wednesday June 25, 2014 @09:43PM
(#7947735)
Perhaps support regex search? Russ Cox did a write up of how he implemented regex search for Google Code, back when that was a thing.
Yes I have looked at that. The catch is it would require another copy of the index, and I don't quite want to front the cash for that.
I did write some code which would turn a regex query into a normal sphinx query some time ago so I am going to try to implement that again and hopefully get similar results.
Re:Searchcode: A source code search engine
by alecthomas on Thursday June 26, 2014 @08:23PM
(#7952207)
A better solution would probably be to just rank exact matches higher.