Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 

Readme.md

HierarchicalFacet2Find

Adds hierarchical faceting to EPiServer Find's .NET API

Build

In order to build HierarchicalFacet2Find the NuGet packages that it depends on must be restored. See http://docs.nuget.org/docs/workflows/using-nuget-without-committing-packages

Usage

Add a Hierarchy property to the document:

public class Document
{
    [Id]
    public string Id { get; set; }

    public Hierarchy Hierarchy { get; set; }
}

set the hierarchy path (sections separated by '/'):

document.Hierarchy = "A/B/C/D";

index and request a HierarchicalFacet when searching:

result = client.Search<Document>()
            .HierarchicalFacetFor(x => x.Hierarchy)
            .GetResult();

fetch it from the result:

facet = result.HierarchicalFacetFor(x => x.Hierarchy)

and loop over the nested hierarchy paths

foreach(var hierarchyPath in facet)
{
    hierarchyPath.Path;
    hierarchyPath.Count;
                
    foreach (var subHierarchyPath in hierarchyPath)
    {
        subHierarchyPath.Path;
        subHierarchyPath.Count;
        ...
    }
}

About

Adds hierarchical faceting to EPiServer Find's .NET API

Resources

Releases

No releases published

Packages

No packages published

Languages

You can’t perform that action at this time.