Open durden opened 8 years ago
To implement this we need a few things:
The mechanism for querying is the most challenging considering our current architecture. It's not feasible to query the tags directly from all the metadata files. This would result in a lot of requests to the Github API since we can only read 1 metadata file per request. So, we need to store the tag information in an additional place to make querying easier.
One option for this would be using the existing redis setup and storing guides in a redis list based on tags. For example, a new redis key, tags:<tagname>
, pointing to a list of strings for each guide's unique identifier, <stack>/<title>
. Then, we could handle a query based on tag by simply reading the tags:<tagname>
key.
The downside of this approach is using additional redis storage space. We're currently using a Heroku plan that limits us to 100MB of storage space. However, we're barely using any of this space now, only around 3 - 5 MB. So, maybe this isn't a problem.
Another approach would be to store the tag information in something like Postgres, MongoDB, etc. I'm open to suggestions. However, using the existing redis setup is preferable since we're already depending on redis for the project.
Any additional thoughts on this @paulocheque?
Any suggestions on adding or not adding this feature or the UI to add tags in the editor? @edroman @prtkgpt
It appears that the tags and stacks are the same thing with distinct names: we want to organize/categorize the guides and have the ability to search by these categories.
Just an additional idea, I am not sure about this:
We could use/search tags could be using the GitHub API GET /search/code
. We could include the tags in the commit message, for example.
Thanks for the input. Good to get some ideas bouncing around.
Tags are different in this context. They are more narrow and descriptive than the stacks. The stacks serve as organization for folders in the repo, but they are too broad for good search.
I'm not sure using the search API is a good idea. The search API has very strict rate limiting. Also, we might have people tag with a common word and the search could find that in a lot of places.
Maybe it would be better to save tags somewhere other than the commit message so we can search on tags only, not paragraphs of text. Also, using the commit message would mean we're using that for tags and a summary.
I think storing tags on the commit message would lead to useless commit messages if browsing on GitHub unless we come up with a clean format to accommodate a summary and tags, which would probably be easy and readable.
On Thursday, June 16, 2016, Paulo Cheque notifications@github.com wrote:
It appears that the tags and stacks are the same thing with distinct names: we want to organize/categorize the guides and have the ability to search by these categories.
Just an additional idea, I am not sure about this:
We could use/search tags could be using the GitHub API GET /search/code. We could include the tags in the commit message, for example.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/pluralsight/guides-cms/issues/97#issuecomment-226527340, or mute the thread https://github.com/notifications/unsubscribe/AADizyUqHM0IqFl9vngUfPyu6OrBkopGks5qMXA7gaJpZM4I3LXu .
Currently we're categorizing guides based on a pre-defined list of 'stacks'. This is great for neatly organizing the guides in the github repository since all guides for a stack live in the same directory. However, these stacks are very generic and that poses a few problems: