Class DateRangeQuery
The date range query finds documents containing a date value in the specified field within the specified range.
Implements
Inherited Members
Namespace: Couchbase.Search.Queries.Range
Assembly: Couchbase.NetClient.dll
Syntax
public class DateRangeQuery : SearchQueryBase, ISearchQuery
Methods
| Edit this page View SourceAsReadOnly()
Declaration
public DateRangeQuery.ReadOnly AsReadOnly()
Returns
Type | Description |
---|---|
DateRangeQuery.ReadOnly |
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 |
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 |
Returns
Type | Description |
---|---|
DateRangeQuery |
Export()
Gets a JSON object representing this query instance />
Declaration
public override JObject Export()
Returns
Type | Description |
---|---|
JObject |
Overrides
| Edit this page View SourceField(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 |
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 |
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 |
Returns
Type | Description |
---|---|
DateRangeQuery |