document: add an indexof(uri) method