Skip to main content
    Country/region select      Terms of use
     Home      Products      Services & solutions      Support & downloads      My account     

developerWorks  >  Lotus  >  Forums & community  >  Best Practice Makes Perfect

Best Practice Makes Perfect

A collaboration with Domino developers about how to do it and how to get it right in Domino

Charles Robinson writes:

I remember reading on Notes.Net that using db.Search({criteria}, Nothing, 0) was much less efficient than using db.Search({criteria},SomeDate,0).  Specifying something for the date -- even one far into the future -- reduced search times by some incredible amount.

Interesting; I hadn't heard that one. Do we have any volunteers to test it?

I asked this on the original thread, and I'm bringing it up again because no one responded.  In my experience the UnprocessedDocuments flag for an agent gets reset when the agent is saved.  For example, run an agent that acts on UnprocessedDocuments, edit it and re-save.  It will process the same documents again.  Was I doing something wrong, has it changed in more recent versions, or is that working as designed?

Assuming you're talking about a "New and modified documents" target, that's what's supposed to happen.

Finally, in most cases that I would use a document selection formula in an agent I need something like "[Job] Does Not Contain "" ".  How do you specify you only want to include documents that have any value in a field?  I usually end up with an agent that runs on all documents and something like this:
SELECT Form = "Pirate" & Job != ""
Inefficient, I know, but it's the only way I know of to get the documents I need.

Use "is present," e.g. ([form] = "Pirate") and ([job] is present)

It's not documented, and I found out about it relatively recently myself. I made them add it to the online help for version 8.0, in the document titled "Refining a search query using operators."

Andre Guirard | 13 April 2007 11:12:21 AM ET | Nicolin B&B, Jordan, MN, USA | Comments (9)

Search this blog 


    About IBM Privacy Contact