PatoSalazar
9 years agoAce
Query to find word in login field in Users Resource API V2
Hi,
I am trying to create a query in where I can search for a cetain term inside the login property in the users resource.
So i just realize that I can't use MATCHES here and the following query only return results if the login parameter is exactly the same as the search parameter
$url = "https://api.lithium.com/community/2.0/".$tenantId."/search?q=SELECT+login%2Cview_href%2Cavatar+FROM+users+WHERE+login%3D'".$searchTerm."'+LIMIT+".$numberOfResults."&api.pretty_print=true";
Is there anything like a LIKE clause that I can use in LIQL, or smarter way to write this query?
What want is that if the user looks for Pat I can retrieve results like Patricia, or Patrick or Patau... things like that
Thanks for your help
We don't yet have support for MATCHES on the login field in v2. For now you can use v1 user search to do the search you want. Here is an example query:
http://yourcommunity.lithium.com/restapi/vc/search/users?q=foo&f=*login*
-Doug