Class SearchFacet
An abstract class for creating ISearchFacet implementations.
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 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 |
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 |
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 |
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. |
ToString()
Declaration
public override string ToString()
Returns
| Type | Description |
|---|---|
| string |