tazjin / converse

A simple forum software
GNU Affero General Public License v3.0
16 stars 1 forks source link

Implement full-text search in Converse #1

Closed tazjin closed 6 years ago

tazjin commented 6 years ago

What the title says.

This is implemented using PostgreSQL's support for full-text search by creating a tsvector of several fields of each post and thread in a materialized view and indexing it.

Postgres' plainto_tsquery function is used to convert user input to search queries to be executed against the database.

ts_headline is used to display relevant snippets from search results on the output page.

Known caveats:

tazjin commented 6 years ago

Functionality is implemented, but the results page looks kinda broken. That'll be for a followup change ...