Hi,
I spotted this error in IndexReader.IndexExists in Lucene.Net-2.1. Not
sure
if this is already fixed in trunk.
public static bool IndexExists(System.IO.FileInfo directory)
{
return
SegmentInfos.GetCurrentSegmentGeneration(System.IO.Directory.GetFileSystemEntries(directory.FullName))
!= -
1;
}
The above method uses Directory.GetFileSystemEntries which returns full path
of the directory contents, whereas GetCurrentSegmentGeneration expects only
names of the directory contents. As it is, IndexReader.IndexExists() will
return false even for valid indexes.
- dBera
--
-----------------------------------------------------
Debajyoti Bera @ http://dtecht.blogspot.com
beagle / KDE fan
Mandriva / Inspiron-1100 user