Page MenuHomePhabricator

[S] MediaSearch: Special pages not present in search results
Closed, DeclinedPublic

Description

On Special:MediaSearch page search for any Special page - RecentChanges, Watchlist. Searches for Watchlist, or Special:RecentCahnges won't return the result for Special pages.

Special:Search will find Special pages if they are searched with the word Special - Special:RecentChanges.

Screen Shot 2021-04-07 at 3.13.15 PM.png (522×906 px, 56 KB)

Special:Search gives the exact link:

Screen Shot 2021-04-13 at 8.55.21 AM.png (378×770 px, 54 KB)

Acceptance Criteria:

  • Special pages appear in search results
  • Special pages are an option in the namespace filter under "categories and pages"
  • When special pages are displayed, the namespace is present and correct

Event Timeline

CBogen renamed this task from MediaSearch: Special pages not present in search results to [S] MediaSearch: Special pages not present in search results.Apr 21 2021, 4:45 PM
CBogen updated the task description. (Show Details)

Does the generator-based search that we're using support searching special pages?

I just tried to query the API directly using the sandbox on commons; I supplied the relevant params that Special:MediaSearch uses (generator=search, gsrnamespace=-1, etc).

Despite providing only -1 as the namespace value (the NS for special pages), I don't see any special pages in the results. Instead, the response includes the following warning:

"warnings": {
    "search": {
        "*": "Unrecognized value for parameter \"gsrnamespace\": -1"
    }
}

Does the generator-based search that we're using support searching special pages?

I just tried to query the API directly using the sandbox on commons; I supplied the relevant params that Special:MediaSearch uses (generator=search, gsrnamespace=-1, etc).

Despite providing only -1 as the namespace value (the NS for special pages), I don't see any special pages in the results. Instead, the response includes the following warning:

"warnings": {
    "search": {
        "*": "Unrecognized value for parameter \"gsrnamespace\": -1"
    }
}

@matthiasmullie can you help with this one or should I reach out to the Search team folks?

"Searching" special pages doesn't work: the search API doesn't support virtual namespaces.
It's also not a good target for search anyway: special pages don't have searchable content - they're usually just a UI, or a (temporary/changing) list of content (that actually lives elsewhere)
It looks like Special:Search also doesn't show special pages as a search result.

Special:Search, however, does include 1 extra trick: if if finds that the search input is an exact match for a page title (any page, not just special pages) , it'll show that "There is a page named "XYZ" on this wiki" (or "Create the page "XYZ" on this wiki", if it does not yet exist)
It'd be simply enough to implement something similar in MediaSearch, but I could use some input from @mwilliams whether this is desirable in our current UI, and if so, what it should look like.

Chatted with a few of you about this...some ideas:

  • Exact matches going directly to the page (like the search input in the header) doesn't seem like a good idea for Media Search. More of a navigational hack, not search, and can be confusing and disorienting.
  • If we really think this is needed, we could place messaging for exact matches "There is a paged named X on this wiki" on the "Categories and Pages" tab in a similar style as the spelling correction string.
    Screen Shot 2021-05-12 at 1.21.36 PM.png (1×1 px, 255 KB)
  • I'm leaning towards what @Matthias said in the previous comment, that this isn't a good target for search anyway. I would be fine closing this ticket and potentially reassessing later on based on feedback.