org.apache.lucene.index

Class FieldInfos

    • Constructor Detail

      • FieldInfos

        public FieldInfos(FieldInfo[] infos)
        Constructs a new FieldInfos from an array of FieldInfo objects
    • Method Detail

      • hasFreq

        public boolean hasFreq()
        Returns true if any fields have freqs
      • hasProx

        public boolean hasProx()
        Returns true if any fields have positions
      • hasPayloads

        public boolean hasPayloads()
        Returns true if any fields have payloads
      • hasOffsets

        public boolean hasOffsets()
        Returns true if any fields have offsets
      • hasVectors

        public boolean hasVectors()
        Returns true if any fields have vectors
      • hasNorms

        public boolean hasNorms()
        Returns true if any fields have norms
      • hasDocValues

        public boolean hasDocValues()
        Returns true if any fields have DocValues
      • hasPointValues

        public boolean hasPointValues()
        Returns true if any fields have PointValues
      • size

        public int size()
        Returns the number of fields
      • fieldInfo

        public FieldInfo fieldInfo(String fieldName)
        Return the fieldinfo object referenced by the field name
        Returns:
        the FieldInfo object or null when the given fieldName doesn't exist.
      • fieldInfo

        public FieldInfo fieldInfo(int fieldNumber)
        Return the fieldinfo object referenced by the fieldNumber.
        Parameters:
        fieldNumber - field's number.
        Returns:
        the FieldInfo object or null when the given fieldNumber doesn't exist.
        Throws:
        IllegalArgumentException - if fieldNumber is negative