Possible to see if a view is indexed before accessing it?

Hi all,I’ve build code to get an overview of the document sizes over time in a mailfile. I use two possible methods for this:

  1. Walk the viewentries of the All documents view (if this view is untampered with)

  2. Walk the db.AllDocuments collection if method 1 doesn’t work

Obviously method 1 is faster, but only if the all documents view is indexed. Another unwanted side effect is that by accessing the All documents view in each mailfile it gets indexed if it wasn’t and thus the size of the mailfile grows. I therefore would need a way to determine if a view is indexed before accessing it. Does anyone know if this is possible?

Subject: Possible to see if a view is indexed before accessing it?

Would simply using NotesDatabase.Size be good enough? Certainly would be the fastest approach.

Well … a view itself is never indexed, a database is. Use db.LastFTIndexed.

Similarly, I have found that the following helps to ensure that the FTI is up-to-date before doing a search. I added it to any code which does FT searches.

If (db.LastModified > db.LastFTIndexed) Then Call db.UpdateFTIndex(False)