Skip to content
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] 部署服务端数据库模式不能全文检索了 #3124

Closed
m-guo opened this issue Jul 2, 2024 · 44 comments · Fixed by #4725
Closed

[Bug] 部署服务端数据库模式不能全文检索了 #3124

m-guo opened this issue Jul 2, 2024 · 44 comments · Fixed by #4725
Assignees
Labels
🐛 Bug Something isn't working | 缺陷 released

Comments

@m-guo
Copy link

m-guo commented Jul 2, 2024

📦 Environment

Vercel

📌 Version

v1.2.3

💻 Operating System

macOS

🌐 Browser

Chrome

🐛 Bug Description

服务端数据库模式下不能本地数据库那行全文检索了,连话题也无法搜索了

📷 Recurrence Steps

No response

🚦 Expected Behavior

No response

📝 Additional Information

No response

@m-guo m-guo added the 🐛 Bug Something isn't working | 缺陷 label Jul 2, 2024
@github-project-automation github-project-automation bot moved this to Roadmap - Chat 1.x in Lobe Chat Routine Jul 2, 2024
@lobehubbot
Copy link
Member

👀 @m-guo

Thank you for raising an issue. We will investigate into the matter and get back to you as soon as possible.
Please make sure you have given us as much context as possible.
非常感谢您提交 issue。我们会尽快调查此事,并尽快回复您。 请确保您已经提供了尽可能多的背景信息。

@m-guo m-guo changed the title [Bug] 部署服务端数据库模式下不能本地数据库那行全文检索了 [Bug] 部署服务端数据库模式不能全文检索了 Jul 2, 2024
@arvinxx
Copy link
Contributor

arvinxx commented Jul 2, 2024

哪里的搜索挂了?我可以搜的呀

@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Where is the search broken? I can search it

@m-guo
Copy link
Author

m-guo commented Jul 2, 2024

command + K 搜索
Screenshot 2024-07-02 at 21 48 43

我部署的环境可以在多端设备上同步数据,文字和图片都同步过去了;但是搜索框单个字符都搜索不到。

@shog86
Copy link

shog86 commented Jul 5, 2024

我Vercel服务端部署的,确实搜不出来,对话内容和助手名字都搜不出来

image image

@xwydq
Copy link

xwydq commented Jul 8, 2024

服务端数据库模式下不能本地数据库那行全文检索了,连话题也无法搜索了

请问服务端数据库模式部署时 一直报错:

$ bun run db:migrate
$ MIGRATION_DB=1 tsx scripts/migrateServerDB/index.ts
❌ Database migrate failed: ErrorEvent {
  [Symbol(kTarget)]: WebSocket {
    _events: [Object: null prototype] {
      error: [Function],
      message: [Function],
      close: [Function],
      open: [Function]
    },
    _eventsCount: 4,
    _maxListeners: undefined,
    _binaryType: 'arraybuffer',
    _closeCode: 1006,
    _closeFrameReceived: false,
    _closeFrameSent: false,
    _closeMessage: <Buffer >,
    _closeTimer: null,
    _errorEmitted: true,
    _extensions: {},
    _paused: false,
    _protocol: '',
    _readyState: 3,
    _receiver: null,
    _sender: null,
    _socket: null,
    _bufferedAmount: 0,
    _isServer: false,
    _redirects: 0,
    _autoPong: true,
    _url: 'wss://35.232.28.18/v2',
    _req: null,
    [Symbol(shapeMode)]: false,
    [Symbol(kCapture)]: false
  },
  [Symbol(kType)]: 'error',
  [Symbol(kError)]: Error: unable to verify the first certificate
      at TLSSocket.onConnectSecure (node:_tls_wrap:1674:34)
      at TLSSocket.emit (node:events:518:28)
      at TLSSocket._finishInit (node:_tls_wrap:1085:8)
      at ssl.onhandshakedone (node:_tls_wrap:871:12) {
    code: 'UNABLE_TO_VERIFY_LEAF_SIGNATURE'
  },
  [Symbol(kMessage)]: 'unable to verify the first certificate'
}
error: script "db:migrate" exited with code 1
error: script "build-migrate-db" exited with code 1
error: script "postbuild" exited with code 1
Error: Command "bun run build" exited with 1

是什么原因

@m-guo
Copy link
Author

m-guo commented Jul 11, 2024

Screenshot 2024-07-11 at 21 54 52
在话题搜索框里可以进行全文检索。版本 v1.3.5

我的部署环境完全使用官方文档的步骤和用到的服务(数据库)。

@shog86
Copy link

shog86 commented Jul 11, 2024

Screenshot 2024-07-11 at 21 54 52

在话题搜索框里可以进行全文检索。版本 v1.3.5

我的部署环境完全使用官方文档的步骤和用到的服务(数据库)。

这儿搜索是有结果的,但你在助手列表那里(也就是首页)搜索有结果吗,我就搜看到的助手名字(里的一个词)都没任何结果显示

@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Screenshot 2024-07-11 at 21 54 52

Full-text search can be performed in the topic search box. Version v1.3.5

My deployment environment completely uses the steps of the official documentation and the services (database) used.

Do you have any results for your search? I just searched for the name of the assistant (one word in it) but no results were displayed.

@m-guo
Copy link
Author

m-guo commented Jul 12, 2024

Screenshot 2024-07-11 at 21 54 52
在话题搜索框里可以进行全文检索。版本 v1.3.5
我的部署环境完全使用官方文档的步骤和用到的服务(数据库)。

这儿搜索是有结果的,但你在助手列表那里(也就是首页)搜索有结果吗,我就搜看到的助手名字(里的一个词)都没任何结果显示

没有啊,这个单子原本就是反馈这个问题的,我这个只是补充下信息。

@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


![Screenshot 2024-07-11 at 21 54 52](https://private-user-images.githubusercontent.com/8684229/347844962-ac2b208f-f489-417e-b48d-273ee35f09d2.png?jwt=eyJhbGciOiJIUzI1 NiIsInR5cCI6IkpXVCJ9. .zWre4775wmpJ30u5DnBr1d6wYPxhptiAeAca27izGcw)
Full text search can be performed in the topic search box. Version v1.3.5
My deployment environment completely uses the steps of the official documentation and the services (database) used.

The search here yields results, but does your search in the assistant list (that is, the home page) yield any results? I just searched for the assistant name (one word in it) and no results were displayed.

No, this list was originally for feedback on this issue. I am just adding information.

@Aliang-code
Copy link

应该是要指定这个

# 指定 Postgres database driver 为 node
DATABASE_DRIVER=node

@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


This should be specified

#Specify Postgres database driver as node
DATABASE_DRIVER=node

@m-guo
Copy link
Author

m-guo commented Aug 1, 2024

应该是要指定这个

# 指定 Postgres database driver 为 node
DATABASE_DRIVER=node

我的情况确实是没有配置这个,翻了下文档,是应该添加这个环境变量。

但是我添加完,然后重新部署之后还是无法搜索,一样的现象。

@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


This should be specified

# Specify Postgres database driver as node
DATABASE_DRIVER=node

In my case, this was indeed not configured. After reading the documentation, I found that this environment variable should be added.

But after I added it and redeployed it, I still couldn't search, the same phenomenon.

@m-guo
Copy link
Author

m-guo commented Aug 2, 2024

应该是要指定这个

# 指定 Postgres database driver 为 node
DATABASE_DRIVER=node

我的情况确实是没有配置这个,翻了下文档,是应该添加这个环境变量。

但是我添加完,然后重新部署之后还是无法搜索,一样的现象。

我使用的 Vercel 提供的那个 Vercel Postgres,这个应该不需要配置DATABASE_DRIVER,所以还是不知道哪里的问题。

@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


This should be specified

# Specify Postgres database driver as node
DATABASE_DRIVER=node

In my case, this is indeed not configured. I looked through the documentation and found that this environment variable should be added.

But after I added it and redeployed it, I still couldn't search, the same phenomenon.

The Vercel Postgres provided by Vercel that I use should not need to be configured with DATABASE_DRIVER, so I still don’t know what the problem is.

@arvinxx
Copy link
Contributor

arvinxx commented Aug 2, 2024

是 bug ,我近期修下

@arvinxx arvinxx self-assigned this Aug 2, 2024
@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


It's a bug, I'll fix it soon

@80imike
Copy link

80imike commented Sep 2, 2024

是 bug ,我近期修下

image image

v1.15.6 这个 bug 依旧存在,现在是还没有修复吗? @arvinxx

部署环境为 docker

@CloudPassenger
Copy link
Contributor

The same problem occurs in my senerio, using Vercel + Neon Postgres deployment

@arvinxx
Copy link
Contributor

arvinxx commented Sep 12, 2024

@80imike @CloudPassenger 还没修,近期修复

@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


@80imike @CloudPassenger Not fixed yet, will be fixed soon

@80imike
Copy link

80imike commented Sep 23, 2024

@80imike @CloudPassenger 还没修,近期修复

这个问题 1.9.22 还没有修复呀,期待尽快修复,没有搜索的确不方便

@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


@80imike @CloudPassenger Not fixed yet, will be fixed soon

This problem has not been fixed in 1.9.22. We hope it will be fixed as soon as possible. It is really inconvenient not to search.

@zcsunt
Copy link

zcsunt commented Oct 15, 2024

same problem

@80imike
Copy link

80imike commented Oct 19, 2024

再来看看,期待早日修复

@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Let’s take another look and look forward to an early fix.

@m-guo
Copy link
Author

m-guo commented Oct 25, 2024

期待早日修复,还是很重要的功能的。

@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Looking forward to an early fix, it is still a very important function.

@80imike
Copy link

80imike commented Nov 8, 2024

这个 bug 修复优先级有点低呀,这都 4 个月了还没有修

@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


The priority of fixing this bug is a bit low. It has not been fixed for more than 4 months.

@arvinxx
Copy link
Contributor

arvinxx commented Nov 9, 2024

@80imike 这个月后半月弄下,其实也困扰我😅

@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


@80imike I got it done in the second half of this month, it actually bothers me too😅

@lobehubbot
Copy link
Member

@m-guo

This issue is closed, If you have any questions, you can comment and reply.
此问题已经关闭。如果您有任何问题,可以留言并回复。

@lobehubbot
Copy link
Member

🎉 This issue has been resolved in version 1.32.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@m-guo
Copy link
Author

m-guo commented Nov 19, 2024

1.32.1 版本还是无法全文检索,只解决了搜索助手的名字:
image

@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Version 1.32.1 still cannot search full text, only the name of the search assistant is solved:
image

@arvinxx
Copy link
Contributor

arvinxx commented Nov 19, 2024

@cy948 是不是可以考虑把 message 的 content 检索也加上?

@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


@cy948 Is it possible to consider adding the content search of message?

@cy948
Copy link
Contributor

cy948 commented Nov 19, 2024

@arvinxx 按照目前的实现,如果直接搜消息内容全文可能会有性能问题。可能得先建全文索引才能做。

@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


@arvinxx According to the current implementation, there may be performance issues if you directly search the full text of the message content. You may have to build a full-text index before you can do it.

@m-guo
Copy link
Author

m-guo commented Nov 27, 2024

image

除了不能全文检索,现在除了可以在第一个内部搜索,其余的助手内部检索功能也失效了:
image

@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


image

In addition to not being able to search the full text, now except for the first internal search, the rest of the assistant's internal search functions are also invalid:
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Bug Something isn't working | 缺陷 released
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

10 participants