Postgresql - converting text to ts_vector

你说的曾经没有我的故事 提交于 2020-01-03 09:32:18

问题


Sorry for the basic question.

I have a table with the following columns.

      Column |  Type   | Modifiers 
     --------+---------+-----------
      id     | integer | 
      doc_id | bigint  | 
      text   | text    | 
  • I am trying to do text matching on the 'text' (3rd column)
  • I receive an error message when I try to text match on the text column. Saying that the string is too long for ts_vector.

I only want observations which contain the words "other events"

    SELECT * FROM eightks\d
    WHERE to_tsvector(text) @@ to_tsquery('other_events')

I know that there are limitation to the length of the ts_vector.

Error Message

   ERROR:  string is too long for tsvector (2368732 bytes, max 1048575 bytes)

How do I convert the text column into a ts_vector and will this resolve my size limit problem?Alternatively, How do I exclude observations over the maximum size?

Postgres version 9.3.5.0

Here is the reference to the limit limit

Thanks

来源:https://stackoverflow.com/questions/25716500/postgresql-converting-text-to-ts-vector

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!