Forum OpenACS Development: Re: Search: only root forums messages are indexed

Collapse
Posted by Dave Bauer on
There is a good reason.

You want to send someone to the thread where the message is located. You also don't want to have 100 of the same thread returned in the results. One result for a relevant thread is better.

The code is SUPPOSED to index the root and all the child messages.

This is quite apparent if you have a forum with long threads such as openacs.org.

Collapse
Posted by Emmanuelle Raffenne on
I agree that having only one result for a thread is better.

I had a closer look and I think the problem is in the search::datasource implementation. The combined content of all messages of the thread should be indexed but the query to retrieve it is not correct:

<fullquery name="callback::search::datasource::impl::forums_message.messages">
<querytext>
select subject, content, format
from forums_messages
where message_id=:message_id
-- lets just get the message instead of the whole thread
-- replace with a connect by
</querytext>
</fullquery>

Thanks Dave. I'll fix that and try again.