Showing results for 
Show  only  | Search instead for 
Did you mean: 

Can't query by conversation.solved without depth=0 being required?

Hi, reading the docs for LiQL, there are examples of filtering on conversation.solved. And indeed, this is referenced by @VikasB in this answer:

What I'm really trying to do is find answers that a user has provided for questions that are still considered unsolved

I can filter by fine, but when I try to combine that with conversation.solved, things break down because apparently conversation.solved will only work with a depth specified, and that depth MUST BE ZERO:

  "message": "The depth parameter, or the value passed in for the depth parameter, is not valid.",
  "data": {
    "type": "error_data",
    "code": 605,
    "developer_message": "only depth of 0 is supported.",


I mean, why shouldn't I be able to filter on conversation.solved independent of depth? Why are the two linked?

2 Replies 2
Khoros Staff


The depth = 0 constraint is required for conversation.solved because only topics (messages with depth 0) can be solved. Messages with a higher depth are replies and can be marked as solutions to the original topic.

I'm not sure if there's a way to get this down to one query, but to get the information you're looking for try using the constraint instead:

SELECT id FROM messages WHERE = '{{USER ID}}' AND depth=0 AND conversation.solved = false


If you would also like to filter out topics that were authored by the target user, that constraint can be added as well:

SELECT id FROM messages WHERE = '{{USER_ID}}' AND != '{{USER_ID}}' AND depth=0 AND conversation.solved = false


That will get you the unsolved topics your user has participated in. From there you can use the results to build a list of topic IDs for the following query:

SELECT * FROM messages WHERE = '{{USER_ID}}' AND IN ('{{TOPIC_ID}}','{{TOPIC_ID}}',...)



Sweet! This worked great. In fact, I didn't even need the third query. Just used this:


SELECT view_href 
FROM messages 
WHERE = '554991' 
AND != '554991' 
AND depth=0 AND conversation.solved = false
LIMIT 1000


(The user was really just looking for a list of links to questions they had answered that were still not accepted.)

I guess the only other enhancement might be a way to also filter out messages where the user only commented on another answer (which would be anything where the depth != 1.)

But depth can only be zero. Hrm...

Thank you so much for your response though. This is great!

Welcome to the Technology board!

Curious about our platform? Looking to connect on social technology? You've come to the right place!

Are you a Khoros customer? For direct assistance from our Support team, please visit the Support Forum.