コード例 #1
0
 public static FieldTermsRelation getInstance()
 {
     if (cached == null) {
         lock (typeof(FieldTermsRelation)) {
             if (cached == null) {
                 cached = new FieldTermsRelation();
                 cached.open = CurrentIndex.GetCurrentOpendIndex();
             }
         }
     }
     return cached;
 }
コード例 #2
0
        /// <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);
        }
コード例 #3
0
 public static FieldTermsRelation getInstance()
 {
     if (cached == null)
     {
         lock (typeof(FieldTermsRelation)) {
             if (cached == null)
             {
                 cached      = new FieldTermsRelation();
                 cached.open = CurrentIndex.GetCurrentOpendIndex();
             }
         }
     }
     return(cached);
 }