private static void Patch()
{
var store = container.Resolve<IDocumentStore>();
store.DatabaseCommands.UpdateByIndex("AssetsIndex", new IndexQuery(), new[]
{
new PatchRequest
{
Type = PatchCommandType.Add, Name = "HighLevelAnalysisModelsVersion", Value = 1
}
});
}
public class AssetsIndex : AbstractIndexCreationTask<AudioAsset>
{
public class Result
{
public bool HasLowLevelAnalysis { get; set; }
public bool HasHighLevelAnalysis { get; set; }
}
public AssetsIndex()
{
Map = assets => from asset in assets
select new Result
{
HasLowLevelAnalysis = !String.IsNullOrEmpty(asset.LowLevelAnalysis),
HasHighLevelAnalysis = !String.IsNullOrEmpty(asset.HighLevelAnalysis)
};
}
}
public class AudioAsset
{
public string LowLevelAnalysis { get; set; }
public string HighLevelAnalysis { get; set; }
public int? HighLevelAnalysisModelsVersion { get; set; }
}
delete this.HighLevelAnalysisModelsVersion;
this.HighLevelAnalysisModelsVersion = 1;
Hibernating Rhinos Ltd
Oren Eini l CEO l Mobile: + 972-52-548-6969
Office: +972-4-622-7811 l Fax: +972-153-4-622-7811
--
You received this message because you are subscribed to the Google Groups "RavenDB - 2nd generation document database" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.