4 ms·
Handy! However, this seems to do fuzzy searches by default, and I don't see an obvious way to disable that. I tried searching for "xcb_connect", and got a pil
by JoshTriplett 12y ago
Handy! However, this seems to do fuzzy searches by default, and I don't see an obvious way to disable that.
I tried searching for "xcb_connect", and got a pile of results for "xcb_connection_t". However, unlike with other search engines, I can't quote the term to force an exact match, because it'll search for the quotes literally (which I'd otherwise appreciate when trying to find a string).
- boyter 12y agoHi. 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.
- LukeShu 12y agoPerhaps support regex search? Russ Cox did a write up of how he implemented regex search for Google Code, back when that was a thing.
- boyter 12y agoYes 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.
- JoshTriplett 12y agoAs 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.)
- boyter 12y agoThat sounds reasonable. I will probably go with that. Added to the queue and thanks for the feedback.
- alecthomas 12y agoA better solution would probably be to just rank exact matches higher.