Couchbase .NET SDK | 3.7.2
Search Results for

    Show / Hide Table of Contents

    Class DateRangeFacet

    A ISearchFacet which counts how many documents fall between two DateTime values.

    Inheritance
    object
    SearchFacet
    DateRangeFacet
    Implements
    ISearchFacet
    Inherited Members
    SearchFacet.Name
    SearchFacet.Field
    SearchFacet.Size
    SearchFacet.Term(string, string, int)
    SearchFacet.Numeric(string, string, int, params Range<float>[])
    SearchFacet.Date(string, string, int, params Range<DateTime>[])
    SearchFacet.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.ReferenceEquals(object, object)
    Namespace: Couchbase.Search
    Assembly: Couchbase.NetClient.dll
    Syntax
    public sealed class DateRangeFacet : SearchFacet, ISearchFacet

    Constructors

    | Edit this page View Source

    DateRangeFacet()

    Declaration
    public DateRangeFacet()
    | Edit this page View Source

    DateRangeFacet(string, string)

    Declaration
    public DateRangeFacet(string name, string field)
    Parameters
    Type Name Description
    string name
    string field
    | Edit this page View Source

    DateRangeFacet(string, string, int)

    Declaration
    public DateRangeFacet(string name, string field, int limit)
    Parameters
    Type Name Description
    string name
    string field
    int limit

    Methods

    | Edit this page View Source

    AddRange(Range<DateTime>)

    Adds a Range<T> to the ISearchFacet.

    Declaration
    public DateRangeFacet AddRange(Range<DateTime> range)
    Parameters
    Type Name Description
    Range<DateTime> range

    A Range<T> for the ISearchFacet.

    Returns
    Type Description
    DateRangeFacet
    | Edit this page View Source

    AddRange(DateTime, DateTime)

    Declaration
    [Obsolete("Use the overload which takes a string and two DateTimes instead.")]
    public DateRangeFacet AddRange(DateTime startDate, DateTime endDate)
    Parameters
    Type Name Description
    DateTime startDate
    DateTime endDate
    Returns
    Type Description
    DateRangeFacet
    | Edit this page View Source

    AddRange(string, DateTime, DateTime)

    Adds a Range<T> to the ISearchFacet.

    Declaration
    public DateRangeFacet AddRange(string name, DateTime startDate, DateTime endDate)
    Parameters
    Type Name Description
    string name

    The name of the range.

    DateTime startDate

    The start date of the range.

    DateTime endDate

    The end date of the range.

    Returns
    Type Description
    DateRangeFacet
    | Edit this page View Source

    AddRanges(params Range<DateTime>[])

    Adds a range of Range<T>'s to the ISearchFacet.

    Declaration
    public DateRangeFacet AddRanges(params Range<DateTime>[] ranges)
    Parameters
    Type Name Description
    Range<DateTime>[] ranges

    A range of Range<T>'s to add the ISearchFacet.

    Returns
    Type Description
    DateRangeFacet
    | Edit this page View Source

    ToJson()

    Gets the JSON representation of this object.

    Declaration
    public override JProperty ToJson()
    Returns
    Type Description
    JProperty

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

    Overrides
    SearchFacet.ToJson()
    Exceptions
    Type Condition
    InvalidOperationException

    The Name and the Field property must have a value.

    Implements

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