Thread

  1. Full Text Search German Date

    Thorsten <thorstennrw@gmx.de> — 2025-05-24T07:51:00Z

    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?
    
  2. Re: Full Text Search German Date

    Tom Lane <tgl@sss.pgh.pa.us> — 2025-05-24T14:37:12Z

    Thorsten <ThorstenNRW@gmx.de> 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