Page MenuHomePhabricator

Should ItemContent::isCountable return true if the Item is not a redirect?
Closed, DeclinedPublic

Description

As per T144687: Change $wgArticleCountMethod in Wikidata from default ('link') to 'any' we might want to consider changing ItemContent::isCountable from the current !$this->isRedirect() && !$this->getItem()->isEmpty() (Item is not a redirect and contains data) to just !$this->isRedirect() (Item is not a redirect).

Event Timeline

Addshore moved this task from incoming to needs discussion or investigation on the Wikidata board.
Addshore added subscribers: Lydia_Pintscher, Addshore.

T144687 discussed this a bit, but only really talked about entities with no statements.

This has been open for 2 years and not touched.
@Lydia_Pintscher should totally empty items be counted in the number of items?

If No, we can just close this ticket, if yes, lets make the 1 line code change and regenerate the stats number / count.

Do we know how many items we currently have that are completely empty?

Do we know how many items we currently have that are completely empty?

MariaDB [wikidatawiki_p]> SELECT COUNT(*) FROM page WHERE page_namespace = 0 AND page_is_redirect = 0 AND page_len < 170;            
+----------+
| COUNT(*) |
+----------+
|      190 |
+----------+
1 row in set (2.01 sec)

This might not be the exact number, but from some spot checks it looks pretty good.

Ok thanks! Then it really doesn't matter so let's just leave it as is.