Class CustomFieldsVisitor

java.lang.Object
org.apache.lucene.index.StoredFieldVisitor
org.elasticsearch.index.fieldvisitor.FieldsVisitor
org.elasticsearch.index.fieldvisitor.CustomFieldsVisitor

public class CustomFieldsVisitor extends FieldsVisitor
A field visitor that allows to load a selection of the stored fields by exact name or by pattern. Supported pattern styles: "xxx*", "*xxx", "*xxx*" and "xxx*yyy". The Uid field is always loaded. The class is optimized for source loading as it is a common use case.
  • Constructor Details

    • CustomFieldsVisitor

      public CustomFieldsVisitor(Set<String> fields, boolean loadSource)
  • Method Details

    • needsField

      public org.apache.lucene.index.StoredFieldVisitor.Status needsField(org.apache.lucene.index.FieldInfo fieldInfo)
      Overrides:
      needsField in class FieldsVisitor