How to implement tag system

后端 未结 7 1671
悲&欢浪女
悲&欢浪女 2020-11-28 00:19

I was wondering what the best way is to implement a tag system, like the one used on SO. I was thinking of this but I can\'t come up with a good scalable solution.

I

7条回答
  •  感情败类
    2020-11-28 00:43

    Your proposed three table implementation will work for tagging.

    Stack overflow uses, however, different implementation. They store tags to varchar column in posts table in plain text and use full text indexing to fetch posts that match the tags. For example posts.tags = "algorithm system tagging best-practices". I am sure that Jeff has mentioned this somewhere but I forget where.

提交回复
热议问题