</BUG>
int numDocs = reader.numDocs();
System.out.println("numDocs = " + numDocs);
ImageSearcher searcher = getSearcher();
ImageSearchHits hits = searcher.search(ImageIO.read(new FileInputStream(path)), reader);
<BUG>tableModel.setHits(hits, progressSearch);
</BUG>
reader.close();
Rectangle bounds = resultsTable.getCellRect(0, 0, true);
resultsPane.getViewport().setViewPosition(bounds.getLocation());

final String path = imagePath;
final JPanel frame = topPane;
Thread t = new Thread() {
public void run() {
try {
IndexReader reader = DirectoryReader.open(FSDirectory.open(Paths.get(textfieldIndexName.getText())));
int numDocs = reader.numDocs();
System.out.println("numDocs = " + numDocs);
ImageSearcher searcher = getSearcher();
ImageSearchHits hits = searcher.search(ImageIO.read(new FileInputStream(path)), reader);
tableModel.setHits(hits, progressSearch, reader);
reader.close();
Rectangle bounds = resultsTable.getCellRect(0, 0, true);
resultsPane.getViewport().setViewPosition(bounds.getLocation());
