I've seen it mentioned in a couple of places that it takes a while to generate a view the first time it's referenced in couchDB, but I haven't found any sort of estimate of how long it should take. More specifically, I'm trying to test a view I created and it takes so long to load that I cannot tell if I screwed up the view, or if I'm just too impatient to let the view finish generating. The map function for the view is pretty simple:
function(doc){
emit(doc.name, null);
}
I know that all the documents have a name field because I did some validation before importing them, and there is no reduce function. There are about 11,000 documents in the database, and I basically want to sort them by name.
I navigated to the view's page in futon last night and let it work for about 30 minutes without seeing any results. It seems pretty strange that it should take even that long, since a result shows up relatively quickly when the above function is used for a temporary view. Should it take this long to generate a view in CouchDB? If not, what could lead to a situation like this?