-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
报告BUG #63
Comments
请问自定义字典如何生效啊?我这样尝试字典没生效
这个是我的dockerfile
在启动日志中存在这样的日志,和这个有关系吗? pgvector-1 | 2025-01-24 00:54:38.352 UTC [190] LOG: pg_jieba Extension is not loaded by shared_preload_libraries, Variables can't be configured 我确认postgres.conf已经增加了如下内容,我尝试把pg_jieba换成pg_jieba.so也会出现上面的日志 # Add settings for extensions here
shared_preload_libraries = 'pg_jieba' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
PostgreSQL是多进程,pg_jieba的字典数据在每个进程中都加载了比较耗费内存,个人觉得字典数据应该加载在share_buffers中.
使用字典中不存在的关键字"新华三" 证明如下:
1 启动二个psql客户端,分别为A和B,在A和B中分别执行
输出,A和B结果完全相同
2 添加关键字
在服务器上修改文件jieba_user.dict
在用户字典中添加关键字"新华三"
3 终端A
终端A输出
to_tsvector ------------- '新华三':1 (1 行记录)
4 终端B
终端B输出
终端A和终端B中的结果完全不同
5 解决方法:
1 重启服务器,但生产环境不允许这么做;
2 修改字典后在每个连接在开始分词之前都需要重新加载字典;
The text was updated successfully, but these errors were encountered: