Class SearchFacet
An abstract class for creating ISearch
Implements
Inherited Members
Namespace: Couchbase.Search
Assembly: Couchbase.NetClient.dll
Syntax
public abstract class SearchFacet : ISearchFacet
Properties
| Edit this page View SourceField
The field of the facet.
Declaration
public string Field { get; set; }
Property Value
Type | Description |
---|---|
string |
Name
The name of the facet.
Declaration
public string Name { get; set; }
Property Value
Type | Description |
---|---|
string |
Size
The number of facets or categories returned.
Declaration
public int Size { get; set; }
Property Value
Type | Description |
---|---|
int |
Methods
| Edit this page View SourceDate(string, string, int, params Range<DateTime>[])
Factory for creating Date
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<Date |
ranges | The ranges. |
Returns
Type | Description |
---|---|
Date |
Numeric(string, string, int, params Range<float>[])
Factory for creating Numeric
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 |
---|---|
Numeric |
Term(string, string, int)
Factory for creating Term
Declaration
public static TermFacet Term(string name, string field, int size)
Parameters
Returns
Type | Description |
---|---|
Term |
ToJson()
Gets the JSON representation of this object.
Declaration
public virtual JProperty ToJson()
Returns
Type | Description |
---|---|
JProperty | A Newtonsoft. |
Exceptions
Type | Condition |
---|---|
Invalid |
The Name and the Field property must have a value. |
ToString()
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
string |