Skip to content

Unable to search for :: #94

Open
Open

Description

@NiedziolkaMichal

Summary

Quick search results are correctly showing a few pseudo-elements when :: is typed, but when I click Not seeing what you are searching for? button, 0 matches are found:

image

URL

https://developer.mozilla.org/en-US/search?q=%3A%3A

Expected behavior

It would be great to see all pseudo-elements.

Device

Desktop

Browser

Chrome

Browser version

Stable

Operating system

Windows

Screenshot

No response

Anything else?

No response

Validations

Activity

  1. KartikSoneji commented on Jun 23, 2023

    @KartikSoneji

    The searching is done by elasticsearch:
    https://github.com/mdn/rumba/blob/5409df734847a35c442415f1363c9c1bcb940344/src/api/search.rs#L312-L328

    and it looks like elasticsearch ignoring special characters is the default behaviour:
    https://stackoverflow.com/questions/51785404/search-special-characters-with-elasticsearch

    Setting a custom search analyser and/or tokenizer seems to be the best way to search for special characters too:
    https://www.elastic.co/guide/en/elasticsearch/reference/current/specify-analyzer.html#specify-search-query-analyzer

  2. KartikSoneji commented on Jun 23, 2023

    @KartikSoneji

    Interestingly, the quick-search box uses a static index of article titles so it does show a list of pseudo elements when searching for ::
    I think the current behaviour should be changed to ensure the search page returns at least the same results as the quick search bar.
    image

  3. transferred this issue frommdn/yarion Oct 24, 2025
  4. added
    needs triageTriage needed by staff and/or partners. Automatically applied when an issue is opened.
    and removed on Oct 24, 2025
  5. removed
    needs triageTriage needed by staff and/or partners. Automatically applied when an issue is opened.
    on Oct 29, 2025
  6. caugner commented on Jan 21, 2026

    @caugner
    Contributor

    This also affects __ (e.g. __Host-).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions