Ejemplo n.º 1
0
 internal virtual IndexProxy CreateOnlineIndexProxy(StoreIndexDescriptor descriptor)
 {
     try
     {
         IndexAccessor          onlineAccessor         = OnlineAccessorFromProvider(descriptor, _samplingConfig);
         CapableIndexDescriptor capableIndexDescriptor = _providerMap.withCapabilities(descriptor);
         IndexProxy             proxy;
         proxy = new OnlineIndexProxy(capableIndexDescriptor, onlineAccessor, _storeView, false);
         proxy = new ContractCheckingIndexProxy(proxy, true);
         return(proxy);
     }
     catch (IOException e)
     {
         _logProvider.getLog(this.GetType()).error("Failed to open index: " + descriptor.Id + " (" + descriptor.UserDescription(_tokenNameLookup) + "), requesting re-population.", e);
         return(CreateRecoveringIndexProxy(descriptor));
     }
 }