Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Search bar Firefox 24.0 space issue #45

Closed
cdtweb opened this issue Jan 22, 2014 · 4 comments
Closed

Search bar Firefox 24.0 space issue #45

cdtweb opened this issue Jan 22, 2014 · 4 comments
Labels

Comments

@cdtweb
Copy link

cdtweb commented Jan 22, 2014

Hard to explain, but I tried searching "409 Conflict" which resolves to "409+Conflict" and doesn't return any results... If I search "409" the expected result appears.. also if I put "409%20conflict".. Seems to be an encoding issue.

@commonquail
Copy link

This appears to manifest in different ways and have numerous possibly related issues. It's an issue in IE11, too (make a search provider here.

Here are a few examples I expect to take me to the page labeled "SPL/Exceptions".

FF 26.0:

  • #q=:
    • spl exception: Searches for exception. Exception class.
    • spl%20exception: Searches for exception. Exception class.
    • spl/exception: Searches for spl/exception. No result.
    • splexception: Searches for splexception. No result.
  • Provider:
    • spl%20exception: Searches for exception. Exception class.
    • spl exception: Searches for spl+exception. No result.
    • spl/exception: Searches for spl/exception. No result.
  • Internal search:
    • spl%20exception: No result.
    • spl/exception: No result.
    • spl exception, type: Not possible. Space is ignored.
    • spl exception, paste: No result.

IE11:

  • #q=:
    • spl exception: Searches for exception. Exception class.
    • spl%20exception: Searches for exception. Exception class.
    • spl/exception: Searches for spl/exception. No result.
    • splexception: Searches for splexception. No result.
  • Provider:
    • spl%20exception: Searches for spl%20exception. No result.
    • spl exception: Searches for spl+exception. No result.
    • spl/exception: Variously searches for spl/exception and treats it as a URI. No result.
    • splexception: Searches for splexception. No result.
  • Internal search:
    • spl%20exception: No result.
    • spl/exception: No result.
    • spl exception, type: Not possible. Space is ignored.
    • spl exception, paste: No result.
    • splexception: No result.

It seems that various special characters are not interpreted as expected by the fuzzy search, in addition to any encoding issues there may also be in place. I would expect:

  • / to be treated as a literal or ignored by search.
  • Spaces to be consistently stripped or allowed and possibly ignored by search.
  • Query and provider arguments consistently translated to valid search terms. To this end, %20 should probably be treated as literal space.

I have no personal experience with longest common subsequence matching but I can see the rationale in ignoring spaces. However, it seems to me that a better approach would be to ignore occurrences of spaces in the search term instead of simply stripping them during input.

@Thibaut
Copy link
Member

Thibaut commented Jan 24, 2014

Thanks for the bug report. I'll look into this over the week-end.

@commonquail The "type" pages such as SPL/Exceptions aren't part of the search index (the doc also needs to be enabled for results to appear). Thanks for investigating the issue, though; this is very useful.

@commonquail
Copy link

Does that mean they can't be or aren't supposed to be, either? When I look up, say, exceptions, it's usually because I don't know if the core library includes a fitting one already or which one that would be. In that situation I can't search directly for a listing of exceptions but instead have to rely on the Alt + r shortcut from a particular result I know exists (which is nice for what it is but extra work for my poor, lazy fingers). A scoped search for exception[s] doesn't produce useful results either; far too many or too little.

tl;dr: I'd really like that but I can understand if it isn't possible.

Addendum: A possible alternative interpretation of space using the provider or the query parameter could be to delimit a search scope.

@Thibaut
Copy link
Member

Thibaut commented Jan 25, 2014

@commonquail I've opened a new issue for adding the type pages to the search index. I understand the use case but this isn't straightforward to implement.

You can already use a space the scope your search: http://devdocs.io/#q=css%20color

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants