Search API -- searching using both context and tags
I am using the .NET SDK and searching with the following expression:
"resource_type:video AND context.LEVEL_ID:002 AND -tags=fail AND NOT context.STEAM_ID:76561198036999383"
When "-tags=fail" is included in the expression, it results in this error from the server:
"Query Error (at position 64) \'resource_type:video AND context.LEVEL_ID:002 AND -tags=fail AND ➥➥➥ NOT context.STEAM_ID:76561198036999383\'"
If I do not use the "-tags=fail" in the expression, the search works as expected.
Is there some issue with the syntax I am using with the above expression?
-
Hi Alan,
It is because you can't have 2 NOT in an expression. The working expression in your case would be:
resource_type:video AND context.LEVEL_ID:002 AND NOT (tags=fail AND context.STEAM_ID:76561198036999383)
Hope that helps.
Best,
Loic
0 -
Thanks Loic, working as expected now!
0 -
Hi Alan,
I'm glad everything is working as expected. If you have any further questions, do not hesitate to ask.
Kind Regards,
Tia
0
Post is closed for comments.
Comments
3 comments