Couchbase .NET SDK | 3.7.2
Search Results for

    Show / Hide Table of Contents

    Class SearchFacet

    An abstract class for creating ISearchFacet implementations.

    Inheritance
    object
    SearchFacet
    DateRangeFacet
    NumericRangeFacet
    TermFacet
    Implements
    ISearchFacet
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    Namespace: Couchbase.Search
    Assembly: Couchbase.NetClient.dll
    Syntax
    public abstract class SearchFacet : ISearchFacet

    Properties

    | Edit this page View Source

    Field

    The field of the facet.

    Declaration
    public string Field { get; set; }
    Property Value
    Type Description
    string
    | Edit this page View Source

    Name

    The name of the facet.

    Declaration
    public string Name { get; set; }
    Property Value
    Type Description
    string
    | Edit this page View Source

    Size

    The number of facets or categories returned.

    Declaration
    public int Size { get; set; }
    Property Value
    Type Description
    int

    Methods

    | Edit this page View Source

    Date(string, string, int, params Range<DateTime>[])

    Factory for creating DateRangeFacet instances.

    Declaration
    public static DateRangeFacet Date(string name, string field, int size, params Range<DateTime>[] ranges)
    Parameters
    Type Name Description
    string name

    The name.

    string field

    The field.

    int size

    The size.

    Range<DateTime>[] ranges

    The ranges.

    Returns
    Type Description
    DateRangeFacet
    | Edit this page View Source

    Numeric(string, string, int, params Range<float>[])

    Factory for creating NumericRangeFacet instances.

    Declaration
    public static NumericRangeFacet Numeric(string name, string field, int size, params Range<float>[] ranges)
    Parameters
    Type Name Description
    string name

    The name.

    string field

    The field.

    int size

    The size.

    Range<float>[] ranges

    The ranges.

    Returns
    Type Description
    NumericRangeFacet
    | Edit this page View Source

    Term(string, string, int)

    Factory for creating TermFacet instances.

    Declaration
    public static TermFacet Term(string name, string field, int size)
    Parameters
    Type Name Description
    string name

    The name.

    string field

    The field.

    int size

    The size.

    Returns
    Type Description
    TermFacet
    | Edit this page View Source

    ToJson()

    Gets the JSON representation of this object.

    Declaration
    public virtual JProperty ToJson()
    Returns
    Type Description
    JProperty

    A Newtonsoft.Json.Linq.JObject representing the object's state.

    Exceptions
    Type Condition
    InvalidOperationException

    The Name and the Field property must have a value.

    | Edit this page View Source

    ToString()

    Declaration
    public override string ToString()
    Returns
    Type Description
    string
    Overrides
    object.ToString()

    Implements

    ISearchFacet
    • Edit this page
    • View Source
    In this article
    Back to top © 2025 Couchbase, Inc.