Class SearchFacet
An abstract class for creating ISearchFacet implementations.
Implements
Namespace: Couchbase.Search
Assembly: Couchbase.NetClient.dll
Syntax
public abstract class SearchFacet : object, ISearchFacet
Properties
| Improve this Doc 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 |
---|---|
Int32 |
Methods
| Improve this Doc View SourceDate(String, String, Int32, 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. |
Int32 | size | The size. |
Range<DateTime>[] | ranges | The ranges. |
Returns
Type | Description |
---|---|
DateRangeFacet |
Numeric(String, String, Int32, Range<Single>[])
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. |
Int32 | size | The size. |
Range<Single>[] | ranges | The ranges. |
Returns
Type | Description |
---|---|
NumericRangeFacet |
Term(String, String, Int32)
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. |
Int32 | 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 |
ToString()
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
String |