Enum ReindexOnUpdate

    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      DEFAULT
      Default behavior: updates to the targeted value will trigger automatic reindexing if it's actually used in the indexing process of an indexed entity, unless a property on the path from the indexed entity to the targeted value prevents it through a different ReindexOnUpdate setting.
      NO
      Updates to the targeted value, or to any "nested" value (values that are accessed through the targeted value), will never trigger automatic reindexing.
      SHALLOW
      Updates to the targeted value will trigger automatic reindexing if it's actually used in the indexing process of an indexed entity, unless a property on the path from the indexed entity to the targeted value prevents it through a different ReindexOnUpdate setting.
    • Enum Constant Detail

      • DEFAULT

        public static final ReindexOnUpdate DEFAULT
        Default behavior: updates to the targeted value will trigger automatic reindexing if it's actually used in the indexing process of an indexed entity, unless a property on the path from the indexed entity to the targeted value prevents it through a different ReindexOnUpdate setting.

        To be precise:

        • If an indexed entity accesses the targeted value indirectly (e.g. through an @IndexedEmbedded), and a property in the path from the indexed entity to the targeted value was assigned NO, then updates to the targeted value will not automatically trigger reindexing of the indexed entity.
        • If an indexed entity A accesses the targeted value indirectly (e.g. through an @IndexedEmbedded), and a property in the path from the indexed entity to the targeted value was assigned SHALLOW, and the targeted value is owned by a different entity B, then updates to the targeted value will not automatically trigger reindexing of the indexed entity A.
        • Otherwise, assuming the targeted value is actually used in the indexing process of an indexed entity, either directly (e.g. @GenericField) or indirectly (e.g. through @IndexedEmbedded), then updates to the targeted value will automatically trigger reindexing of the indexed entity.
      • SHALLOW

        public static final ReindexOnUpdate SHALLOW
        Updates to the targeted value will trigger automatic reindexing if it's actually used in the indexing process of an indexed entity, unless a property on the path from the indexed entity to the targeted value prevents it through a different ReindexOnUpdate setting.

        However, updates to "nested" values (values that are accessed through the targeted value) will only trigger automatic reindexing if the "nested" value is owned by the same entity as the targeted value. When the path from the targeted value to the "nested" values crosses entity boundaries, the reindex-on-update behavior automatically switches to NO.

        Applications relying on this setting should have periodic batch processes in place to refresh the index of affected entities in case "nested" values changed.

      • NO

        public static final ReindexOnUpdate NO
        Updates to the targeted value, or to any "nested" value (values that are accessed through the targeted value), will never trigger automatic reindexing.

        Applications relying on this setting should have periodic batch processes in place to refresh the index of affected entities in case the targeted value changed.

    • Method Detail

      • values

        public static ReindexOnUpdate[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (ReindexOnUpdate c : ReindexOnUpdate.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static ReindexOnUpdate 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