When exactly does a view index get refreshed?

HelloWhen does view refreshing actually happen?

If edit a document and simply change a field and save the document. Then if I go into a view which displays that field, the view shows the new value of the updated field.

So does that mean the view index has been completely rebuilt and automatically?

If the view is completely rebuilt after one change in one document then rebuilding the view could take a long time if the view displays info from many thousands of documents. Is this done completly automatically.

And if this is the case, why is it bad to but time base @formulae in the view’s selection formular when the view needs to be rebuilt anyway (to show any normal document changes)

Any info to make this clearer would be gratefully received.

Cheers.

Subject: When exactly does a view index get refreshed?

When someone displays a view, or refreshes an open view, or edits a document from a view they have open, Notes refreshes the view index.

What that means is that Notes looks for all documents that have been changed since the view index was last refreshed, and rebuilds the view index records for those documents only. There’s a presumption here that if a document has not been changed, then it’s index is still correct, and does not need to be refreshed.

(This is different then Rebuilding the index, which is where the index is discarded, and all documents in the database are processed to rebuild the index.)

Putting time-based (@Now or @Today) into a view negates that presumption, and a full rebuild is needed foir all documents, which is why it’s generally not a good idea.

Subject: Many thanks Graham. That makes sense. Cheers.