Forum Discussion

Lindsey's avatar
Lindsey
Leader
7 years ago

LIKE or CONTAINS query in API v1

this post has a comment stating it is possible to do a partial text search in the community API v1. However I do not see that documented anywhere. Can anyone tell me how to do this? I want to query all labels that start with the text "job". Thank you!

2 Replies

  • Lindsey 
    Lithium added a new LIKE operator in the WHERE clause only on the login field of the API v2 user collection. The LIKE operator works similarly to SQL LIKE clauses: you may add either 1 or 2 wildcard characters (the % sign) and you must have at least 3 non-wildcard characters in your LIKE string. Examples: doug%, %suz%, 'john%.
    Here is the documentation for the same
    https://community.khoros.com/t5/Li-Release-Notes/Lithium-Community-19-1-Release-Notes/ba-p/512008


    Unfortunately, "LIKE"  constraint will not work on the labels. 

  • Lindsey's avatar
    Lindsey
    Leader
    7 years ago

    VikasB and there is nothing in v1 that would let you do a LIKE query?