Abbiamo molti tag con “count: 1”, poiché la creazione dei tag non è affatto bloccata e alcune persone li trattano semplicemente come hashtag. Credo ancora nel mantenere aperte le autorizzazioni per i tag, ma sarebbe bello poter potare il giardino più facilmente e periodicamente.
Mi piacerebbe trovare modi per spingere le persone a considerare i tag come un mezzo per “raggruppare” argomenti correlati e a creare tag solo quando pensano (o sanno!) che verranno utilizzati più di una volta.
Nel frattempo, però, credo che estendere la funzionalità esistente per consentire l’“eliminazione dei tag utilizzati da meno di __ argomenti” potrebbe essere un ottimo miglioramento che useremmo.
Even fancier, I could imagine a setting that would automatically sweep tags and delete tags based on the following criteria:
count < N && topic_last_updated > X months ago
Basically, you let tags have a chance to get a toe hold. Their life is renewed if new topics are posted before some timeout. But if no new topics have been posted for more than, say 3 months, and the tag has less than 5 topics, then just get rid of it.
I’ve never seen this button either, and I agree that an auto-cleanup feature would be useful. It should also be careful about not deleting tags that are staff-only. There are probably other cases where some tags shouldn’t be deleted automatically.
In the meantime, here’s a #plugin:data-explorer query that can help folks identify candidate tags for deletion:
-- [params]
-- int :months_since_used = 24
-- int :max_topic_count = 50
with
t as (
select
current_date::timestamp - (:months_since_used * (INTERVAL '1 months')) as cutoff_date
),
topic_tag_dates as (
select tags.id, tags.name, tags.topic_count, topics.last_posted_at as last_used
from topic_tags
left join tags
on topic_tags.tag_id = tags.id
left join topics
on topic_tags.topic_id = topics.id
),
max_last_used as(
select id, max(last_used) mx from topic_tag_dates
group by id
),
tag_last_used as (
select topic_tag_dates.id, name, topic_count, last_used from topic_tag_dates
left join max_last_used
on topic_tag_dates.id = max_last_used.id
where max_last_used.mx = topic_tag_dates.last_used
)
select id,name,topic_count,last_used from tag_last_used, t
where tag_last_used.last_used < t.cutoff_date
and topic_count < :max_topic_count
order by topic_count desc
Sì, questa funzionalità è fortemente necessaria, poiché alcuni utenti del mio forum hanno deciso che sarebbe stato divertente scherzare e pubblicare, diciamo, tag “interessanti” non adatti a tutte le età. Pertanto, mi piacerebbe vedere una funzionalità di questo tipo.