Forum OpenACS Development: Forums search

Collapse
Posted by Malte Sussdorff on
I was wondering if we could not get a significant performance increase if we used the search package to search for a forum posting instead of using forums own search functionality. My reasoning is that the former does a scan using tsearch2, the latter does a SQL comparison with like.

Having thought that, I have no idea how to do that in the first place and how to limit the results to only messages in one forum. But maybe someone else has thought the same and actually come up with a solution (or not)

Collapse
2: Re: Forums search (response to 1)
Posted by Dave Bauer on
Forums is indexed by the search package for years now.

The easiest way to get per forum search is to put one forum per package instance.

You can pass in a package_id to the search page. That's how bug tracker search works.

In general i'd like to make search scope available in the toolbar at the top of the paage so you have

1) Search this package (with a package specific label here)
2) Search this subsite (dotlrn-community..)
3) Saerch the whole site

Collapse
3: Re: Forums search (response to 2)
Posted by Tom Jackson on
When I worked on a tsearch2 application for several cr_types I noticed that there was significant change in how things used to work. I also noticed that there can be the need for lots of feature tweaking, like dictionary choice, etc. which, if changed, should force reindexing of the data, or it won't match the new queries which are prepared with the new features. Also, you can add weighting to different inputs: title could be a higher value than the body, then your query could just select certain fields to search as well.

Also missing was a boolean logic translator for the input query to the tsearch2 logic. Has any of this been integrated into the current system? Besides selecting what to search, it is important to know what the index parameters are (and if different the search will probably fail).

Just wondering what the state of search is since tseach2 was introduced.

Collapse
4: Re: Forums search (response to 1)
Posted by Dave Bauer on
Tom,

The 5.3 version does have the boolean parser in it.

It also has some support for passing in arbitrary search operators like in google search (ie: site:openacs.org etc)

Right now there isn't any clean way to implement these, they should be callbacks.