segment(段)的信息
该类比较简单,贴出其全部代码
import org.apache.lucene.store.Directory;
final class SegmentInfo {
public String name; //在索引目录中唯一的名称
public int docCount; // 该段中doc的数目
public Directory dir; // 该段所存在的Dirrectory
public SegmentInfo(String name, int docCount, Directory dir) {
this.name = name;
this.docCount = docCount;
this.dir = dir;
}
}