What determines that a GSI Index should be updated after a CUD operation?

What is the exact condition(s) used to determine that a particular index needs to be recalculated after an insert/update/delete query? If an index was created with a “WHERE” clause, is that what is used? I tried to find this information but could not. It is important to know when designing index strategies.

Thanks!

Index WHERE condition tells which documents to index. After mutation if index has where condition and it evaluated to true then it will qualify for indexing. If Index where condition evaluates false it will not qualify for indexing.
If there is no WHERE clause all documents are qualified for indexing.
When leading index key is NOT MISSING then only it qualifies for indexing.