This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System.Linq; | |
| using System.Threading.Tasks; | |
| using Raven.Client; | |
| using Raven.Client.Extensions; | |
| using Raven.Client.Indexes; | |
| using Raven.Tests.Helpers; | |
| using Xunit; | |
| namespace RavenTests | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using NUnit.Framework; | |
| using Raven.Client.Document; | |
| using Raven.Tests.Helpers; | |
| namespace RavenTests | |
| { | |
| public class LoadMultipleTests : RavenTestBase | |
| { | |
| private DocumentStore _documentStore; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using System.Diagnostics; | |
| using System.Linq; | |
| using NUnit.Framework; | |
| using Raven.Abstractions.Data; | |
| using Raven.Abstractions.Indexing; | |
| using Raven.Client.Document; | |
| using Raven.Client.Indexes; | |
| using Raven.Client.Linq.Indexing; | |
| using Raven.Tests.Helpers; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public interface IIndexHandler | |
| { | |
| void CreateIndexes(); | |
| } | |
| public class RavenIndexHandler : IIndexHandler | |
| { | |
| private readonly IDocumentSession _session; | |
| private IndexNameMap _map; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| RESULTS (in seconds): | |
| starting 0.0004977 | |
| products written 96.5585809 | |
| indexed 430.3390117 | |
| query complete - count matches 430.5240547 | |
| index update applied 618.2628734 | |
| done 618.2770718 | |
| */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using System.Linq; | |
| using Raven.Abstractions.Smuggler; | |
| using Raven.Database.Smuggler; | |
| using Raven.Tests.Helpers; | |
| using Xunit; | |
| namespace RavenTests | |
| { | |
| public class ConcurrencyTests : RavenTestBase |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| DateTimeOffset startingPoint = new DateTimeOffset(2008, 4, 1, 0, 0, 0, TimeSpan.Zero); | |
| // this calculates a score to be used for how hot an Audio is, a boost is given to Downloads over plays, same for likes and favourites | |
| // with a favourite the most valuable, a single favourite stat is worth 20 points where as a play is just 1 point | |
| var playScore = Math.Max(TotalPlays / 1.5, 1); | |
| var downloadScore = Math.Max(TotalDownloads * 2, 1); | |
| var likesScore = Math.Max(TotalLikes * 4, 1); | |
| var favScore = Math.Max(TotalFavourites * 5, 1); | |
| var score = Math.Log10(playScore + downloadScore + likesScore + likesScore + favScore); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using System.Linq; | |
| using Raven.Abstractions.Data; | |
| using Raven.Abstractions.Logging; | |
| using Raven.Bundles.Replication.Plugins; | |
| using Raven.Json.Linq; | |
| namespace RavenConflictResolverPlugin | |
| { | |
| public class LastInWinsReplicationConflictResolver |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System.Collections.Generic; | |
| using System.Linq; | |
| using Raven.Client.Indexes; | |
| using Raven.Tests.Helpers; | |
| using Xunit; | |
| namespace Testing | |
| { | |
| public class FirstOfManyTests : RavenTestBase | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using System.Diagnostics; | |
| using System.Linq; | |
| using System.Net; | |
| using System.Threading.Tasks; | |
| using Raven.Client; | |
| using Raven.Client.Document; | |
| using Xunit; | |
| namespace Testing |