DRG-10700: preference does not exist: sys.my_chinese_vgram_lexer
Self Checks
- [x] This is only for bug report, if you would like to ask a question, please head to Discussions.
- [x] I have searched for existing issues search for existing issues, including closed ones.
- [x] I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
- [x] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
- [x] 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.
✔️ Expected Behavior
no error
❌ Actual Behavior
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/
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