Click or drag to resize

SphinxSearchOptionsSetFilterTFilterable Method (String, IEnumerableTFilterable, Boolean)

Sets a filter for the attribute with the given name.

Namespace:  SphinxConnector.NativeApi
Assembly:  SphinxConnector (in SphinxConnector.dll) Version: 5.3.0
Syntax
public void SetFilter<TFilterable>(
	string attributeName,
	IEnumerable<TFilterable> values,
	bool exclude
)
where TFilterable : IFilterableType

Parameters

attributeName
Type: SystemString
The name of the attribute to filter on.
values
Type: System.Collections.GenericIEnumerableTFilterable
The value for the filter.
exclude
Type: SystemBoolean
if set to true excludes the matching documents from the result.

Type Parameters

TFilterable
The type to set a filter for.
Exceptions
ExceptionCondition
ArgumentNullExceptionattributeName or values is null.
ArgumentExceptionattributeName is empty or values contains more than one value for a string filter.
NotSupportedException Attributes of type TFilterable are not supported in Version.
Remarks
Please note that JSON string filters can currently only contain one value.
See Also