| SphinxSearchOptionsSetFilterTFilterable Method (String, IEnumerableTFilterable, Boolean) |
Sets a filter for the attribute with the given name.
Namespace: SphinxConnector.NativeApiAssembly: SphinxConnector (in SphinxConnector.dll) Version: 3.12.6
Syntax public void SetFilter<TFilterable>(
string attributeName,
IEnumerable<TFilterable> values,
bool exclude
)
where TFilterable : IFilterableType
Public Sub SetFilter(Of TFilterable As IFilterableType) (
attributeName As String,
values As IEnumerable(Of TFilterable),
exclude As Boolean
)
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 Remarks
Please note that JSON string filters can currently only contain one value.
See Also