Package org.sindice.siren.demo

Examples of org.sindice.siren.demo.SimpleIndexer.addDocument()


      final LineIterator it = FileUtils.lineIterator(BNB_PATH);
      while (it.hasNext()) {
        final String id = Integer.toString(counter++);
        final String content = (String) it.next();
        logger.info("Indexing document {}", id);
        indexer.addDocument(id, content);
      }
      LineIterator.closeQuietly(it);
      logger.info("Commiting all pending documents");
      indexer.commit();
    }
View Full Code Here


      while (it.hasNext()) {
        final File file = it.next();
        final String id = file.getName().toString();
        final String content = FileUtils.readFileToString(file);
        logger.info("Indexing document {}", id);
        indexer.addDocument(id, content);
      }
      logger.info("Commiting all pending documents");
      indexer.commit();
    }
    finally {
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.