public inbox for [email protected]  
help / color / mirror / Atom feed
issue in the doc
2+ messages / 2 participants
[nested] [flat]

* issue in the doc
@ 2026-04-05 22:38  Yousef Mohamed <[email protected]>
  0 siblings, 1 reply; 2+ messages in thread

From: Yousef Mohamed @ 2026-04-05 22:38 UTC (permalink / raw)
  To: [email protected]

Page:
https://www.postgresql.org/docs/current/textsearch-intro.html

The documentation says:

tsvector @@ tsquery
tsquery  @@ tsvector
text @@ tsquery
text @@ text

The first two of these we saw already. The form text @@ tsquery is
equivalent to to_tsvector(x) @@ y. The form text @@ text is equivalent
to to_tsvector(x)
@@ plainto_tsquery(y).


Question:

In the expression:
to_tsvector(x) @@ plainto_tsquery(y)

what do x and y refer to exactly?

are they correspond to the left-hand and right-hand sides of the original
expression (text @@ text) ?

if yes , i think it's better to mention the order of the x and y like :
(x @@ y ) or ( y @@ x)

thanks


^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: issue in the doc
@ 2026-04-05 23:00  David G. Johnston <[email protected]>
  parent: Yousef Mohamed <[email protected]>
  0 siblings, 0 replies; 2+ messages in thread

From: David G. Johnston @ 2026-04-05 23:00 UTC (permalink / raw)
  To: Yousef Mohamed <[email protected]>; +Cc: [email protected] <[email protected]>

On Sunday, April 5, 2026, Yousef Mohamed <[email protected]>
wrote:
>
> Question:
>
> In the expression:
> to_tsvector(x) @@ plainto_tsquery(y)
>
> what do x and y refer to exactly?
>
Local variables for the single expression being described.  x is a text
typed value capable of being parsed as a vector, y is a text typed value
capable of being parsed as a query.  (Or unknown, which then defaults to
text.).


>
> are they correspond to the left-hand and right-hand sides of the original
> expression (text @@ text) ?
>
In that x comes before y in the English alphabet just like in that
left-to-right language left comes physically before right, yes.

(text @@ text) isn’t an expression, it’s one’s way of writing the name of a
type.

if yes , i think it's better to mention the order of the x and y like :
> (x @@ y ) or ( y @@ x)
>
I’m not following how you think this could be improved.  I get it’s very
western-centric, and admit it took me a moment to understand, but once I
did it seems quite clear to me.  A concrete change to consider would be
helpful if this still doesn’t make sense.  I have a few thoughts of my own,
chief among them being using real examples, but it doesn’t really my
threshold to work on at this time.

David J.


^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2026-04-05 23:00 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2026-04-05 22:38 issue in the doc Yousef Mohamed <[email protected]>
2026-04-05 23:00 ` David G. Johnston <[email protected]>

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox