Enum Index.Density

java.lang.Object
java.lang.Enum<Index.Density>
com.google.firestore.admin.v1.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 Details

    • DENSITY_UNSPECIFIED

      public static final Index.Density DENSITY_UNSPECIFIED
       Unspecified. It will use database default setting. This value is input
       only.
       
      DENSITY_UNSPECIFIED = 0;
    • SPARSE_ALL

      public static final Index.Density 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

      public static final Index.Density 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

      public static final Index.Density 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

      public static final Index.Density UNRECOGNIZED
  • Field Details

    • DENSITY_UNSPECIFIED_VALUE

      public static final int DENSITY_UNSPECIFIED_VALUE
       Unspecified. 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_VALUE
       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;
      See Also:
    • SPARSE_ANY_VALUE

      public static final int SPARSE_ANY_VALUE
       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;
      See Also:
    • DENSE_VALUE

      public static final int DENSE_VALUE
       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;
      See Also:
  • Method Details

    • values

      public static Index.Density[] 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

      public static Index.Density valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • getNumber

      public final int getNumber()
      Specified by:
      getNumber in interface com.google.protobuf.Internal.EnumLite
      Specified by:
      getNumber in interface com.google.protobuf.ProtocolMessageEnum
    • valueOf

      @Deprecated public static Index.Density valueOf(int value)
      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 name
      NullPointerException - if the argument is null
    • forNumber

      public static Index.Density forNumber(int value)
      Parameters:
      value - The numeric wire value of the corresponding enum entry.
      Returns:
      The enum associated with the given numeric wire value.
    • internalGetValueMap

      public static com.google.protobuf.Internal.EnumLiteMap<Index.Density> internalGetValueMap()
    • getValueDescriptor

      public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor()
      Specified by:
      getValueDescriptor in interface com.google.protobuf.ProtocolMessageEnum
    • getDescriptorForType

      public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.ProtocolMessageEnum
    • getDescriptor

      public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor()
    • valueOf

      public static Index.Density valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc)
      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 name
      NullPointerException - if the argument is null