Interface SchemaFieldDefs.Getter<I,T>

Type Parameters:
I - type from which documents are created and search results are returned.
T - type that should be extracted from the input object to an index field.
Enclosing class:
SchemaFieldDefs
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public static interface SchemaFieldDefs.Getter<I,T>
Getter to extract value that should be stored in index from the input object.

This interface allows to specify a method or lambda for populating an index field. Note that for existing fields, changing the code of either the SchemaFieldDefs.Getter implementation or the method(s) that it calls would invalidate existing index data. Therefore, instead of changing the semantics of an existing field, a new field must be added using the new semantics from the start. The old field can be removed in another upgrade step (cf. com.google.gerrit.index.IndexUpgradeValidator).

  • Method Summary

    Modifier and Type
    Method
    Description
    get(I input)