Ido Ran wrote:
> I don't know the keywords apriori so I can't create view for each keyword.
> Also it sound like very complicated solution to what look like simple
> problem.
You don't need to create a view for each keyword. Just create a view that emits
for every word.
Use a map function like this:
function(doc) {
doc.keywords.forEach(function(keyword) {
emit(keyword, null);
}
}
> I've found this post
> http://www.vertigrated.com/blog/2010/04/where-clauses-like-selects-against-couchdb/
> on
> how to create selective where. It is still pretty complex and he use both
> view as well as List Function so I need to see how evently will handle List
> Function - I know evently can retrieve a view but I don't know about List
> Function.
Sounds more complex and less performant to me.
Anyway, I suggest checking out couchdb-lucene at this point. It's pretty easy
and proven technology. If multiviews prove to work and get merged into CouchDB,
that might be a better choice in the future for this use case. Note that
couchdb-lucene can do much more than AND-queries though.
Nils.