Forum OpenACS Q&A: Message-view page in OpenACS - for site-wide search

Request notifications

I need to construct a message-view page for site-wide search. So I get passed in a message_id of a new message and I need to pull together all related messages.

Can some shed light on how this can be done? Has someone even solved the problem?

Posted by Dirk Gomez on

Hmm, trying to explain my problem a bit more verbosely, maybe someone can help them.

For Intermedia site-wide search I need to define a procedure that indexes certain content. I want the messages of one thread to be searchable under the object_id/message_id of the very first message in the thread.

So if a user posts a new message, that new content needs to be put into the side-wide index. If it's a new message that is relatively straight forward. If it is an answer to a posting, I need to find out all related messages. There's parent_id, message_id, and tree_sortkey in forums_messages and all of them look like candidates in trying to pull together all related messages. However I cannot yet really make sense of how they interrelate.

Especially confusing is that I cannot find any "connect by" in the forums package.

The good news is: I don't need to put the message puzzle together properly or in order, all I need is all the text that makes up a complete thread.

(Oh, current site-wide search still sits on bboard :-()

I've never used it, but my understanding is the tree_sortkey is the "connect by" (and more).

In the Forums packge, I think OpenForce decided to use the (more powerful, more general?) tree_sortkey style (originally invented for OpenACS on PostgreSQL) for both Postgres and Oracle, rather than using connecty by on Oracle. At least, I think I vaguely recall someone (Don?) saying that on the BBoards here.