Пример #1
0
 /// <summary>
 /// 设置一批索引目录进缓存
 /// </summary>
 /// <param name="dirs"></param>
 public static void SetRange(IIndexDirectory[] dirs)
 {
     if (dirs != null && dirs.Length != 0)
     {
         foreach (IIndexDirectory dir in dirs)
         {
             Set(dir);
         }
     }
 }
Пример #2
0
 public LuceneIndexReader(IIndexDirectory dir)
 {
     this.Directory = dir;
 }
Пример #3
0
 /// <summary>
 /// 设置缓存
 /// </summary>
 /// <param name="dir"></param>
 public static void Set(IIndexDirectory dir)
 {
     lock (Locker)
     {
         dir.Init();
         DirCache[dir.IndexPath] = dir;
     }
 }
Пример #4
0
        public LuceneIndexWriter(IIndexDirectory directory)
        {
            this.Directory = directory;

            this.InitIndexWriter();
        }