reader = IndexReader.open(indexDirectory);
Term key = new Term(DocumentCreator.FIELD_URL_MD5, urlHash);
termDocs = reader.termDocs(key);
boolean found = false;
while (termDocs.next() && found == false) {
int pos = termDocs.doc();
// use FieldSelector for more efficient loading of Fields.
// load only what's needed to determine a leading document
Document d = reader.document(pos, new FieldSelector() {
private static final long serialVersionUID = 1426724242925499003L;