Package org.openntf.domino.helpers

Examples of org.openntf.domino.helpers.DocumentScanner.processDocument()


    scanner.setIgnoreDollar(true);

    Database db = Factory.getSession().getCurrentDatabase();
    View contacts = db.getView("AllContacts");
    for (ViewEntry ent : contacts.getAllEntries()) {
      scanner.processDocument(ent.getDocument());
    }

    ExtLibUtil.getViewScope().put("scannerFieldTokenMap", scanner.getFieldTokenMap());
    ExtLibUtil.getViewScope().put("scannerFieldValueMap", scanner.getFieldValueMap());
    ExtLibUtil.getViewScope().put("scannerFieldTypeMap", scanner.getFieldTypeMap());
View Full Code Here


      Session s = Factory.getSession();
      Database db = s.getDatabase("", "help/help9_admin.nsf");
      System.out.println("Beginning scan of " + db.getApiPath());
      for (Document doc : db.getAllDocuments()) {
        scanner.processDocument(doc);
        docCount++;
      }

      System.out.println("Scanner reports processing " + scanner.getDocCount() + " documents, " + scanner.getItemCount()
          + " items, and " + scanner.getTokenCount() + " tokens.");
View Full Code Here

  public Map<?, ?> scanDatabase(final org.openntf.domino.Database db) {
    // DocumentScanner looks at values of all string-based items in a document
    DocumentScanner scanner = new DocumentScanner();
    for (org.openntf.domino.Document doc : db.getAllDocuments()) {
      scanner.processDocument(doc);
    }
    // The FieldTokenMap returns a Map with a key of the item name, and a sorted set of the unique strings in each of those items
    // Sample uses: Predictive typeahead, custom indexing, external term matching
    return scanner.getFieldTokenMap();
  }
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.