Re: Postgres Full Text Search Jsonb Array column does not searchfor first row - Mailing list pgsql-general

From Laurenz Albe
Subject Re: Postgres Full Text Search Jsonb Array column does not searchfor first row
Date
Msg-id 5256d03491ac4a90ae0cf0662712160d63612857.camel@cybertec.at
Whole thread Raw
List pgsql-general
On Tue, 2019-11-26 at 13:37 +0200, Dmytro Zhluktenko wrote:
> Pgsql is unable to perform indexed full text search onto jsonb column containing an array when looking for the first
rowin the table.
 
> 
> Any ideas why this is happening?
>  
> CREATE OR REPLACE FUNCTION cp.make_tsvector(in_t cp."Repro")
>  RETURNS tsvector
>  LANGUAGE plpgsql
>  IMMUTABLE
> 
> [...] 
>  
> CREATE INDEX repro_fts_idx ON cp."Repro" USING gin (cp.make_tsvector(cp."Repro".*)) WITH (fastupdate=off,
gin_pending_list_limit='64');
>  
> [...]
>
> -- explain analyze
> SELECT *
>  FROM "cp"."Repro" x where cp.make_tsvector(x) @@ 'sup:*'::tsquery

One possibility is that there ar just too few rows in the table.

SET enable_seqscan = off;

and then try again.

If that is not the problm, please provide EXPLAIN (ANALYZE, BUFFERS) output for
the query.

Yours,
Laurenz Albe
-- 
Cybertec | https://www.cybertec-postgresql.com




pgsql-general by date:

Previous
From: Yessica Brinkmann
Date:
Subject: Re: I think that my data is saved correctly, but when printing again,other data appears
Next
From: github kran
Date:
Subject: Re: PostGreSQL Replication and question on maintenance