Couchbase .NET SDK __CB_SDK_VERSION__

Show / Hide Table of Contents

Class DateRangeQuery

The date range query finds documents containing a date value in the specified field within the specified range.

Inheritance
object
SearchQueryBase
DateRangeQuery
Implements
ISearchQuery
Inherited Members
SearchQueryBase.IndexName
SearchQueryBase.Query
SearchQueryBase.Boost(double)
SearchQueryBase.BoostValue
object.GetType()
object.MemberwiseClone()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Namespace: Couchbase.Search.Queries.Range
Assembly: Couchbase.NetClient.dll
Syntax
public class DateRangeQuery : SearchQueryBase, ISearchQuery

Constructors

View Source

DateRangeQuery()

Declaration
public DateRangeQuery()

Methods

View Source

AsReadOnly()

Declaration
public DateRangeQuery.ReadOnly AsReadOnly()
Returns
Type Description
DateRangeQuery.ReadOnly
View Source

Deconstruct(out DateTime?, out bool, out DateTime?, out bool, out string, out string)

Declaration
public void Deconstruct(out DateTime? startTime, out bool inclusiveStart, out DateTime? endTime, out bool inclusiveEnd, out string parserName, out string field)
Parameters
Type Name Description
DateTime? startTime
bool inclusiveStart
DateTime? endTime
bool inclusiveEnd
string parserName
string field
View Source

End(DateTime, bool)

The end date of the range

Declaration
public DateRangeQuery End(DateTime endTime, bool inclusive = false)
Parameters
Type Name Description
DateTime endTime

The end time.

bool inclusive

if set to true [inclusive].

Returns
Type Description
DateRangeQuery
View Source

Export()

Gets a JSON object representing this query instance />

Declaration
[RequiresUnreferencedCode("Couchbase FTS might require types that cannot be statically analyzed. Make sure all required types are preserved.")]
[RequiresDynamicCode("Couchbase FTS might require types that cannot be statically analyzed and might need runtime code generation. Do not use for native AOT applications.")]
public override JObject Export()
Returns
Type Description
JObject
Overrides
SearchQueryBase.Export()
View Source

Field(string)

If a field is specified, only terms in that field will be matched. This can also affect the used analyzer if one isn't specified explicitly.

Declaration
public DateRangeQuery Field(string field)
Parameters
Type Name Description
string field

The field.

Returns
Type Description
DateRangeQuery
View Source

Parser(string)

The name of the parser to use.

Declaration
public DateRangeQuery Parser(string name)
Parameters
Type Name Description
string name

The name.

Returns
Type Description
DateRangeQuery
View Source

Start(DateTime, bool)

The start date of the range.

Declaration
public DateRangeQuery Start(DateTime startTime, bool inclusive = true)
Parameters
Type Name Description
DateTime startTime

The start time.

bool inclusive

if set to true [inclusive].

Returns
Type Description
DateRangeQuery

Implements

ISearchQuery

See Also

SearchQueryBase
  • View Source
In this article
Back to top Copyright © 2020 Couchbase, Inc. All rights reserved.