JAVA/CORBA CLASSES


Examples: FTSearchScore property
This agent gets the search score for each document returned by a full-text search.

import lotus.domino.*;
import java.util.Vector;
public class JavaAgent extends AgentBase {
 public void NotesMain() {
   try {
     Session session = getSession();
     AgentContext agentContext = session.getAgentContext();
     // (Your code goes here)
     Database db = agentContext.getCurrentDatabase();
     DocumentCollection dc = db.FTSearch("blue", 0);
     if (dc.getCount() == 0)
       System.out.println("No \"blue\"");
     else {
       System.out.println("\"blue\" hits");
       Document doc = dc.getFirstDocument();
       while (doc != null) {
         System.out.println(doc.getFTSearchScore() +
         "\t" + doc.getItemValueString("Subject"));
         doc = dc.getNextDocument(doc);
         }
       }
 
   } catch(Exception e) {
     e.printStackTrace();
   }
 }
}