Rails 标记 gem/插件:有没有办法进行加权标记?
我对在 Rails 3.x 应用程序中使用 actions-as-taggable-on 感兴趣: https://github.com/mbleigh/acts-as-taggable-on
快速搜索其他标记解决方案,这似乎是支持更好的解决方案之一。但我没有看到(至少在介绍性自述文件中)进行加权标签的方法。
例如,如果我有一个 Place 模型,并且我想用“酒吧、美式、啤酒、舒适”来标记“Bob's Pub”...我希望“bar”成为最能定义“Bob's Pub”的标签。这将代替类别字段。
但现在我想了一下,这似乎会增加相当多的开销,甚至可能需要一个额外的列或表来处理和存储这种计算。我的猜测是否正确,“加权标签”没有特别的实际用途?
acts-as-taggable-on 确实有上下文......因此,在将标签分配给对象时,我可以设置标签的“primary_list”,其中包含定义该对象的几个最重要的标签。
I'm interested in using acts-as-taggable-on for a Rails 3.x app:
https://github.com/mbleigh/acts-as-taggable-on
Doing a quick search for other tagging solutions, this seemed like one of the better-supported ones. But I didn't see (at least in the introductory readme) for a way to do weighted tags.
For instance, if I have a Place model and I wanted to tag "Bob's Pub" with "bar, American, beer, cozy"...I'd like "bar" to be the tag that best defines "Bob's Pub". This would be in lieu of having a category field.
But now that I think about it, that would seem to add quite a bit of overhead, perhaps even an extra column or table to handle and store that kind of calculation. Am I right in guessing that a "weighted tag" is not of particular practical use?
acts-as-taggable-on does have contexts...so when assigning tags to an object, I could set a "primary_list" of tags which would contain several of the most important tags that define the object.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论