Skip to content

DRG-10700: preference does not exist: sys.my_chinese_vgram_lexer #14628

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

Closed
5 tasks done
engchina opened this issue Mar 1, 2025 · 1 comment · Fixed by #14804
Closed
5 tasks done

DRG-10700: preference does not exist: sys.my_chinese_vgram_lexer #14628

engchina opened this issue Mar 1, 2025 · 1 comment · Fixed by #14804
Labels
🐞 bug Something isn't working

Comments

@engchina
Copy link
Contributor

engchina commented Mar 1, 2025

Self Checks

  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

v1.0.0

Cloud or Self Hosted

Self Hosted (Source)

Steps to reproduce

step.1 use oracle as vector store


docker compose -f docker-compose.middleware.yaml \
  --profile oracle \
  -p dify \
  up -d

step.2 create a knowledge and upload a text file.

Image

✔️ Expected Behavior

no error

❌ Actual Behavior

Image

Logs as below:

2025-03-01 12:21:07,731 INFO [strategy.py:161]  Task tasks.document_indexing_task.document_indexing_task[ef76302e-4d6a-483c-b05f-18e3f5084eba] received
2025-03-01 12:21:07,734 INFO [document_indexing_task.py:59]  Start process document: a2725224-a8ad-4b8a-9c75-5ddd47512e76
2025-03-01 12:21:08,198 ERROR [indexing_runner.py:96]  consume document failed
Traceback (most recent call last):
  File "/mnt/e/workspace/dify-oracle/api/core/indexing_runner.py", line 80, in run
    self._load(
  File "/mnt/e/workspace/dify-oracle/api/core/indexing_runner.py", line 570, in _load
    tokens += future.result()
              ^^^^^^^^^^^^^^^
  File "/root/miniconda3/lib/python3.12/concurrent/futures/_base.py", line 456, in result
    return self.__get_result()
           ^^^^^^^^^^^^^^^^^^^
  File "/root/miniconda3/lib/python3.12/concurrent/futures/_base.py", line 401, in __get_result
    raise self._exception
  File "/root/miniconda3/lib/python3.12/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/mnt/e/workspace/dify-oracle/api/core/indexing_runner.py", line 625, in _process_chunk
    index_processor.load(dataset, chunk_documents, with_keywords=False)
  File "/mnt/e/workspace/dify-oracle/api/core/rag/index_processor/processor/paragraph_index_processor.py", line 78, in load
    vector.create(documents)
  File "/mnt/e/workspace/dify-oracle/api/core/rag/datasource/vdb/vector_factory.py", line 157, in create
    self._vector_processor.create(texts=texts, embeddings=embeddings, **kwargs)
  File "/mnt/e/workspace/dify-oracle/api/core/rag/datasource/vdb/oracle/oraclevector.py", line 130, in create
    self._create_collection(dimension)
  File "/mnt/e/workspace/dify-oracle/api/core/rag/datasource/vdb/oracle/oraclevector.py", line 274, in _create_collection
    cur.execute(SQL_CREATE_INDEX.format(table_name=self.table_name))
  File "/mnt/e/workspace/dify-oracle/api/.venv/lib/python3.12/site-packages/oracledb/cursor.py", line 701, in execute
    impl.execute(self)
  File "src/oracledb/impl/thin/cursor.pyx", line 178, in oracledb.thin_impl.ThinCursorImpl.execute
  File "src/oracledb/impl/thin/protocol.pyx", line 438, in oracledb.thin_impl.Protocol._process_single_message
  File "src/oracledb/impl/thin/protocol.pyx", line 439, in oracledb.thin_impl.Protocol._process_single_message
  File "src/oracledb/impl/thin/protocol.pyx", line 432, in oracledb.thin_impl.Protocol._process_message
oracledb.exceptions.DatabaseError: ORA-29855: Error while processing the ODCIINDEXCREATE routine for index "ADMIN"."IDX_DOCS_EMBEDDING_VECTOR_INDEX_217F8777_0553_44EB_9C35_3936F8833E29_NODE".
ORA-20000: Oracle Text error:
DRG-10700: preference does not exist: sys.my_chinese_vgram_lexer
ORA-06512: at "CTXSYS.DRUE", line 192
ORA-06512: at "CTXSYS.TEXTINDEXMETHODS", line 350
Help: https://docs.oracle.com/error-help/db/ora-29855/

Copy link

dosubot bot commented Mar 1, 2025

To resolve the Oracle Text error "DRG-10700: preference does not exist: sys.my_chinese_vgram_lexer", ensure that the preference is created in the correct schema. The error indicates that the preference my_chinese_vgram_lexer is being referenced with the sys schema, but it should be created under the schema you are using.

You can create the preference with the following SQL block:

BEGIN
CTX_DDL.CREATE_PREFERENCE('my_chinese_vgram_lexer','CHINESE_VGRAM_LEXER');
END;
/

Make sure to execute this block in the correct schema where you intend to use the preference. If you are using the Dify platform, ensure that the session is set to the dify user or the appropriate user schema. You can do this by connecting as the dify user or by explicitly specifying the schema in the preference name if needed. Additionally, ensure that the session is set to the correct container, such as freepdb1, as shown in the Dify init_user.script [1].

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other

@dosubot dosubot bot added the 🐞 bug Something isn't working label Mar 1, 2025
jackzhuo pushed a commit to jackzhuo/dify that referenced this issue Mar 14, 2025
parambharat pushed a commit to parambharat/dify that referenced this issue Mar 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant