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

搜索报错 #4

Closed
xugui0821 opened this issue Mar 29, 2023 · 10 comments
Closed

搜索报错 #4

xugui0821 opened this issue Mar 29, 2023 · 10 comments

Comments

@xugui0821
Copy link

xugui0821 commented Mar 29, 2023

搜索不存在的消息就正常返回信息显示搜不到,存在的就返回错误,系统是ubuntu22.04
E 03-29 05:44:50.437 web_protocol:403] Error handling request
Traceback (most recent call last):
File "/usr/local/lib/python3.10/dist-packages/aiohttp/web_protocol.py", line 433, in _handle_request
resp = await request_handler(request)
File "/usr/local/lib/python3.10/dist-packages/aiohttp/web_app.py", line 504, in _handle
resp = await handler(request)
File "/home/luoxu/luoxu/web.py", line 27, in get
res = await self._get(request)
File "/home/luoxu/luoxu/web.py", line 53, in _get
groupinfo, messages = await self.dbconn.search(q)
File "/home/luoxu/luoxu/db.py", line 167, in search
ret += await self._search_one_year(
File "/home/luoxu/luoxu/db.py", line 218, in _search_one_year
rows = await conn.fetch(sql, *params)
File "/usr/local/lib/python3.10/dist-packages/asyncpg/connection.py", line 620, in fetch
return await self._execute(
File "/usr/local/lib/python3.10/dist-packages/asyncpg/connection.py", line 1658, in _execute
result, _ = await self.__execute(
File "/usr/local/lib/python3.10/dist-packages/asyncpg/connection.py", line 1683, in __execute
return await self._do_execute(
File "/usr/local/lib/python3.10/dist-packages/asyncpg/connection.py", line 1730, in _do_execute
result = await executor(stmt, None)
File "asyncpg/protocol/protocol.pyx", line 201, in bind_execute
asyncpg.exceptions.InvalidParameterValueError: pgroonga: object isn't found: <Lexicon0_0>

@lilydjwg
Copy link
Owner

你的 pgroonga 版本是多少?

@xugui0821
Copy link
Author

你的 pgroonga 版本是多少?

postgresql-14-pgroonga/jammy,now 2.4.7-1.ubuntu22.04.1

@xugui0821
Copy link
Author

降级试了下,降到2.4.5可以了

@SpriteOvO
Copy link

Same problem here, solved by downgrade to https://github.com/pgroonga/pgroonga/releases/tag/2.4.5.

@berberman
Copy link

来自 pgroonga 3.0.8 的错误:

[E 07-20 17:49:36.702 web_protocol:403] Error handling request
    Traceback (most recent call last):
      File "/nix/store/vpq7yy50xv7zg218cc7ag6lbyl6fxsph-python3.10-aiohttp-3.8.4/lib/python3.10/site-packages/aiohttp/web_protocol.py", line 433, in _handle_request
        resp = await request_handler(request)
      File "/nix/store/vpq7yy50xv7zg218cc7ag6lbyl6fxsph-python3.10-aiohttp-3.8.4/lib/python3.10/site-packages/aiohttp/web_app.py", line 504, in _handle
        resp = await handler(request)
      File "/nix/store/b1kaz7al9f85jvg8a9ll1v7cg9nzkxzk-luoxu-unstable-2023-07-09/lib/python3.10/site-packages/luoxu/web.py", line 27, in get
        res = await self._get(request)
      File "/nix/store/b1kaz7al9f85jvg8a9ll1v7cg9nzkxzk-luoxu-unstable-2023-07-09/lib/python3.10/site-packages/luoxu/web.py", line 53, in _get
        groupinfo, messages = await self.dbconn.search(q)
      File "/nix/store/b1kaz7al9f85jvg8a9ll1v7cg9nzkxzk-luoxu-unstable-2023-07-09/lib/python3.10/site-packages/luoxu/db.py", line 167, in search
        ret += await self._search_one_year(
      File "/nix/store/b1kaz7al9f85jvg8a9ll1v7cg9nzkxzk-luoxu-unstable-2023-07-09/lib/python3.10/site-packages/luoxu/db.py", line 218, in _search_one_year
        rows = await conn.fetch(sql, *params)
      File "/nix/store/5qrkdq68d2ahdyflahyznm7iwlng57h1-python3.10-asyncpg-0.27.0/lib/python3.10/site-packages/asyncpg/connection.py", line 620, in fetch
        return await self._execute(
      File "/nix/store/5qrkdq68d2ahdyflahyznm7iwlng57h1-python3.10-asyncpg-0.27.0/lib/python3.10/site-packages/asyncpg/connection.py", line 1658, in _execute
        result, _ = await self.__execute(
      File "/nix/store/5qrkdq68d2ahdyflahyznm7iwlng57h1-python3.10-asyncpg-0.27.0/lib/python3.10/site-packages/asyncpg/connection.py", line 1683, in __execute
        return await self._do_execute(
      File "/nix/store/5qrkdq68d2ahdyflahyznm7iwlng57h1-python3.10-asyncpg-0.27.0/lib/python3.10/site-packages/asyncpg/connection.py", line 1730, in _do_execute
        result = await executor(stmt, None)
      File "asyncpg/protocol/protocol.pyx", line 201, in bind_execute
    asyncpg.exceptions.InvalidParameterValueError: pgroonga: [highlight-html] PGrnCreateSimilarTemporaryLexicon: index must not a parent index: <message_idx>

@lilydjwg
Copy link
Owner

不会修 QAQ

@eth3lbert
Copy link
Contributor

AFAICT from the reported error log, it appears that indexes should be explicitly added to each child table messages_y20xx instead of the parent table messages.

@rde9
Copy link

rde9 commented Nov 30, 2023

@lilydjwg 可以在 README 里添加说明一下吗,今天迁移数据库全程很顺利,直到在 luoxu-web 查询时冒出来 server get itself in trouble...

asyncpg.exceptions.InvalidParameterValueError: pgroonga: [highlight-html] PGrnCreateSimilarTemporaryLexicon: index must not a parent index: <message_idx>

拷打 ChatGPT 许久没解决,刚想来提 issue 发现已经有人遇到过此问题。

(降级 2.4.5 有效)

@lilydjwg
Copy link
Owner

lilydjwg commented Dec 2, 2023

@rde9 加上了。

@eth3lbert
Copy link
Contributor

pgroonga_highlight_html(..., 'message_idx') without specify the index 'message_idx' should fix the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants