Skip to content

feat(search): swap plainto_tsquery for websearch_to_tsquery#4371

Open
viq wants to merge 1 commit into
miniflux:mainfrom
viq:viq/websearch
Open

feat(search): swap plainto_tsquery for websearch_to_tsquery#4371
viq wants to merge 1 commit into
miniflux:mainfrom
viq:viq/websearch

Conversation

@viq

@viq viq commented May 28, 2026

Copy link
Copy Markdown

This switches plainto_tsquery to instead use websearch_to_tsquery, introduced in PostgreSQL 11. With unquoted text it behaves the same, but allows to use quoted text and OR and negation in the search terms.

Have you followed these guidelines?

To the above checklist: I ran the integrated test suite, including integration tests, and everything passed.
I ran it where I'm figuring out which reader I like more, which has ~300 feeds, but I don't use that much - it does work there, and now I can perform a something OR other OR evenmoreoptions search, and it returns results (they seem to be sorted by relevance more than recency?).
On nextflux connected to this miniflux instance, a simple single word search continued to work, but the complex search with OR did not.

And I will point out that I don't know enough to known the implications of this, I don't know what this can affect and where, and used a simple search-and-replace on the instances of the function. But, this seems to drastically increase functionality of available search.

This switches plainto_tsquery to instead use websearch_to_tsquery,
introduced in PostgreSQL 11. With unquoted text it behaves the same, but
allows to use quoted text and OR and negation in the search terms.
@jvoisin

jvoisin commented May 28, 2026

Copy link
Copy Markdown
Collaborator

The documentation says that PostgreSQL ≥ 9.5 is required. Maybe it's time to bump this requirement?

Debian bullseye (oldoldstable) ships PostgreSQL 13.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants