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.IO; | |
using System.Linq; | |
using System.Threading; | |
using Raven.Abstractions.Extensions; | |
using Raven.Client.Embedded; | |
using Raven.Client.Indexes; | |
using Raven.Client.Linq; |
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.IO; | |
using System.Linq; | |
using System.Threading; | |
using Raven.Abstractions.Extensions; | |
using Raven.Client.Embedded; | |
using Raven.Client.Indexes; | |
using Raven.Client.Linq; |
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 Raven.Abstractions.Extensions; | |
using Raven.Client.Embedded; | |
using Raven.Client.Indexes; | |
using Raven.Client.Linq; | |
using Xunit; | |
using Raven.Client; | |
using Raven.Abstractions.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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using Xunit; | |
using Raven.Client.Indexes; | |
using Raven.Abstractions.Indexing; | |
using Raven.Client.Document; | |
using Raven.Abstractions.Data; | |
using Raven.Client.Embedded; |
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.IO; | |
using System.Linq; | |
using System.Linq.Expressions; | |
using System.Threading; | |
using Lucene.Net.Documents; | |
using Raven.Abstractions.Extensions; | |
using Raven.Client.Embedded; |
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
Map = docs => from doc in docs | |
from address in doc.Addresses | |
select new { address.StreetName, address.ZipCode, ListOfIds = new [] { doc.Id } } | |
Reduce = docs => from doc in docs | |
group doc by new { doc.StreetName, doc.ZipCode } into g | |
select new { | |
StreetName = g.Key.StreetName, | |
ZipCode = g.Key.ZipCode, | |
ListOfIds = g.SelectMany(x => x.ListOfIDs) |
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.Globalization; | |
using System.Linq; | |
using System.Linq.Expressions; | |
namespace BetterFacetedSearchAPI | |
{ | |
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; | |
using System.Linq; | |
using System.Threading; | |
using System.Threading.Tasks; | |
using Raven.Abstractions.Exceptions; | |
using Raven.Abstractions.Indexing; | |
using Raven.Client; | |
using Raven.Client.Embedded; | |
using Raven.Client.Linq; | |
using System.Collections.Generic; |
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.ComponentModel.Composition.Hosting; | |
using Lucene.Net.Documents; | |
using Raven.Abstractions.Data; | |
using Raven.Abstractions.Indexing; | |
using Raven.Client; | |
using Raven.Client.Embedded; | |
using Raven.Client.Indexes; | |
using Raven.Client.Linq; |
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; | |
public class MyClass | |
{ | |
public static void RunSnippet() | |
{ | |
WL("sizeInMegaBytes = 2047: " + TranslateToSizeInDatabasePages_CURRENT_VERSION(2047, 1024 * 1024)); | |
WL("sizeInMegaBytes = 2047: " + TranslateToSizeInDatabasePages_FIXED_VERSION(2047, 1024 * 1024)); | |