//If the usual Logs folder path refers to an alias file, this is that path, and logBasePath is the destination of the alias; otherwise, this is nil and logBasePath is the usual Logs folder path.
/* We shouldn't have to lock here except in createLogIndex. However, a 'window period' exists after an SKIndex has been closed via SKIndexClose()
* in which an attempt to load the index from disk returns NULL (presumably because it's still being written-to asynchronously). We therefore lock
* around the full access to make the process reliable. The documentation says that SKIndex is thread-safe, but that seems to assume that you keep
* a single instance of SKIndex open at all times... which is a major memory hit for a large index of a significant number of logs. We only keep the index
* open as long as the transcript viewer window is open.
AILogWithSignature(@"Opened index %x from %@",_index,logIndexURL);
if(!_index){
//It appears our index was somehow corrupt, since it exists but it could not be opened. Remove it so we can create a new one.
AILogWithSignature(@"*** Warning: The Chat Transcript searching index at %@ was corrupt. Removing it and starting fresh; transcripts will be re-indexed automatically.",
AILogWithSignature(@"Created a new log index %x at %@ with textAnalysisProperties %@. Will reindex all logs.",_index,logIndexURL,textAnalysisProperties);
//Clear the dirty log set in case it was loaded (this can happen if the user mucks with the cache directory)