I'm using EpiServer CMS 5 and have the following problem when trying to search a filesystem using UnifiedSearchQuery. Here is the code I am using,
UnifiedDirectory vdir = (UnifiedDirectory)virtualDirectory;UnifiedSearchQuery query = new UnifiedSearchQuery();UnifiedSearchHitCollection search = vdir.Search(query);
vdir is a valid directory (e.g. /Assets/), but when vdir.Search occurs, it attempts to visit /Assets/Index, a folder which doesn't exist. This causes a System.IO.IOException error. I tried adding an Index folder under /Assets/, but then Search tries to visit /Assets/Index/Segment and a similar error occurs.Can someone help me out please and tell me what I'm doing wrong here? I've tried setting various properties on the UnifiedSearchQuery, but I continue to get these errors.
The index-folder is created by the indexing service.
Step 1 is to check that your indexing service is running
Step 2 is to check if you sites Asset-path is added to be indexed. You can do that in this file: C:\Program Files\EPiServer.IndexingService5\EPiServer.IndexingService.exe.configIf you are using R2 it can be found in C:\Program Files\EPiServer\Shared\Services\Indexing Service