public Searcher() throws IOException {
  searcher=new IndexSearcher(DirectoryReader.open(FSDirectory.open(Paths.get(INDEX_DIR))));
  parser=new QueryParser(CONTENT_FIELD,new StandardAnalyzer());
}

public Searcher ( ) throws IOException { searcher = new IndexSearcher ( DirectoryReader . open ( FSDirectory . open ( Paths . get ( INDEX_DIR ) ) ) ) ; parser = new QueryParser ( CONTENT_FIELD , new StandardAnalyzer ( ) ) ; }
creates a new instance of searchengine
