|operations/mediawiki-config||master||+1 -0||Change $wgArticleCountMethod in Wikidata from default ('link') to 'any'|
- Mentioned In
- T222044: Set $wgArticleCountMethod = 'any' on bgwikinews and run updateArticleCount.php
T199041: Pswikivoyage content pages counting issues
T147997: Should ItemContent::isCountable return true if the Item is not a redirect?
- Mentioned Here
- T146272: [Story] get number of entities of a certain type via magic word
(Cross-posted from gerrit) Wikibase on purpose counts articles differently than normal MediaWiki. Changing this should only be done after a thorough discussion, I think… this should probably also be changed in Wikibase in case the community no longer agrees to the measurement methods once put in place.
Not sure whether it will work, or whether we fully override the behavior. Currently we consider an Item a "valid" (countable) article if it has either at least one statement or at least one sitelink (as far as I remember).
I doubt it's implemented like that. Both the number of items with at least one statement (20,964,244) and the number items with at least one sitelink (20,338,226) are higher than the current returned value by the parser function (20,023,628). Hence, even some items with a claim or sitelink are not considered as valid articles.
Values taken from db replica:
select count(*) from page_props where pp_propname='wb-claims' and pp_value>0; select count(*) from page_props where pp_propname='wb-sitelinks' and pp_value>0;
We are using [[https://github.com/wikimedia/mediawiki-extensions-Wikibase/blob/891e6c851740da99ea1676f1bf8bdc5e3a696612/repo/includes/Content/ItemContent.php#L236|ItemContent::isStub]] right now which basically checks that the item is not a redirect and has at least one statement (the Item::isEmpty check on line 238 is redundant with the Item::getStatements()->isEmpty() call).
I think the question hinges on is an item without a statement useful or not. Right now we have 2.75 Million of them of 23.8 Million items in total. That is quite a lot and we definitely need to get this number down. At the same time the number on the main page is incorrect and several times I had to correct people about it and had people complain to me about it.
So: Let's change it. Redirects should still not be counted but items without statements should be counted.
Wikidata items without statements usually still are containers for sitelinks and thus actively used from various Wikimedia projects. We can not call them useless. We should not ignore them and hide them, and if it's only in the count.
Properties and whatever new types of entities we will be getting should probably be included as well.
Most items without any statements do include sitelinks: https://www.wikidata.org/wiki/Wikidata:Database_reports/without_claims_by_site
On many Wikipedia's we periodically have to update the number of items manually in the system, as it is a calculation and not an article/item count.
Maybe it does not fit here, but I would like to know also how many statements are added to Wikidata.