Package com.google.firestore.admin.v1
Enum Index.Density
- All Implemented Interfaces:
com.google.protobuf.Internal.EnumLite,com.google.protobuf.ProtocolMessageEnum,Serializable,Comparable<Index.Density>
- Enclosing class:
- Index
public static enum Index.Density
extends Enum<Index.Density>
implements com.google.protobuf.ProtocolMessageEnum
The density configuration for the index.Protobuf enum
google.firestore.admin.v1.Index.Density-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionAn index entry will exist regardless of if the fields are present or not.Unspecified.An index entry will only exist if ALL fields are present in the document.An index entry will exist if ANY field are present in the document. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intAn index entry will exist regardless of if the fields are present or not.static final intUnspecified.static final intAn index entry will only exist if ALL fields are present in the document.static final intAn index entry will exist if ANY field are present in the document. -
Method Summary
Modifier and TypeMethodDescriptionstatic Index.DensityforNumber(int value) static com.google.protobuf.Descriptors.EnumDescriptorfinal com.google.protobuf.Descriptors.EnumDescriptorfinal intfinal com.google.protobuf.Descriptors.EnumValueDescriptorstatic com.google.protobuf.Internal.EnumLiteMap<Index.Density>static Index.DensityvalueOf(int value) Deprecated.static Index.DensityvalueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) Returns the enum constant of this type with the specified name.static Index.DensityReturns the enum constant of this type with the specified name.static Index.Density[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
DENSITY_UNSPECIFIED
Unspecified. It will use database default setting. This value is input only.
DENSITY_UNSPECIFIED = 0; -
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 `ANY_API` and Cloud Datastore `DATASTORE_MODE_API`). Take for example the following document: ``` { "__name__": "...", "a": 1, "b": 2, "c": 3 } ``` an index on `(a ASC, b ASC, c ASC, __name__ ASC)` will generate an index entry for this document since `a`, 'b', `c`, and `__name__` are all present but an index of `(a ASC, d ASC, __name__ ASC)` will not generate an index entry for this document since `d` is missing. 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_ALL = 1; -
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: ``` { "__name__": "...", "a": 1, "b": 2, "c": 3 } ``` an index on `(a ASC, d ASC)` will generate an index entry for this document since `a` is present, and will fill in an `unset` value for `d`. An index on `(d ASC, e ASC)` will not generate any index entry as neither `d` nor `e` are present. An index that contains `__name__` will generate an index entry for all documents since Firestore guarantees that all documents have a `__name__` field.SPARSE_ANY = 2; -
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 `unset` values for fields that are not present in the document.
DENSE = 3; -
UNRECOGNIZED
-
-
Field Details
-
DENSITY_UNSPECIFIED_VALUE
public static final int DENSITY_UNSPECIFIED_VALUEUnspecified. It will use database default setting. This value is input only.
DENSITY_UNSPECIFIED = 0;- See Also:
-
SPARSE_ALL_VALUE
public static final int SPARSE_ALL_VALUEAn 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 `ANY_API` and Cloud Datastore `DATASTORE_MODE_API`). Take for example the following document: ``` { "__name__": "...", "a": 1, "b": 2, "c": 3 } ``` an index on `(a ASC, b ASC, c ASC, __name__ ASC)` will generate an index entry for this document since `a`, 'b', `c`, and `__name__` are all present but an index of `(a ASC, d ASC, __name__ ASC)` will not generate an index entry for this document since `d` is missing. 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_ALL = 1;- See Also:
-
SPARSE_ANY_VALUE
public static final int SPARSE_ANY_VALUEAn 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: ``` { "__name__": "...", "a": 1, "b": 2, "c": 3 } ``` an index on `(a ASC, d ASC)` will generate an index entry for this document since `a` is present, and will fill in an `unset` value for `d`. An index on `(d ASC, e ASC)` will not generate any index entry as neither `d` nor `e` are present. An index that contains `__name__` will generate an index entry for all documents since Firestore guarantees that all documents have a `__name__` field.SPARSE_ANY = 2;- See Also:
-
DENSE_VALUE
public static final int DENSE_VALUEAn 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 `unset` values for fields that are not present in the document.
DENSE = 3;- See Also:
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
getNumber
public final int getNumber()- Specified by:
getNumberin interfacecom.google.protobuf.Internal.EnumLite- Specified by:
getNumberin interfacecom.google.protobuf.ProtocolMessageEnum
-
valueOf
Deprecated.Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
value- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
forNumber
- Parameters:
value- The numeric wire value of the corresponding enum entry.- Returns:
- The enum associated with the given numeric wire value.
-
internalGetValueMap
-
getValueDescriptor
public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor()- Specified by:
getValueDescriptorin interfacecom.google.protobuf.ProtocolMessageEnum
-
getDescriptorForType
public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType()- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.ProtocolMessageEnum
-
getDescriptor
public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() -
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
desc- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-