"foo is not a valid view" when database contains no documents #7

nateroling opened this Issue Jul 3, 2009 · 3 comments

2 participants


Trying to search a database that contains no documents (besides the couchdb-lucene design document) brings up the error "foo is not a valid view." This is misleading, as the view works properly when there are documents in the database.


You're right, of course.

The "not a valid view" message ought to be temporary, since adding a fulltext member to a design document that causes nothing at all to be indexed is redundant.

I would very much like it return a valid JSON response (with zero hits, obviously) instead. The trick here is that only couchdb knows which views are legitimate until lucene contains at least one document, with the present code.

The purpose of returning "not a valid view" was to help developers understand when they got their url's right, as numerous people were complaining about "no hits" but were using the wrong URL.

I'll try to correct this issue without breaking those other cases.


Yeah, it's a bit of a corner case. Not stopping me from doing anything useful, just a bit of polish.


Resolved on master.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment