Page MenuHomePhabricator

[Story] get number of entities of a certain type via magic word
Open, LowestPublic

Description has {{PAGESINNS:index}} that could be used to calculate the number of entities:

Number of entities = {{NUMBEROFARTICLES}} (items) +{{PAGESINNS:120}} (properties) + (counts for new entity types)

However, PAGESINNS isn't activated.

It would be good to have a separate magic word for this, at least, once the number of entities other than items is significantly larger than the number of properties.

Event Timeline

Esc3300 created this task.Sep 21 2016, 11:04 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptSep 21 2016, 11:04 AM
Lydia_Pintscher triaged this task as Lowest priority.Mar 22 2017, 11:36 AM
Lydia_Pintscher moved this task from incoming to hold on the Wikidata board.

@Addshore @daniel @Ladsgroup: the magic word is marked as expensive and therefore not enabled on Wikidata I assume. Is there a way we can get this number that would be acceptable performance-wise?

Lydia_Pintscher renamed this task from create magic word {{NUMBEROFENTITIES}} "number of entities" to [Story] get number of entities of a certain type via magic word.May 27 2018, 3:18 PM

Actually, Given that the data is stored in site_stats table, it should be pretty cheap to get it unless the code for the magic word does some sort of expensive and unneeded magic too. I can take a look later if you think we should pick this up :)