How do you specify a key array, where one of the keys has multiple items, in a GetAllDocumentsByKey

Posted on 2006-05-04
Last Modified: 2013-12-18
Good day, goede dag, selamat siang y'all,

OK the preliminaries - I'm on R5.0.12. Now the details - I have the following key array but one of the entries in the key aray I'd like tested for multiple entries. How would I go about doing this so that my collection does not come back with zero documents? Can I only test for one item in each entry? The view in question has the appropriate columns sorted and I cannot change this view. The first column contains the server name categorized, the second column contains the server status, Production, Development, Test or Inactive, also categorized.

Dim collection as NotesDocumentCollection
Dim keyarray (1 to 2) As String

keyarray(1) = "Servername"
keyarray(2) = "Production, Development"  <-- I'd like to be able to get documents that have these 2 statuses

Set collection = view.GetAllDocumentsByKey(keyarray, True)

Will I have to basically change out the value for keyarray(2) to get both sets of documents? Or will I have to cycle through replacing keyarray(2) with each status that I want?

Thanks, dank u, terima kasih, y'all
Question by:notesrookie
    LVL 19

    Accepted Solution

    u can use Search for this...look into
    LVL 46

    Expert Comment

    by:Sjef Bosman
    Or FTSearch ...

    Author Comment

    I liked both your suggestions but used madheeswar's to implement. Thanks.
    LVL 46

    Expert Comment

    by:Sjef Bosman
    You'll regret it, when your database gets large... ;)

    Author Comment

    so is the FTSearch is more efficient?
    LVL 46

    Expert Comment

    by:Sjef Bosman
    It's like comparing a rowing boat and a speedboat: db.Search is ready when you are, for an db.FTSearch you have to do more, there is a price to pay, but it is a lot faster.

    + immediately available
    + view-like syntax (easy)
    - always goes though entire database sequentially (view-like, first time)
    - "fixed": limited syntax and queries

    - requires full-text index to be built and maintained (additional overhead, larger database)
    - more complex syntax
    + fast
    + will allow full-text queries as well (anywhere in the document)
    + once full-text indexed, every new query is quick (depends on the complexity)

    If queries are to be done quite (daily) and the database is likely to grow to thousands of documents, or you always need a quick response, then use FTSearch. If there's an occasional query that doesn't have to be available rightaway, then use Search.

    Featured Post

    What Security Threats Are You Missing?

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    Join & Write a Comment

    For users on the Lotus Notes 8 Standard client, this article provides information on checking the Java Heap size and adjusting it to half of your system RAM in attempt to get the Lotus Notes 8.x Standard client to run faster.  I've had to exercise t…
    This article covers general Notes 8.5 troubleshooting information including recreating the Notes\Data folder.
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

    754 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now