AnsweredAssumed Answered

Search and list Discussion replies

Question asked by loftux Moderator on Mar 25, 2011
Latest reply on Mar 30, 2011 by loftux
I'm looking into a requirement for a Discussion dashlet that lists
-Your topics (started by you) that has replies
-Topics you are involved in, ie you have replied to something and you want to monitor the discussion
-It should list discussions from all sites you are a member of so that you quickly can follow discussions across sites.
The site activites dashlet was thought to be to light weight as it cannot filter only replies to your topics, and is mixed with all other site activities.

This to mee looked like a trivial task at first, but the way the forum model is designed I cannot really find a way to do this. What I want to do is a Lucene search for the above. What we have is
- fm:topic with child nodes fm:post in a flat structure
- the topic title is not stored in fm:topic, instead in the first child fm:post
- fm:post replies to another fm:post is not a child, instead an association cm:references
- fm:topic and fm:post is not only used in discussions, but also for comments in general in the system

So how would I search for "My topics with recent replies". fm:topic does not change modified time when a fm:post is added. Maybe search all my fm:topic, then loop them? Another approach is to find all fm:post created by me that has title not null. Then I get all my topic start, but then what, I cannot get the replies easily. Associations are not searchable, else I could have done a search for cm:references for the replies.

Also the fact that the same kind of fm:topic and fm:post are used generally in the system, not only for Discussions, it would require PATH filtering, but when you are members of many sites, I guess the PATH filter will become to much for lucene.

Is there a way to do lucene query for what I want?
Maybe with queries, where the result of these queries is fed into new queries. But I'm afraid this would be to slow once the number of discussions spread across site rise, this is for a dashlet, and the loading should be prompt.

Outcomes