We have this code to add to the index when a ticket is created so that the search unit has immediate access to the page:
Code:Dim configuration As Keyoti.SearchEngine.Configuration = New Keyoti.SearchEngine.Configuration
configuration.IndexDirectory = Server.MapPath("~/Keyoti_Search_Index")
Dim documentIndex As Keyoti.SearchEngine.Index.DocumentIndex = New Keyoti.SearchEngine.Index.DocumentIndex(Configuration)
Try
'-----------------------------
Dim reader As New Keyoti.SearchEngine.Documents.Reader(configuration)
reader.GetStream(new Uri("http://hd.alro.com/login.aspx?searchusername=username&searchpassword=Password")).Close()
'-----------------------------
documentIndex.AddDocument(New Keyoti.SearchEngine.Documents.Document(HttpContext.Current.Request.Url.GetLeftPart(UriPartial.Authority) & "/TicketView.aspx?ID=" & NewID, configuration))
Finally
documentIndex.Close()
End Try
I am intermittently getting the following error for the second dim line in the above code:
Quote:You can not run two simultaneous operations on the same index directory
Any ideas about how to clear it up? Maybe just a simple delay between the configuration line and the documentindex line?