Couchbase .NET SDK __CB_SDK_VERSION__

Show / Hide Table of Contents

Class SearchFacet

An abstract class for creating ISearchFacet implementations.

Inheritance
object
SearchFacet
DateRangeFacet
NumericRangeFacet
TermFacet
Implements
ISearchFacet
Inherited Members
object.GetType()
object.MemberwiseClone()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Namespace: Couchbase.Search
Assembly: Couchbase.NetClient.dll
Syntax
public abstract class SearchFacet : ISearchFacet

Constructors

View Source

SearchFacet()

Declaration
protected SearchFacet()

Properties

View Source

Field

The field of the facet.

Declaration
public string Field { get; set; }
Property Value
Type Description
string
View Source

Name

The name of the facet.

Declaration
public string Name { get; set; }
Property Value
Type Description
string
View Source

Size

The number of facets or categories returned.

Declaration
public int Size { get; set; }
Property Value
Type Description
int

Methods

View Source

Date(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
View Source

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
View Source

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
View Source

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.

View Source

ToString()

Declaration
public override string ToString()
Returns
Type Description
string
Overrides
object.ToString()

Implements

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