Class IndexedField<I,T>

java.lang.Object
com.google.gerrit.index.IndexedField<I,T>
Type Parameters:
I - input type from which documents are created and search results are returned.
T - type that should be extracted from the input object when converting to an index document.

public abstract class IndexedField<I,T> extends Object
Definition of a field stored in the secondary index.

Each IndexedField, stored in index, may have multiple IndexedField<I,T>.SearchSpec which defines how it can be searched and how the index tokens are generated.

Index implementations may choose to store IndexedField and IndexedField<I,T>.SearchSpec (search tokens) separately, however IndexedQuery always issues the queries to IndexedField<I,T>.SearchSpec.

This allows index implementations to store IndexedField once, while enabling multiple tokenization strategies on the same IndexedField with IndexedField<I,T>.SearchSpec

  • Field Details

    • INTEGER_TYPE

      public static final com.google.common.reflect.TypeToken<Integer> INTEGER_TYPE
    • ITERABLE_INTEGER_TYPE

      public static final com.google.common.reflect.TypeToken<Iterable<Integer>> ITERABLE_INTEGER_TYPE
    • LONG_TYPE

      public static final com.google.common.reflect.TypeToken<Long> LONG_TYPE
    • ITERABLE_LONG_TYPE

      public static final com.google.common.reflect.TypeToken<Iterable<Long>> ITERABLE_LONG_TYPE
    • STRING_TYPE

      public static final com.google.common.reflect.TypeToken<String> STRING_TYPE
    • ITERABLE_STRING_TYPE

      public static final com.google.common.reflect.TypeToken<Iterable<String>> ITERABLE_STRING_TYPE
    • BYTE_ARRAY_TYPE

      public static final com.google.common.reflect.TypeToken<byte[]> BYTE_ARRAY_TYPE
    • ITERABLE_BYTE_ARRAY_TYPE

      public static final com.google.common.reflect.TypeToken<Iterable<byte[]>> ITERABLE_BYTE_ARRAY_TYPE
    • TIMESTAMP_TYPE

      public static final com.google.common.reflect.TypeToken<Timestamp> TIMESTAMP_TYPE
  • Constructor Details

    • IndexedField

      public IndexedField()
  • Method Details