כיצד להחיל מיון תגיות לפי פופולריות לרשימת נושאים? כרגע זה נראה שחל רק על דף תגיות

סיכום מבוסס בינה מלאכותית

The discussion revolves around applying tag sorts by popularity to the topic list, rather than just the tag page. HeyRR initiated the conversation, inquiring if it’s possible to sort tags by popularity in a topic list. codinghorror agreed, suggesting that ordering by popularity should be respected in both the topic itself and the topic list.

An alternative approach was proposed by riking, who suggested sorting by reverse popularity to prioritize less common tags. codinghorror emphasized that tag presence on the topic should be default-ordered by tag popularity.

@sam assessed the feasibility of the change and assigned it to kris.kotlarek, who implemented the improvement in a recent PR (https://github.com/discourse/discourse/pull/10889). The update will be included in the next beta release, allowing tags to be sorted by popularity in the topic list, as demonstrated in an example from Meta.

Does the tag sorts by popularity option in setting only works in generated tag page?

How can I sort tags for each topic and display them in topic list?

e.g.
Those 3 tags: Java x 10, JavaScript x 5, C++ x 2,

I’d like to achieve if someone use all those 3 tags in a topic and it can be sorted by popularity when shows under that topic, instead of the original order OP gives them, is this possible?

4 לייקים

This is a good point; ordering by popularity of the tags should be respected in the topic itself and in the topic list.

I think maybe this should be true regardless of the site setting. @sam how big of a change would this be?

2 לייקים

Hi,

Any update on this? I’d like to check if it’s a relative small feature to add? Or something I can customize as a short-term solution?

לייק 1

Something that’s crossed my mind is sorting by reverse popularity, so the least common / “most informative” tags come first.

Never actually done it, because this sounds like it has more edge cases than a sword factory.

לייק 1

I do feel tag presence on the topic should be default ordered by tag popularity @sam we should assign this, unless it is super hard.

(Also this code path can be skipped entirely if there’s only one tag on a topic.)

2 לייקים

since we trade in tag ids I think we join into the tags table anyway, this should be pretty safe and not add any more queries

@kris.kotlarek can you take this?

3 לייקים

Improvement was made with that PR and will be included in the next beta release - FEATURE: respect tags_sort_alphabetically setting when display tags by KrisKotlarek · Pull Request #10889 · discourse/discourse · GitHub

Below is an example from Meta when tags are sorted by popularity:

For a short moment I changed that option:

The same order of tags you can see when you enter the topic:

4 לייקים