private Facet CreateFacet(FacetDefinition definition) { var facet = new Facet(definition.UniqueName, definition.DisplayName, definition.Field); facet.Build(this.IndexReader); return facet; }
public void can_create_facet() { var definition = new FacetDefinition("ProductTypeFace", "Product Type", "ProductType"); var builder = new FacetBuilder(_index.GetIndexSearcher().GetIndexReader()); var facets = builder.CreateFacets(new List<FacetDefinition>() { definition }); facets.Should().Not.Be.Null(); facets.Count.Should().Be.EqualTo(1); facets.First().Values.Count.Should().Be.EqualTo(2); }