public inbox for [email protected]  
help / color / mirror / Atom feed
Full Text Search German Date
2+ messages / 2 participants
[nested] [flat]

* Full Text Search German Date
@ 2025-05-24 07:51  Thorsten <[email protected]>
  0 siblings, 1 reply; 2+ messages in thread

From: Thorsten @ 2025-05-24 07:51 UTC (permalink / raw)
  To: [email protected]

I encountered a problem I don't understand.

I create a tsvector (in a column named "search") from document files, 
which contain a German date. When I select the column, I can see it has 
been tokenized:

'25.05.2025':56,99 (plus many other tokens)

but
SELECT id FROM documents WHERE
search @@ to_tsquery('german', '25.05.2025')

gives no result.

But this query returns true:
select to_tsvector('german', 'bla baum haus 25.05.2025 blub fahrrad')
@@ to_tsquery('german', '25.05.2025')

And also the following query returns true:
select '25.05.2025:1 blub:2'::tsvector @@ to_tsquery('german', '25.05.2025')

Can someone explain me, why my query on the database fails?


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

* Re: Full Text Search German Date
@ 2025-05-24 14:37  Tom Lane <[email protected]>
  parent: Thorsten <[email protected]>
  0 siblings, 0 replies; 2+ messages in thread

From: Tom Lane @ 2025-05-24 14:37 UTC (permalink / raw)
  To: Thorsten <[email protected]>; +Cc: [email protected]

Thorsten <[email protected]> writes:
> I create a tsvector (in a column named "search") from document files, 
> which contain a German date. When I select the column, I can see it has 
> been tokenized:
> '25.05.2025':56,99 (plus many other tokens)
> but
> SELECT id FROM documents WHERE
> search @@ to_tsquery('german', '25.05.2025')
> gives no result.

What is the plan for that query --- is it using an index?
Maybe the index is corrupt, in which case REINDEX could fix it.

			regards, tom lane






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


end of thread, other threads:[~2025-05-24 14:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2025-05-24 07:51 Full Text Search German Date Thorsten <[email protected]>
2025-05-24 14:37 ` Tom Lane <[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