Full text index not being used, even though it is in the plan - Mailing list pgsql-general

From Alex Neth
Subject Full text index not being used, even though it is in the plan
Date
Msg-id 7D12FB69-F053-40B5-A214-174C03CD8B82@liivid.com
Whole thread Raw
Responses Re: Full text index not being used, even though it is in the plan  (Gregory Stark <stark@enterprisedb.com>)
List pgsql-general
I am trying to use a full text index, but it seems to be reindexing on
every query.

The query plan looks fine, but the queries take extremely long (hours
even).  I think it is reindexing because it is notifying me that
certain long "words" won't be indexed as you can see below, which is
what it does when I create the index.



=> explain select id from source_listings where
plainto_tsquery('view') @@ to_tsvector('english', full_listing);
                                                QUERY PLAN
--------------------------------------------------------------------------------------------------------
  Bitmap Heap Scan on source_listings  (cost=1454.88..7445.47
rows=1595 width=4)
    Recheck Cond: (plainto_tsquery('view'::text) @@
to_tsvector('english'::regconfig, full_listing))
    ->  Bitmap Index Scan on kw2_index  (cost=0.00..1454.48 rows=1595
width=0)
          Index Cond: (plainto_tsquery('view'::text) @@
to_tsvector('english'::regconfig, full_listing))

=> explain analyze select id from source_listings where
plainto_tsquery('view') @@ to_tsvector('english', full_listing);
NOTICE:  word is too long to be indexed
DETAIL:  Words longer than 2047 characters are ignored.
NOTICE:  word is too long to be indexed
DETAIL:  Words longer than 2047 characters are ignored.
... it just keeps building a new index until I kill it
Cancel request sent








pgsql-general by date:

Previous
From: Russ Brown
Date:
Subject: Re: PGSQL or other DB?
Next
From: Alex
Date:
Subject: Re: Full text index not being used