public bool TryLoadProperty(PropertyDatabaseRecordKey recordKey, out object data) { if (propertyDatabaseView.TryLoad(recordKey, out data)) { SearchMonitor.Log("Load property", recordKey, data); return(true); } SearchMonitor.Log("<color=red>Failed</color> to load property", recordKey); return(false); }
public bool TryLoadAlias(PropertyDatabaseRecordKey recordKey, out string alias) { if (!propertyAliasesView.TryLoad(recordKey, out object aliasObj)) { SearchMonitor.Log("<color=red>Failed</color> to load alias", recordKey); alias = null; return(false); } alias = aliasObj as string; SearchMonitor.Log("Load alias", recordKey, alias); return(alias != null); }
public bool TryLoadProperty(ulong documentKey, string propertyName, out PropertyDatabaseRecordKey recordKey, out object value, out string alias) { var propertyHash = PropertyDatabase.CreatePropertyHash(propertyName); recordKey = PropertyDatabase.CreateRecordKey(documentKey, propertyHash); if (!propertyAliasesView.TryLoad(recordKey, out object aliasObj)) { value = null; alias = propertyName; SearchMonitor.Log($"<color=red>Failed</color> to load {propertyName} without alias", recordKey, propertyName); return(false); } alias = (aliasObj as string) ?? propertyName; if (propertyDatabaseView.TryLoad(recordKey, out value)) { SearchMonitor.Log($"Load property {propertyName}", recordKey, value); return(true); } SearchMonitor.Log($"<color=red>Failed</color> to load property {propertyName}", recordKey, propertyName); return(false); }
public void Invalidate(PropertyDatabaseRecordKey recordKey) { SearchMonitor.Log("Invalidate record", recordKey); propertyDatabaseView.Invalidate(recordKey); propertyAliasesView.Invalidate(recordKey); }
public void InvalidateDocument(string documentKey) { SearchMonitor.Log("Invalidate document"); propertyDatabaseView.Invalidate(documentKey); propertyAliasesView.Invalidate(documentKey); }
public void StoreAlias(PropertyDatabaseRecordKey key, string alias) { propertyAliasesView.Store(key, alias); SearchMonitor.Log("Store alias", key, alias); }
public void StoreProperty(PropertyDatabaseRecordKey recordKey, object value) { propertyDatabaseView.Store(recordKey, value); SearchMonitor.Log("Store property", recordKey, value); }