Page MenuHomePhabricator

Create search keyword for deep category search
Closed, ResolvedPublic

Description

Create search keyword, analogous to [[ https://www.mediawiki.org/wiki/Help:CirrusSearch#Intitle_and_incategory | incategory: ]] but allowing to include subcategories in the search too.

Proposed name: deepcategory:.

This will be done by using SPARQL queries to WDQS categories data as backend: https://www.mediawiki.org/wiki/Wikidata_query_service/Categories

Event Timeline

Smalyshev triaged this task as Medium priority.Jan 13 2018, 1:20 AM
Smalyshev created this task.
Smalyshev updated the task description. (Show Details)
Smalyshev moved this task from Backlog to Doing on the User-Smalyshev board.

Change 404064 had a related patch set uploaded (by Smalyshev; owner: Smalyshev):
[mediawiki/core@master] Add SPARQL client to core

https://gerrit.wikimedia.org/r/404064

Change 405059 had a related patch set uploaded (by Smalyshev; owner: Smalyshev):
[mediawiki/extensions/CirrusSearch@master] [WIP] Create deepcat: keyword

https://gerrit.wikimedia.org/r/405059

Change 405372 had a related patch set uploaded (by Smalyshev; owner: Smalyshev):
[mediawiki/extensions/CirrusSearch@master] Add some logging for SPARQL request timing and result count

https://gerrit.wikimedia.org/r/405372

As an aside, I think it would be more useful to users to have semi-deep. Most people want ~4 or 5 levels deep. The category tree becomes very messed up (at least on commons) and usually results in weird results if you have 6 or more levels deep

@Bawolff yes, the depth is configurable by a parameter (wgCirrusSearchCategoryDepth) which defaults to 5 currently.

Change 405059 merged by jenkins-bot:
[mediawiki/extensions/CirrusSearch@master] Create deepcat: keyword for deep category search

https://gerrit.wikimedia.org/r/405059

Change 405372 merged by jenkins-bot:
[mediawiki/extensions/CirrusSearch@master] Add some logging for SPARQL request timing and result count

https://gerrit.wikimedia.org/r/405372

Change 410242 had a related patch set uploaded (by Smalyshev; owner: Smalyshev):
[operations/mediawiki-config@master] Set SPARQL endpoint for category search

https://gerrit.wikimedia.org/r/410242

Change 410242 merged by jenkins-bot:
[operations/mediawiki-config@master] Set SPARQL endpoint for category search

https://gerrit.wikimedia.org/r/410242

Mentioned in SAL (#wikimedia-operations) [2018-02-15T19:13:58Z] <thcipriani@tin> Synchronized wmf-config/CirrusSearch-common.php: SWAT: [[gerrit:410242|Set SPARQL endpoint for category search]] T184840 (duration: 01m 12s)

Great stuff, this will help WMDE with their Advanced Search implementation!