1 of 1 people found this helpful
When building up a search query by hand using AFSearchTokens, you are by-passing query validation because it does not need to parse the query string. When doing this, you need to ensure that the query you are building is valid. In this case, the NotEqual operator is not valid for the category filter. If you had used the string representation, you would have generated an error message indicating that it was not valid.
To add to what David said, the AFSearchOperator Help states the following for NotEqual:
For an AFSearch based query, the filter value is not equal to the specified AFSearchToken.Value. For an AFAttributeValueQuery, the attribute value is not equal to the specified AFAttributeValueQuery.AttributeValue. For an AFDurationQuery, the event frame's duration is not equal to the specified AFDurationQuery.Duration.
So NotEqual is limited to attribute value filters.