postgres之分词搜索
针对一些模糊搜索的场景,有时搜索的内容是一句话,此时就要根据这句话的内容进行分词,根据分词进行模糊匹配,这里其实比较成熟的方案可以使用Elasticsearch来进行分词搜索,Elasticsearch使用中文分词插件进行分词,检索时还可以返回相似度等,但是Elasticsearch资源消耗太大了,这里使用postgres来简单的实现这个功能。postgres文档检索匹配For text s...
2024-08-29