Re: Docs search does not work for the "@>" operator

From: Erik Wienhold <ewie(at)ewie(dot)name>
To: Jai Sharma <jai(at)jai(dot)moe>
Cc: pgsql-docs(at)lists(dot)postgresql(dot)org
Subject: Re: Docs search does not work for the "@>" operator
Date: 2025-03-07 02:12:17
Message-ID: f50c3e36-9f10-4da1-ac77-7ffcb7d93f67@ewie.name
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs

On 2025-03-03 19:35 +0100, Jai Sharma wrote:
> When searching on the Postgres docs website, searching with the strings
> `@>` or `"@>"` returns no results.
>
> Ordinarily, I would expect to see results returned including this page (which
> was the page I was looking for):
> https://www.postgresql.org/docs/17/functions-range.html

Any operator, in fact, because pgweb implements its search with
plainto_tsquery [1] which ignores punctuation.

> Can the search be updated to work with these characters please?

I don't see how because information about these operators (or any other
punctuation) is lost when pages are converted to tsvector by the web
crawler. Maybe a separate operator index where you could search with
ctrl+f is an option. But I don't know if that is feasible with the
current document structure without having to maintain basically two
separate operator docs. But DocBook can certainly index symbols [2].

[1] https://git.postgresql.org/gitweb/?p=pgweb.git;a=blob;f=tools/search/sql/functions.sql;h=9ee5c4a51c0fba97e7e851a78db33669ecfc440e;hb=HEAD#l12
[2] https://www.postgresql.org/docs/current/bookindex.html#indexdiv-Symbols

--
Erik Wienhold

In response to

Browse pgsql-docs by date

  From Date Subject
Next Message PG Doc comments form 2025-03-10 17:24:54 pg_dump/pg_restore exit status codes
Previous Message Laurenz Albe 2025-03-05 11:43:17 Re: pg_basebackup restore