The density configuration for the index.
| Enums | |
|---|---|
DENSITY_UNSPECIFIED
|
Unspecified. It will use database default setting. This value is input only. |
SPARSE_ALL
|
An index entry will only exist if ALL fields are present in the document. This is both the default and only allowed value for Standard Edition databases (for both Cloud Firestore Take for example the following document:
an index on This means that such indexes can only be used to serve a query when the query has either implicit or explicit requirements that all fields from the index are present. |
SPARSE_ANY
|
An index entry will exist if ANY field are present in the document. This is used as the definition of a sparse index for Enterprise Edition databases. Take for example the following document:
an index on An index that contains |
DENSE
|
An index entry will exist regardless of if the fields are present or not. This is the default density for an Enterprise Edition database. The index will store |

