Note that there are some explanatory texts on larger screens.

plurals
  1. POWhich record is causing NOTICE: word is too long to be indexed
    text
    copied!<p>Using Postgres in a Rails app (with pg_search gem), I have enabled search with tsvector. In a database with over 35,000 records I get several messages saying </p> <pre><code>NOTICE: word is too long to be indexed DETAIL: Words longer than 2047 characters are ignored. </code></pre> <p>Am I correct in assuming a "word" does not include whitespace? how can i determine which records are causing this message?</p> <p>Here's the SQL generated by the migration which introduces the indexes</p> <pre><code> == AddIndexForFullTextSearch: migrating ====================================== -- add_column(:posts, :tsv, :tsvector) -&gt; 0.0344s -- execute(" CREATE INDEX index_posts_tsv ON posts USING gin(tsv);\n") -&gt; 0.1694s -- execute(" UPDATE posts SET tsv = (to_tsvector('english', coalesce(title, '')) || \n to_tsvector('english', coalesce(intro, '')) || \n to_tsvector('english', coalesce(body, '')));\n") 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. 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. -&gt; 343.0556s -- execute(" CREATE TRIGGER tsvectorupdate BEFORE INSERT OR UPDATE\n ON posts FOR EACH ROW EXECUTE PROCEDURE\n tsvector_update_trigger(tsv, 'pg_catalog.english', title, intro, body);\n") -&gt; 0.0266s </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload