This file contains 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
[Fact] | |
public void CanQueryMapReduceIndex_WithUpdates() | |
{ | |
using (var store = NewDocumentStore()) | |
{ | |
store.DatabaseCommands.PutIndex("TagCloud", | |
new IndexDefinition | |
{ | |
Map = | |
@" |
This file contains 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.Collections.Generic; | |
using System.Diagnostics; | |
using System.Linq; | |
using System.Net.Security; | |
using System.ServiceModel; | |
using System.ServiceModel.Discovery; | |
using System.Text; | |
using System.Threading.Tasks; |
This file contains 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 class ConcurrentLeastFrequentlyUse<T> where T : class | |
{ | |
private readonly int[] generationSizes; | |
private readonly ConcurrentQueue<T>[] queues; | |
public ConcurrentLeastFrequentlyUse(params int[] generationSizes) | |
{ | |
this.generationSizes = generationSizes; | |
queues =new ConcurrentQueue<T>[generationSizes.Length]; | |
} |
This file contains 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 T GetCache<T>(string id) | |
{ | |
return Cache[id] ?? | |
Cache[id] = Session.Get<T>(id); | |
} |
This file contains 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
namespace ravenConsole | |
{ | |
using System; | |
using System.Linq; | |
using Raven.Client.Document; | |
using Raven.Client.Indexes; | |
using Xunit; | |
public class DocumentsTests | |
{ |
This file contains 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.Collections.Generic; | |
using System.IO; | |
using System.Linq; | |
using System.Text; | |
using Microsoft.Isam.Esent.Interop; | |
namespace EsentSize | |
{ | |
class Program |
This file contains 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.IO; | |
using System.Linq; | |
using Lucene.Net.Analysis; | |
using Lucene.Net.Analysis.Standard; | |
using Lucene.Net.Analysis.Tokenattributes; | |
using Lucene.Net.Util; | |
using Raven.Abstractions.Indexing; | |
using Raven.Client.Linq; | |
using Raven.Database.Indexing; |
This file contains 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 = RavenSession.Query<Suppliers_QueryIndex.ReduceResult, Suppliers_QueryIndex>() | |
.Where(x => x.LocationName == location) | |
.Search(x => x.Query, string.Join(" ", suggestions)) | |
.Search(x => x.Query, term +"*") | |
.Take(5 - ravenResults.Count) | |
.As<Supplier>() | |
.ToList(); |
This file contains 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 class RavenController : Controller | |
{ | |
private static IDocumentStore documentStore; | |
public static IDocumentStore DocumentStore | |
{ | |
get | |
{ | |
if(documentStore == null) | |
{ |
This file contains 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.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using Raven.Abstractions.Data; | |
using Raven.Abstractions.Indexing; | |
using Raven.Client.Bundles.MoreLikeThis; | |
using Raven.Client.Indexes; | |
using Raven.Json.Linq; | |
using Xunit; |
OlderNewer