开始

开始

方法四

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

方法三

DirectoryReader openIfChanged(DirectoryReader oldReader, IndexWriter writer)

是否IndexWriter相等

并且作用删除信息?

u5_seg0 u5_seg1 u5_seg2 u5_seg3
u6_seg0 u6_seg1 u6_seg2 u6_seg3

根据IndexWriter判断

索引是否发生变化?

u8_seg0 u8_seg1 u8_seg2

根据IndexWriter获取新的

StandardDirectoryReader

新旧

StandardDirectoryReader

是否一致?

返回新的

StandardDirectoryReader

u12_seg0 u12_seg1
u13_seg0 u13_seg1

u15_seg0 u15_seg1

根据IndexWriter获取新的

StandardDirectoryReader

u17_seg0 u17_seg1 u17_seg2

结束

返回新的

StandardDirectoryReader

u20_seg0 u20_seg1
u21_seg0 u21_seg1 u21_seg2 u21_seg3

返回null

u23_seg0 u23_seg1 u23_seg2
u24_seg0 u24_seg1 u24_seg2 u24_seg3
u25_seg0 u25_seg1
u26_seg0 u26_seg1 u26_seg2