added lucene filtering and fixed an iterator in the JSONRepo