nlfiedler/mokuroku

Prevent queries on unknown views

Closed this issue · 0 comments

An application could do something "weird" by passing views A, B, and C to the Database constructor, and then invoking query() on view D. The library will happily construct a new index for D, and then never update it again when new documents are put in the database. This is a situation that mokuroku does not handle at the moment. For now, makes sense to simply panic when the application passes a view that was not among those given to the constructor (clearly this is a programmer mistake, not an "error" as in a missing file).