/// <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); } } }
public LuceneIndexReader(IIndexDirectory dir) { this.Directory = dir; }
/// <summary> /// 设置缓存 /// </summary> /// <param name="dir"></param> public static void Set(IIndexDirectory dir) { lock (Locker) { dir.Init(); DirCache[dir.IndexPath] = dir; } }
public LuceneIndexWriter(IIndexDirectory directory) { this.Directory = directory; this.InitIndexWriter(); }