Sets a filter for the attribute with the given name.
Namespace: Gronewold.SphinxConnectorAssembly: Gronewold.SphinxConnector (in Gronewold.SphinxConnector.dll) Version: 2.8.0.26312 (2.8.0.26312)
Syntax
| C# |
|---|
public void SetFilter<TFilterable>( string attributeName, IEnumerable<TFilterable> values, bool exclude ) where TFilterable : IFilterableType |
| Visual Basic |
|---|
Public Sub SetFilter(Of TFilterable As IFilterableType) ( _ attributeName As String, _ values As IEnumerable(Of TFilterable), _ exclude As Boolean _ ) |
Parameters
- attributeName
- Type: System..::..String
The name of the attribute to filter on.
- values
- Type: System.Collections.Generic..::..IEnumerable<(Of <(<'TFilterable>)>)>
The value for the filter.
- exclude
- Type: System..::..Boolean
if set to true excludes the matching documents from the result.
Type Parameters
- TFilterable
- The type to set a filter for.
Exceptions
| Exception | Condition |
|---|---|
| System..::..ArgumentNullException | attributeName or values is null. |
| System..::..ArgumentException | attributeName is empty. |
| System..::..NotSupportedException | Attributes of type TFilterable are not supported in Version()()()(). |