Domino Code Fragment
Code Name* unprocessedFTSearch method | Date* 04/29/2024 | Source (or email address if you prefer)* Rlatulippe@romac.com IP address:.3.142.12.240 | |
Description* This agent runs on all or selected documents. It puts all documents that contain the word "botany" in the folder "Botanist's Delight." | Type* Java | Categories* (Misc) |
Implementation: | Required Client: | Server: |
Limitations: | Comments: |
public class unprocessedftsearchagent extends AgentBase
{
public void NotesMain()
{
try
{
Session s = getSession();
AgentContext ac = s.getAgentContext();
DocumentCollection dc = ac.unprocessedFTSearch
("botany", 0, Database.FT_SCORES,
Database.FT_STEMS+Database.FT_THESAURUS);
Document doc;
int size = dc.getCount();
System.out.println("Count = " + size);
for (int i = 1; i <= size; i++)
{
doc = dc.getNthDocument(i);
doc.putInFolder("Botanist's Delight");
System.out.println
(i + " *** " + doc.getItemValue("Subject"));
}
}
catch (Exception e)
{
e.printStackTrace();
}
}
}