Class StandardDirectoryReader.ReaderCommit

    • Field Detail

      • segmentsFileName

        private java.lang.String segmentsFileName
      • files

        java.util.Collection<java.lang.String> files
      • generation

        long generation
      • userData

        final java.util.Map<java.lang.String,​java.lang.String> userData
      • segmentCount

        private final int segmentCount
    • Method Detail

      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • getSegmentCount

        public int getSegmentCount()
        Description copied from class: IndexCommit
        Returns number of segments referenced by this commit.
        Specified by:
        getSegmentCount in class IndexCommit
      • getSegmentsFileName

        public java.lang.String getSegmentsFileName()
        Description copied from class: IndexCommit
        Get the segments file (segments_N) associated with this commit point.
        Specified by:
        getSegmentsFileName in class IndexCommit
      • getFileNames

        public java.util.Collection<java.lang.String> getFileNames()
        Description copied from class: IndexCommit
        Returns all index files referenced by this commit point.
        Specified by:
        getFileNames in class IndexCommit
      • getGeneration

        public long getGeneration()
        Description copied from class: IndexCommit
        Returns the generation (the _N in segments_N) for this IndexCommit
        Specified by:
        getGeneration in class IndexCommit
      • delete

        public void delete()
        Description copied from class: IndexCommit
        Delete this commit point. This only applies when using the commit point in the context of IndexWriter's IndexDeletionPolicy.

        Upon calling this, the writer is notified that this commit point should be deleted.

        Decision that a commit-point should be deleted is taken by the IndexDeletionPolicy in effect and therefore this should only be called by its onInit() or onCommit() methods.

        Specified by:
        delete in class IndexCommit