Unable to get the list of users while searching via phrase

As per below API , I have a requirement to get the list of the users based on the search criteria. single term or word is returning expected result, but for phrases not returning the data as expected.

Though i have a data but follow query tried with both filter and query options returning 0 records. Please suggest what is wrong here

community.telligent.com/.../core-v2-searchresult-widget-extension.

#*
#set($searchcase = "IT Manager")
#set($filters = "${filters}||profile_Persona::$core_v2_encoding.UrlEncode($searchcase)")

#set($searchcase = "'' TO *")
#set($filters = "${filters}||profile_Persona::$core_v2_encoding.UrlEncode(${searchcase})")

#set ($searchListOptions = "%{ Sort = 'date desc' }")
$searchListOptions.Add("Filters", "type::user${filters}")
#set ($searchResults = $core_v2_searchResult.List($searchListOptions))

*#

#set($searchcase =$core_v2_encoding.UrlEncode("IT Manager"))
#set($searchResults = $core_v2_searchResult.List("%{Query = profile_Persona::${searchcase}}"))

Parents
  • Hi .

    #set($searchResults = $core_v2_searchResult.List("%{Query = profile_Persona::${searchcase}}"))

    This isn't quite valid syntax since profile_persona:: is a string literal. It either needs to be quoted (so as to become a variable) or defined as part of a variable separately passed to the query field.

    Something like:

    #set ($searchcase = $core_v2_encoding.UrlEncode("IT Manager"))
    #set ($queryValue = "profile_Persona::${searchcase}")
    $core_v2_searchResult.List("%{ Query = $queryValue })
     

    Is this by any chance related to this other question? And if so, is that any help as well?

Reply
  • Hi .

    #set($searchResults = $core_v2_searchResult.List("%{Query = profile_Persona::${searchcase}}"))

    This isn't quite valid syntax since profile_persona:: is a string literal. It either needs to be quoted (so as to become a variable) or defined as part of a variable separately passed to the query field.

    Something like:

    #set ($searchcase = $core_v2_encoding.UrlEncode("IT Manager"))
    #set ($queryValue = "profile_Persona::${searchcase}")
    $core_v2_searchResult.List("%{ Query = $queryValue })
     

    Is this by any chance related to this other question? And if so, is that any help as well?

Children