Class IndexingChain

  • All Implemented Interfaces:
    Accountable

    final class IndexingChain
    extends java.lang.Object
    implements Accountable
    Default general purpose indexing chain, which handles indexing all types of fields.
    • Method Detail

      • onAbortingException

        private void onAbortingException​(java.lang.Throwable th)
      • getDocValuesLeafReader

        private LeafReader getDocValuesLeafReader()
      • writePoints

        private void writePoints​(SegmentWriteState state,
                                 Sorter.DocMap sortMap)
                          throws java.io.IOException
        Writes all buffered points.
        Throws:
        java.io.IOException
      • abort

        void abort()
            throws java.io.IOException
        Throws:
        java.io.IOException
      • rehash

        private void rehash()
      • startStoredFields

        private void startStoredFields​(int docID)
                                throws java.io.IOException
        Calls StoredFieldsWriter.startDocument, aborting the segment if it hits any exception.
        Throws:
        java.io.IOException
      • finishStoredFields

        private void finishStoredFields()
                                 throws java.io.IOException
        Calls StoredFieldsWriter.finishDocument, aborting the segment if it hits any exception.
        Throws:
        java.io.IOException
      • processDocument

        void processDocument​(int docID,
                             java.lang.Iterable<? extends IndexableField> document)
                      throws java.io.IOException
        Throws:
        java.io.IOException
      • oversizeDocFields

        private void oversizeDocFields()
      • initializeFieldInfo

        private void initializeFieldInfo​(IndexingChain.PerField pf)
                                  throws java.io.IOException
        Throws:
        java.io.IOException
      • processField

        private boolean processField​(int docID,
                                     IndexableField field,
                                     IndexingChain.PerField pf)
                              throws java.io.IOException
        Index each field Returns true, if we are indexing a unique field with postings
        Throws:
        java.io.IOException
      • verifyUnIndexedFieldType

        private static void verifyUnIndexedFieldType​(java.lang.String name,
                                                     IndexableFieldType ft)
      • validateMaxVectorDimension

        private static void validateMaxVectorDimension​(java.lang.String fieldName,
                                                       int vectorDim,
                                                       int maxVectorDim)
      • validateIndexSortDVType

        private void validateIndexSortDVType​(Sort indexSort,
                                             java.lang.String fieldToValidate,
                                             DocValuesType dvType)
                                      throws java.io.IOException
        Throws:
        java.io.IOException
      • ramBytesUsed

        public long ramBytesUsed()
        Description copied from interface: Accountable
        Return the memory usage of this object in bytes. Negative values are illegal.
        Specified by:
        ramBytesUsed in interface Accountable
      • getChildResources

        public java.util.Collection<Accountable> getChildResources()
        Description copied from interface: Accountable
        Returns nested resources of this class. The result should be a point-in-time snapshot (to avoid race conditions).
        Specified by:
        getChildResources in interface Accountable
        See Also:
        Accountables