Topic on Extension talk:TitleKey

Can no longer search other namespaces

6
Bttfvgo (talkcontribs)

I could search all namespaces in my search bar but after enabling TitleKey, in order to make queries case insensitive, I can now only search for items in the main namespace. Is there a specific reason why this happens?

Bttfvgo (talkcontribs)

Yep, it's indeed something with TitleKey. I disabled it and while I can no longer use case insensitive queries (like "first last" for "First Last" or "first Last"), contents of all namespaces show up again. Kind of a bummer, really...

Bttfvgo (talkcontribs)
Bttfvgo (talkcontribs)

Ugh. No, I reversed the patch which did nothing, so I added the namespaces to the array. That made it so that I could type in the namespace name (like Template:) but the only results showing were items in the main namespace (no matter which namespace I tried). It was the same thing after disabling the extension so I re-enabled it, re-edited the file, removed the array and tried rebuilding title keys. Nothing. Could still type, for example, Template: and only results from the main namespace were displayed. After disabling it again, running update.php was the only way to restore the ability to search namespaces other than main. I'd rather be able to search all namespaces efficiently than having case insensitive searches only in the main namespace. Oh well, maybe one day that functionality will be added.

Alanhuang122 (talkcontribs)

Reversing that patch is necessary, but not sufficient.

There was a refactor of MediaWiki core in 2016 (or possibly earlier) that introduced a bug in the PrefixSearchBackend hook that the extension uses - extensions that use that hook can't suggest pages that aren't in the main namespace.

There's a Gerrit patch that would fix that bug, but it hasn't yet been merged: Gerrit change 641277.

I spent far too long being baffled by this behaviour and trying to track down the cause - hopefully this helps if someone else finds themselves in the same situation.

2003:C2:3F22:8200:88FF:1B74:E990:1633 (talkcontribs)

"With MediaWiki 1.35 or earlier it breaks search suggestions for pages that are not in the main namespace" seems wrong. We had 1.31.15 and the Extension worked fine. After upgrading to MW 1.35.4 we encountered the problem described above: no more search suggestions when typing <namespace>:<searchstring>. I've just removed TitleKey, then namespace search works as expected. Moreover, the search string is still case-insensitive. Seems as if this extension is no longer necessary in MW 1.35.

Reply to "Can no longer search other namespaces"