Package uk.ac.cam.ch.wwmm.oscar3.indexersearcher

Examples of uk.ac.cam.ch.wwmm.oscar3.indexersearcher.LuceneIndexerSearcher.addDirectory()


      response.setContentType("text/plain");
      PrintWriter out = response.getWriter();
      try {
        indexerSearcher = new LuceneIndexerSearcher(true);
        indexerSearcher.addScrapBook();
        indexerSearcher.addDirectory(new File(Oscar3Props.getInstance().workspace, "corpora"), out);
        out.println("Indexed entire workspace OK");
      } catch (Exception e) {
        out.println("Yikes, that didn't work!");
      }
      return;   
View Full Code Here


      response.setContentType("text/plain");
      PrintWriter out = response.getWriter();
      try {
        File activeCorpus = new File(new File(Oscar3Props.getInstance().workspace, "corpora"), request.getParameter("setcorpus"));
        indexerSearcher = new LuceneIndexerSearcher(true);
        indexerSearcher.addDirectory(activeCorpus, new PrintWriter(System.out, true));
        out.println("Corpus changed to " + request.getParameter("setcorpus") + " OK!");
      } catch (Exception e) {
        e.printStackTrace();
        out.println("Yikes, that didn't work!");
      }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.