admin管理员组文章数量:1333730
I created a GIN index on a table in PostgreSQL database. It was created without issue, see below create index statement. Then I used a select query to search the table, also see below.
create index posts_full_text_search_json_idx on posts using gin (
to_tsvector('english', ((json->>'name')) || ' ' || ((json->>'city')) || ' ' || ((json->>'state')) || ' ' || ((json->>'abbr')) || ' ' || ((json->>'category')) || ' ' || ((json->>'subcategory')))
);
select * from posts where approved=true and (to_tsvector('english', ((json->>'name')) || ' ' || ((json->>'city')) || ' ' || ((json->>'state')) || ' ' || ((json->>'abbr')) || ' ' || ((json->>'category')) || ' ' || ((json->>'subcategory'))) @@ to_tsquery('english', :terms)) limit 200;
:terms is swapped for the search terms via PHP PDO.
This worked right away, no issues, very fast results (about 20-50ms). But, recently it stopped returning results, no matter what I search for, even if there is guaranteed to be results.
Thanks for reading!
I did some Google searching and did a REINDEX of the index and that did not help, I've restarted the PostgreSQL server, rebooted a few times. But the query still returns 0 results. I'm out of solutions. Has anybody run into this before?
本文标签: PostgreSQL full text search stops returning resultsStack Overflow
版权声明:本文标题:PostgreSQL full text search stops returning results - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742323483a2453260.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论