Closed Bug 813524 Opened 13 years ago Closed 11 years ago

DXR: Support case insensitive searches

Categories

(Webtools Graveyard :: DXR, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: espressive, Assigned: erik)

Details

(Whiteboard: mxr-parity)

Support case insensitive searches. This bug very well be related: https://bugzilla.mozilla.org/show_bug.cgi?id=487085
Assignee: nobody → erik
MXR does this, defaulting to case-sensitive but showing a "Case Sensitive" checkbox on the page returned after form submission.
Whiteboard: mxr-parity
Taras and I came to the conclusion that we should be case-insensitive by default but have a checkbox or something. All-or-nothing case sensitiviity is sufficient; we don't need to be able to control it per term.
(In reply to comment #2) > Taras and I came to the conclusion that we should be case-insensitive by > default but have a checkbox or something. All-or-nothing case sensitiviity is > sufficient; we don't need to be able to control it per term. One nice heuristic could be to be case insensitive by default if the query is all in lower case, and case sensitive if the input is in mixed case. If I search for "nsString" there is a high chance that I meant to do a case sensitive search.
I've always pulled back from that because it's hard to discover, but a solution just occurred to me: we can automatically make the "Case sensitive" checkbox check itself as soon as you hit a capital letter. That way, it's (hopefully) obvious what it's thinking.
(In reply to comment #4) > I've always pulled back from that because it's hard to discover, but a solution > just occurred to me: we can automatically make the "Case sensitive" checkbox > check itself as soon as you hit a capital letter. That way, it's (hopefully) > obvious what it's thinking. Sounds good!
Erik, any idea when you can get around to implementing this? I think this is currently the #1 difficulty I have when using DXR. Especially when searching for DOM function names which are CamelCase in C++ bug exposed as camelCase to JS. THis means that I need to search twice in two different tabs for both variants of those names.
Ehsan, thank you for reminding me it's important! That really helps, since I don't get to watch over people's shoulders much. Being optimistic, I might be able to squeeze that in toward the end of September. The quarter until now has been full of infra improvements (like not having a day of downtime every time a tree build fails) and scoping out the upcoming UI work, which Schalk has just started on. In general, my prioritized to-do list is at https://github.com/erikrose/status/wiki#to-do. I work on it roughly from the bottom up. Hang in there; things are coming at me from every direction, but I can at least make sure that my DXR attention is spent on high-value additions. Cheers!
Thanks! FWIW this was basically as a reminder, with some let's-fix-Ehsan's-workflow sneaked into it. ;-)
Commit pushed to master at https://github.com/mozilla/dxr https://github.com/mozilla/dxr/commit/27f15f3313fa9af7500fef482f2e948c0deff7c1 Add (and default to) case-insensitive searching for free text. Fixes bug 813524. The checkbox does not, at the moment, affect structural queries.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
We should see this after tonight's indexing run. Give it a whirl, Ehsan, and tell me what you think! I'd also be interested in your opinion on whether we ought to make this affect structural queries (e.g. function:whatever, type-ref:whatever, etc.).
Due to a bug in the build script, which is being fixed as we speak, the new version won't be deployed for a few more hours.
(In reply to comment #11) > Due to a bug in the build script, which is being fixed as we speak, the new > version won't be deployed for a few more hours. OK, can you please let me know when I should start trying it out? FWIW I do think that it makes sense to extend this to structural queries, especially since our IDL compiler turns lower camel case function names into upper camel case functions.
What I should have asked: at the moment, [most] structural queries are case-insensitive. Would it be useful to you to have them be case-sensitive when the "case-sensitive" box is checked?
(In reply to comment #13) > What I should have asked: at the moment, [most] structural queries are > case-insensitive. Would it be useful to you to have them be case-sensitive when > the "case-sensitive" box is checked? Yes.
Yay consistency! :-D We'll head that direction.
Filed bug 948613 for that.
Ehsan, it's all up and ready to try!
Product: Webtools → Webtools Graveyard
You need to log in before you can comment on or make changes to this bug.