Missing OceanBase config enable_hybrid_search init #12171

Closed
opened 2026-02-21 19:06:09 -05:00 by yindo · 1 comment
Owner

Originally created by @yourchanges on GitHub (Mar 26, 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

main

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

The file https://github.com/langgenius/dify/blob/main/api/core/rag/datasource/vdb/oceanbase/oceanbase_vector.py#L298

OceanBaseVectorConfig(
                host=dify_config.OCEANBASE_VECTOR_HOST or "",
                port=dify_config.OCEANBASE_VECTOR_PORT or 0,
                user=dify_config.OCEANBASE_VECTOR_USER or "",
                password=(dify_config.OCEANBASE_VECTOR_PASSWORD or ""),
                database=dify_config.OCEANBASE_VECTOR_DATABASE or "",
            ),

should be

OceanBaseVectorConfig(
                host=dify_config.OCEANBASE_VECTOR_HOST or "",
                port=dify_config.OCEANBASE_VECTOR_PORT or 0,
                user=dify_config.OCEANBASE_VECTOR_USER or "",
                password=(dify_config.OCEANBASE_VECTOR_PASSWORD or ""),
                database=dify_config.OCEANBASE_VECTOR_DATABASE or "",
                enable_hybrid_search=dify_config.OCEANBASE_ENABLE_HYBRID_SEARCH or False,
            ),

✔️ Expected Behavior

The file https://github.com/langgenius/dify/blob/main/api/core/rag/datasource/vdb/oceanbase/oceanbase_vector.py#L298

should be

OceanBaseVectorConfig(
                host=dify_config.OCEANBASE_VECTOR_HOST or "",
                port=dify_config.OCEANBASE_VECTOR_PORT or 0,
                user=dify_config.OCEANBASE_VECTOR_USER or "",
                password=(dify_config.OCEANBASE_VECTOR_PASSWORD or ""),
                database=dify_config.OCEANBASE_VECTOR_DATABASE or "",
                enable_hybrid_search=dify_config.OCEANBASE_ENABLE_HYBRID_SEARCH or False,
            ),

Actual Behavior

The file https://github.com/langgenius/dify/blob/main/api/core/rag/datasource/vdb/oceanbase/oceanbase_vector.py#L298

OceanBaseVectorConfig(
                host=dify_config.OCEANBASE_VECTOR_HOST or "",
                port=dify_config.OCEANBASE_VECTOR_PORT or 0,
                user=dify_config.OCEANBASE_VECTOR_USER or "",
                password=(dify_config.OCEANBASE_VECTOR_PASSWORD or ""),
                database=dify_config.OCEANBASE_VECTOR_DATABASE or "",
            ),
Originally created by @yourchanges on GitHub (Mar 26, 2025). ### Self Checks - [x] This is only for bug report, if you would like to ask a question, please head to [Discussions](https://github.com/langgenius/dify/discussions/categories/general). - [x] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - [x] I confirm that I am using English to submit this report (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). - [x] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:) - [x] Please do not modify this template :) and fill in all the required fields. ### Dify version main ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce The file https://github.com/langgenius/dify/blob/main/api/core/rag/datasource/vdb/oceanbase/oceanbase_vector.py#L298 ``` OceanBaseVectorConfig( host=dify_config.OCEANBASE_VECTOR_HOST or "", port=dify_config.OCEANBASE_VECTOR_PORT or 0, user=dify_config.OCEANBASE_VECTOR_USER or "", password=(dify_config.OCEANBASE_VECTOR_PASSWORD or ""), database=dify_config.OCEANBASE_VECTOR_DATABASE or "", ), ``` should be ``` OceanBaseVectorConfig( host=dify_config.OCEANBASE_VECTOR_HOST or "", port=dify_config.OCEANBASE_VECTOR_PORT or 0, user=dify_config.OCEANBASE_VECTOR_USER or "", password=(dify_config.OCEANBASE_VECTOR_PASSWORD or ""), database=dify_config.OCEANBASE_VECTOR_DATABASE or "", enable_hybrid_search=dify_config.OCEANBASE_ENABLE_HYBRID_SEARCH or False, ), ``` ### ✔️ Expected Behavior The file https://github.com/langgenius/dify/blob/main/api/core/rag/datasource/vdb/oceanbase/oceanbase_vector.py#L298 should be ``` OceanBaseVectorConfig( host=dify_config.OCEANBASE_VECTOR_HOST or "", port=dify_config.OCEANBASE_VECTOR_PORT or 0, user=dify_config.OCEANBASE_VECTOR_USER or "", password=(dify_config.OCEANBASE_VECTOR_PASSWORD or ""), database=dify_config.OCEANBASE_VECTOR_DATABASE or "", enable_hybrid_search=dify_config.OCEANBASE_ENABLE_HYBRID_SEARCH or False, ), ``` ### ❌ Actual Behavior The file https://github.com/langgenius/dify/blob/main/api/core/rag/datasource/vdb/oceanbase/oceanbase_vector.py#L298 ``` OceanBaseVectorConfig( host=dify_config.OCEANBASE_VECTOR_HOST or "", port=dify_config.OCEANBASE_VECTOR_PORT or 0, user=dify_config.OCEANBASE_VECTOR_USER or "", password=(dify_config.OCEANBASE_VECTOR_PASSWORD or ""), database=dify_config.OCEANBASE_VECTOR_DATABASE or "", ), ```
yindo added the 👻 feat:rag label 2026-02-21 19:06:09 -05:00
yindo closed this issue 2026-02-21 19:06:09 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Mar 26, 2025):

@yourchanges Hello there! I'm here to help you with any bugs, questions, or contributions you have regarding this project. I'm a bot designed to assist you while waiting for a human maintainer. Let me know how I can assist you!

To address the issue of the missing enable_hybrid_search parameter in the OceanBaseVectorConfig class, you should update the configuration as follows:

In the oceanbase_vector.py file, modify the instantiation of OceanBaseVectorConfig to include the enable_hybrid_search parameter:

OceanBaseVectorConfig(
    host=dify_config.OCEANBASE_VECTOR_HOST or "",
    port=dify_config.OCEANBASE_VECTOR_PORT or 0,
    user=dify_config.OCEANBASE_VECTOR_USER or "",
    password=(dify_config.OCEANBASE_VECTOR_PASSWORD or ""),
    database=dify_config.OCEANBASE_VECTOR_DATABASE or "",
    enable_hybrid_search=dify_config.OCEANBASE_ENABLE_HYBRID_SEARCH or False,
)

This change ensures that the enable_hybrid_search parameter is included and set to dify_config.OCEANBASE_ENABLE_HYBRID_SEARCH or defaults to False if not specified. This is crucial for enabling hybrid search functionality in the OceanBase configuration [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[bot] commented on GitHub (Mar 26, 2025): <!-- Greeting --> @yourchanges Hello there! I'm here to help you with any bugs, questions, or contributions you have regarding this project. I'm a bot designed to assist you while waiting for a human maintainer. Let me know how I can assist you! <!-- Answer --> To address the issue of the missing `enable_hybrid_search` parameter in the `OceanBaseVectorConfig` class, you should update the configuration as follows: In the `oceanbase_vector.py` file, modify the instantiation of `OceanBaseVectorConfig` to include the `enable_hybrid_search` parameter: ```python OceanBaseVectorConfig( host=dify_config.OCEANBASE_VECTOR_HOST or "", port=dify_config.OCEANBASE_VECTOR_PORT or 0, user=dify_config.OCEANBASE_VECTOR_USER or "", password=(dify_config.OCEANBASE_VECTOR_PASSWORD or ""), database=dify_config.OCEANBASE_VECTOR_DATABASE or "", enable_hybrid_search=dify_config.OCEANBASE_ENABLE_HYBRID_SEARCH or False, ) ``` This change ensures that the `enable_hybrid_search` parameter is included and set to `dify_config.OCEANBASE_ENABLE_HYBRID_SEARCH` or defaults to `False` if not specified. This is crucial for enabling hybrid search functionality in the OceanBase configuration <sup>[[1]](https://github.com/langgenius/dify/blob/main/api/core/rag/datasource/vdb/oceanbase/oceanbase_vector.py)</sup>. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.* --- <sup>Help Dosu learn! Give it feedback: [Great Response](https://app.dosu.dev/response-feedback/4db4123b-986d-4f49-bfda-729d2a8542ee?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/4db4123b-986d-4f49-bfda-729d2a8542ee?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/4db4123b-986d-4f49-bfda-729d2a8542ee?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/4db4123b-986d-4f49-bfda-729d2a8542ee?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/4db4123b-986d-4f49-bfda-729d2a8542ee?feedback_type=hallucination) | [Bug Report](https://app.dosu.dev/response-feedback/4db4123b-986d-4f49-bfda-729d2a8542ee?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/4db4123b-986d-4f49-bfda-729d2a8542ee?feedback_type=other)</sup>
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#12171