public virtual void InitOnUp(Transaction systemTrans, FieldMetadata fieldMetadata ) { ObjectContainerBase anyStream = systemTrans.Container(); if (!anyStream.MaintainsIndices()) { return; } if (!fieldMetadata.SupportsIndex()) { Indexed(false); } TernaryBool indexedFlag = _config.GetAsTernaryBool(IndexedKey); if (indexedFlag.DefiniteNo()) { fieldMetadata.DropIndex((LocalTransaction)systemTrans); return; } if (UseExistingIndex(systemTrans, fieldMetadata)) { return; } if (!indexedFlag.DefiniteYes()) { return; } fieldMetadata.CreateIndex(); }
public virtual void CreateIndex() { lock (Lock()) { _fieldMetadata.CreateIndex(); } }