數(shù)值索引IntPoint
對(duì)數(shù)值進(jìn)行從小到大排序戈稿,從排序后的點(diǎn)數(shù)據(jù)中取前一半的點(diǎn)數(shù)據(jù)劃為左子樹(節(jié)點(diǎn)2)大刊,剩余的劃為右子樹(節(jié)點(diǎn)3)鬼悠。繼續(xù)對(duì)節(jié)點(diǎn)2的數(shù)據(jù)進(jìn)行取前一半的點(diǎn)數(shù)據(jù)劃為左子樹(節(jié)點(diǎn)4)和右子樹(節(jié)點(diǎn)5)债鸡,同理對(duì)節(jié)點(diǎn)2的數(shù)據(jù)劃為左子樹(節(jié)點(diǎn)6)和右子樹(節(jié)點(diǎn)7)。
右子樹的數(shù)值比左子樹大庸论,進(jìn)行查詢過濾時(shí)职辅,可以快速定位到數(shù)節(jié)點(diǎn)范圍,再進(jìn)行精準(zhǔn)判斷聂示。
Bkd-Tree作為一種基于K-D-B-tree的索引結(jié)構(gòu)域携,用來對(duì)多維度的點(diǎn)數(shù)據(jù)(multi-dimensional point data)集進(jìn)行索引
https://www.amazingkoala.com.cn/Lucene/gongjulei/2019/0422/52.html
IndexSearcher --->?TopDocs searchAfter() -->Collector search()--->CollectorManager<TopScoreDocCollector, TopDocs> manager -->??TopScoreDocCollector create() -->?TopScoreDocCollector newCollector() -->?search(List<LeafReaderContext> leaves) -->BulkScorer scorer = weight.bulkScorer(ctx) (獲取召回結(jié)果)--> BulkScorer.score(leafCollector) -->Weight.scoreAll()(獲取準(zhǔn)確的召回結(jié)果) -->?collector.collect(doc) -->?TopScoreDocCollector.topDocs()