Forum OpenACS Development: Improved search functionality on OpenACS.org

Dear all,

Thomas Renner has committed a patch to tsearch2 that replaces the old and an unreliable way to build tsearch queries by the built-in approach available since PostgreSQL 11. The query syntax is closer to what one expects when used to e.g. Google search [1].

Try the following three variants in the search box of openacs.org to see the differences:

  • contacts lite
  • "contacts lite"
  • contacts OR lite

The last variant is identical to the solution before, when the two words were used unquoted in search. The new variant leads to better results and is much more robust. The old way had always problems with unbalanced parens etc.

The new behavior can be configured via package parameters.

[1] https://openacs.org/api-doc/proc-view?proc=tsearch2::build_query_postgres&source_p=1