开始

开始

方法四

DirectoryReader openIfChanged(DirectoryReader oldReader, IndexWriter writer, boolean applyAllDeletes)

方法三

DirectoryReader openIfChanged(DirectoryReader oldReader, IndexWriter writer)

是否IndexWriter相等

并且作用删除信息?

u94_seg0 u94_seg1 u94_seg2 u94_seg3
u95_seg0 u95_seg1 u95_seg2 u95_seg3

根据IndexWriter判断

索引是否发生变化?

u97_seg0 u97_seg1 u97_seg2

根据IndexWriter获取新的

StandardDirectoryReader

新旧

StandardDirectoryReader

是否一致?

返回新的

StandardDirectoryReader

u101_seg0 u101_seg1
u102_seg0 u102_seg1

u104_seg0 u104_seg1

根据IndexWriter获取新的

StandardDirectoryReader

u106_seg0 u106_seg1 u106_seg2

结束

返回新的

StandardDirectoryReader

u109_seg0 u109_seg1
u110_seg0 u110_seg1 u110_seg2 u110_seg3

返回null

u112_seg0 u112_seg1 u112_seg2
u113_seg0 u113_seg1 u113_seg2 u113_seg3
u114_seg0 u114_seg1
u115_seg0 u115_seg1 u115_seg2