Interface ValueIndexer


public interface ValueIndexer
An indexer on field based values.

Additionally provides constants of common field names. The usage of these names is not compulsory, but will ensure a better usability for drill down and search refinement purposes.

Since:
4.2.427
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    Field name for language independent information representing the value.
    static final String
    Field name for language dependent information representing the value.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    append(String name, String value)
    Appends the given textual value for indexing with respect to the defined field name.
    boolean
    appendAssociate(Associate associate, Language language, boolean followAssociations)
    Appends the given associate, to consolidate changes between the data and the associate.
    void
    appendDate(String name, Date value)
    Appends the given date value for indexing with respect to the defined field name.
    void
    appendFormData(FormData formData, Language language, boolean followAssociations)
    Appends the given form data content for indexing.
    void
    appendNumber(String name, Number value)
    Appends the given number value for indexing with respect to the defined field name.
    boolean
    associate(Entity entity)
    Associate an entity with the value under indexing, so that if the entity changes, the value will be updated wrt. its index entry.
  • Field Details

    • KEY_FIELD

      static final String KEY_FIELD
      Field name for language independent information representing the value.

      Note: Values appended as "key" will additionally be appended to a generic indexing field eligible for the standard field-based search.

      Since:
      4.2.427
      See Also:
    • VALUE_FIELD

      static final String VALUE_FIELD
      Field name for language dependent information representing the value.

      Note: Values appended as "value" will additionally be appended to a generic indexing field eligible for the standard field-based search.

      Since:
      4.2.427
      See Also:
  • Method Details

    • append

      void append(@NotNull String name, @Nullable String value)
      Appends the given textual value for indexing with respect to the defined field name. To make a field eligible for standard field-based search, make use of the related field names for keys and values.
      Parameters:
      name - The name to append the value for.
      value - The value to be appended.
      Since:
      4.2.427
      See Also:
    • appendDate

      void appendDate(@NotNull String name, @Nullable Date value)
      Appends the given date value for indexing with respect to the defined field name. Will also forward to append(String,String) forstoring a textual version of the date in a fixed format.
      Parameters:
      name - The name to append the value for.
      value - The value to be appended.
      Since:
      5.0.100
    • appendNumber

      void appendNumber(@NotNull String name, @Nullable Number value)
      Appends the given number value for indexing with respect to the defined field name. Will also forward to append(String,String) forstoring a textual version of the number.
      Parameters:
      name - The name to append the value for.
      value - The value to be appended.
      Since:
      5.0.100
    • appendFormData

      void appendFormData(@NotNull FormData formData, @NotNull Language language, boolean followAssociations)
      Appends the given form data content for indexing.
      Parameters:
      formData - The form data container providing further content.
      language - The language to collect data in.
      followAssociations - Indicates whether to follow associations within the data for building the index.
      Since:
      5.2.12
    • appendAssociate

      boolean appendAssociate(@NotNull Associate associate, @NotNull Language language, boolean followAssociations)
      Appends the given associate, to consolidate changes between the data and the associate. The recursive flag indicates to follow inner references of associated data. The return value indicates, whether the associate was accepted for appending or not.
      Parameters:
      associate - The associate to append to the index data.
      language - The language to collect data in.
      followAssociations - Indicates whether to follow associations within the data for building the index.
      Since:
      5.2.12
    • associate

      boolean associate(@NotNull Entity entity)
      Associate an entity with the value under indexing, so that if the entity changes, the value will be updated wrt. its index entry.
      Parameters:
      entity - The entity being associated with the value.
      Returns:
      true, if the entity was accepted for association.
      Since:
      4.2.427