public FacetedIndex() { _data = FacetedIndexTestHelper.GetCameras(NumCameras); _facets = new List <Facet> { new Facet { Name = "Manufacturer" }, //default is term query //In Lucene [ is inclusive, { is exclusive new Facet { Name = "Cost_Range", Mode = FacetMode.Ranges, Ranges = { "[NULL TO Dx200.0]", "[Dx200.0 TO Dx400.0]", "[Dx400.0 TO Dx600.0]", "[Dx600.0 TO Dx800.0]", "[Dx800.0 TO NULL]", } }, new Facet { Name = "Megapixels_Range", Mode = FacetMode.Ranges, Ranges = { "[NULL TO Dx3.0]", "[Dx3.0 TO Dx7.0]", "[Dx7.0 TO Dx10.0]", "[Dx10.0 TO NULL]", } } }; }
public FacetedIndexLimit() { _data = FacetedIndexTestHelper.GetCameras(NumCameras); }
public FacetedIndex() { _data = FacetedIndexTestHelper.GetCameras(NumCameras); _originalFacets = new List <Facet> { new Facet { Name = "Manufacturer" }, //default is term query //In Lucene [ is inclusive, { is exclusive new Facet { Name = "Cost_Range", Mode = FacetMode.Ranges, Ranges = { "[NULL TO Dx200]", "[Dx200 TO Dx400]", "[Dx400 TO Dx600]", "[Dx600 TO Dx800]", "[Dx800 TO NULL]", } }, new Facet { Name = "Megapixels_Range", Mode = FacetMode.Ranges, Ranges = { "[NULL TO Dx3]", "[Dx3 TO Dx7]", "[Dx7 TO Dx10]", "[Dx10 TO NULL]", } } }; _stronglyTypedFacets = new List <Facet> { new Facet <Camera> { Name = x => x.Manufacturer }, new Facet <Camera> { Name = x => x.Cost, Ranges = { x => x.Cost <200m, x => x.Cost> 200m && x.Cost <400m, x => x.Cost> 400m && x.Cost <600m, x => x.Cost> 600m && x.Cost <800m, x => x.Cost> 800m } }, new Facet <Camera> { Name = x => x.Megapixels, Ranges = { x => x.Megapixels <3.0m, x => x.Megapixels> 3.0m && x.Megapixels <7.0m, x => x.Megapixels> 7.0m && x.Megapixels <10.0m, x => x.Megapixels> 10.0m } } }; }