I have a question because there is a confusion about the understanding of the hashtag itself and how to implement it.
When viewed on various webs, there is a function that uses hashtags to attach to articles and searches for related things using those hashtags.
For example, it looks like #classification1 #classification3 #classification5 and when you press the tag, you search for the same tag and show it.
By the way, how do you implement this hashtag?
At first, when a user tags a post with a hashtag, does it mean that the corresponding tags are extracted and put in the hashtag table with the tags as values?
Then, no matter what value the user enters in this hashtag table, should I put all tags that are not in that table? For example,
#Today #This #question #Please #answer #
Should I put these meaningless tags on the table one by one?
Also, if you save the address of the tag on the table and search for the tag, do you spray the address of the tag on the table, or if you search for the tag, search for the tag in a general search and spray all the search results? And in the latter case, there is a tag called #tag, and in the article
If you use this tag...
If you use this #tag...
If there are two articles like this, should the result be different from searching for "Tags" using hashtags when searching for "#Tags" with a regular search?
hashtag javascript php web
The method of using and implementing hashtags varies from site to site, so to tell you something abstract,
If you roughly make it,
I make a table with hash codes and there's a hashtag
(#)django (#)rails (#)hello ....
You can save it like this and hang FK in places like writing.
Or specify the column number where the hashtag is stored
But if you make it like this, there are only fixed tags, and other tags must be put in by the administrator or the rest of you
It's a waste if you put everything in the question.
So if the user decides to just put it in instead of a fixed tag,
Just save the tag in VARCHAR format and search for posts
All you have to do is search for a VARCHAR tag
Of course, it's not without problems, but it's difficult to manage/integrate
The last question also depends on how you design it.
You can leave it to search with hashtags, or you can exclude it
© 2024 OneMinuteCode. All rights reserved.