Skip to main content

Search API -- excluding multiple tags

Comments

4 comments

  • Francis Tagbo

    Hi Alan,

    To add multiple tags in the search expression, you can use the comma ",". For your requirement, you can use the expression:

    "resource_type:video AND -tags=fail,cheat"

    Could you please try and let me know how it goes?

    Regards,
    Francis

     

    0
  • Alan Lawrance

    Thank you, this fixes the issue with an error occurring!

    However, the results are not what I expected.  I have an item with a single tag "cheat" and it is getting returned when the expression includes -tags=cheat,mod.

    Even items with both cheat and mod tags are getting returned.

    Example on dashboard:

     

    Tracing into the SDK, here is what is passed to the endpoint for the search params:

     

    0
  • Francis Tagbo

    Hi Alan,

    Could you please try

    "resource_type=video AND -tags:cheat,mod"

    Change the equals sign "=" to colon ":". The equals sign is expecting an exact match.
    You can learn more about this here.

    Please let me know how it goes.

    Regards,
    Francis

    0
  • Alan Lawrance

    Using the colon worked perfectly, thank you!

    0

Post is closed for comments.