George, You asked about FSDirectory. Well using it seems to have blown away my index! :)
See below. Could not find file 'C:\obi_index\segments'. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.IO.FileNotFoundException: Could not find file 'C:\obi_index\segments'. Source Error: Line 110: FSDirectory fsDir = FSDirectory.GetDirectory( this.indexDirectory, true); Line 111: Line 112: this.searcher = new IndexSearcher(fsDir); Line 113: Line 114: // parse the query, "company_name" is the default field to search Source File: c:\Documents and Settings\michael.barbarelli\My Documents\Visual Studio 2005\WebSites\SmartAlec\Matcher.aspx.cs Line: 112 Stack Trace: [FileNotFoundException: Could not find file 'C:\obi_index\segments'.] System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) +2013725 System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy) +998 System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share) +114 Lucene.Net.Store.FSInputStream..ctor(FileInfo path) +80 Lucene.Net.Store.FSDirectory.OpenFile(String name) +73 Lucene.Net.Index.SegmentInfos.Read(Directory directory) +38 Lucene.Net.Index.IndexReaderLockWith.DoBody() +71 Lucene.Net.Store.With.Run() +59 Lucene.Net.Index.IndexReader.Open(Directory directory) +102 Lucene.Net.Search.IndexSearcher..ctor(Directory directory) +11 Matcher.Search.search(String inputQuery) in c:\Documents and Settings\michael.barbarelli\My Documents\Visual Studio 2005\WebSites\SmartAlec\Matcher.aspx.cs:112 Matcher.Search.Page_Load(Object sender, EventArgs e) in c:\Documents and Settings\michael.barbarelli\My Documents\Visual Studio 2005\WebSites\SmartAlec\Matcher.aspx.cs:89 System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +13 System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +45 System.Web.UI.Control.OnLoad(EventArgs e) +80 System.Web.UI.Control.LoadRecursive() +49 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3743 On 3/6/07, George Aroush <[EMAIL PROTECTED]> wrote:
Hi Michael, Are you able to open the same index using FSDirectory? Do you have the full call-stack of the exception? This error message is not coming from Lucene.Net. Regards, -- George Aroush -----Original Message----- From: Michael Barbarelli [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 06, 2007 3:56 PM To: [email protected] Subject: Problem creating RAMDirectory - The given path's format is not supported. I'm at my wits end with the following. Has anyone encountered this before? Thank you very much in advance. The given path's format is not supported. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.NotSupportedException: The given path's format is not supported. Source Error: Line 342: this.indexDirectory = @"C:\obi_index_backup"; Line 343: Line 344: Lucene.Net.Store.Directory ramDir = new RAMDirectory(this.indexDirectory); Line 345: Line 346: this.searcher = new IndexSearcher(ramDir);
