Forum Discussion

vedagarw's avatar
9 years ago

LIQL Query To Get Messages With Labels Or Tags

I want to write a LIQL query which retrieves messages with Tags/Labels. I currently get a separate query for tags & labels in the response.

 

Current Query

SELECT subject,body,view_href,post_time_friendly,metrics.views,kudos.sum(weight) from messages where category.id in ('Discussion') and depth=0 ORDER BY post_time DESC

 

  • SuzieH's avatar
    SuzieH
    Khoros Alumni (Retired)

    Hi vedagarw

    Are you trying to retrieve messages with filtered by a specific tag or label? Or do you want to filter  messages that have or don't have tags/labels in general (e.g. by count)?

     

     

    • vedagarw's avatar
      vedagarw
      Guide
      Hi Suzie,
      I want to get list of messages but want to retrieve them with labels and tags associated with them. I don't want to fire a separate query for each message to get the labels/tags associated with them.