CouchDB多个标签 [英] CouchDB multiple tags

查看:77
本文介绍了CouchDB多个标签的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法在CouchDB中实现多个标签搜索?我有每个带有多个标签的文档(帖子)。我需要查找已被标记为任意标签的帖子。我该怎么做?我当然可以通过多次调用一个视图来做到这一点,该视图为我提供了标签的文档,然后在我的应用程序中对其进行排序,但我想知道是否有办法在CouchDB视图范围内实现相同的目标。 p>

Is there any way to have multiple tag search implemented in CouchDB? I have documents (posts) each with multiple tags. I need to find posts that have been tagged with an arbitrary set of tags. How do I do it? I could of course do it with multiple calls to a view which gives me the documents for a tag and then sort it out in my app but I wanted to know if there was a way to achieve the same in the CouchDB view land.

推荐答案

我已经解决了创建带递归函数视图的问题。
此处要点 https://gist.github.com/820412

I have solved this problem creating a view with a recursive function. Here the gist https://gist.github.com/820412

这篇关于CouchDB多个标签的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆