Mike McKay
Mike McKay

Reputation: 2626

Can a CouchDB view index it's own design document

I have a view that looks for all of the "application documents":

(function(doc) {
  if (doc.isApplicationDoc === true) {
    return emit(doc.id, null);
  }
});

So I can mark config files and make sure they are replicated, etc. But I need to also have the view return the design doc. Is it possible?

Upvotes: 2

Views: 42

Answers (1)

Mike McKay
Mike McKay

Reputation: 2626

Answer is yes, but it seems to be undocumented (hence this question/answer):

In the design doc add a property:

options: {"include_design" : true}

Upvotes: 3

Related Questions