public static FieldTermsRelation getInstance() { if (cached == null) { lock (typeof(FieldTermsRelation)) { if (cached == null) { cached = new FieldTermsRelation(); cached.open = CurrentIndex.GetCurrentOpendIndex(); } } } return cached; }
/// <summary> /// 计算绑定数据 /// </summary> /// <returns></returns> public ViewData Execute() { ViewData data = new ViewData(); data.IndexPath = open.IndexPath; data.DocumentNum = open.Reader.NumDocs(); data.FieldNum = FieldTermsRelation.getInstance().Fields.Length; data.IsOptimized = open.Reader.IsOptimized(); data.UpdateTime = DateTime.FromBinary(IndexReader.LastModified(open.Reader.Directory())); data.Version = open.Reader.GetVersion(); return(data); }
public static FieldTermsRelation getInstance() { if (cached == null) { lock (typeof(FieldTermsRelation)) { if (cached == null) { cached = new FieldTermsRelation(); cached.open = CurrentIndex.GetCurrentOpendIndex(); } } } return(cached); }