Interface DerivedFieldResolver

All Known Implementing Classes:
DefaultDerivedFieldResolver, NoOpDerivedFieldResolver

@PublicApi(since="2.15.0") public interface DerivedFieldResolver
DerivedFieldResolver is used as a lookup to resolve derived fields from their name. It is created per search request and needs to be set at QueryShardContext.setDerivedFieldResolver(DerivedFieldResolver) for derived fields resolution.
  • Method Summary

    Modifier and Type
    Method
    Description
    resolve(String fieldName)
    Resolves the MappedFieldType associated with a derived field
    Resolves all derived fields matching a given pattern.
  • Method Details

    • resolvePattern

      Set<String> resolvePattern(String pattern)
      Resolves all derived fields matching a given pattern. It includes derived fields defined both in search requests and index mapping.
      Parameters:
      pattern - regex pattern
      Returns:
      all derived fields matching the pattern
    • resolve

      MappedFieldType resolve(String fieldName)
      Resolves the MappedFieldType associated with a derived field
      Parameters:
      fieldName - field name to lookup
      Returns:
      mapped field type