Skip to content

fix(qdrant): fix hybrid search routing for named-vector collections #2575#2703

Open
SuperFlashkittyking wants to merge 2 commits into
langgenius:mainfrom
SuperFlashkittyking:main
Open

fix(qdrant): fix hybrid search routing for named-vector collections #2575#2703
SuperFlashkittyking wants to merge 2 commits into
langgenius:mainfrom
SuperFlashkittyking:main

Conversation

@SuperFlashkittyking

Copy link
Copy Markdown

Plugin Submission

Plugin information

Submission type

  • New plugin
  • Version update

What changed

Fixes #2575

This PR resolves a critical routing bug where hybrid search requests on collections with named vectors would fail with a 400 error.

The tool invocation logic (qdrant.py) previously checked for a plain query/text search before inferring hybrid search indicators. As a result, anytime text was present, the request degraded into a plain vector search, ignoring the sparse/dense vector structures required by the named vector configuration.

Changes made:

  1. Reordered operation inference in qdrant.py to prioritize hybrid search parameters (dense_vector, sparse_vector, etc.) over generic text check.
  2. Added a fallback check inside the query dispatch block to redirect operation == "query" to hybrid_search if both dense and sparse vectors are present.
  3. Repackaged the source files into the official .difypkg bundle format.

Risk level

  • Low risk
  • Medium risk
  • High risk

Required checks

  • I have read and followed the Marketplace submission requirements.
  • I have read and comply with the Plugin Developer Agreement.
  • I tested this plugin on Dify Community Edition and Dify Cloud, or documented any limitation below.
  • The package contains only files needed at runtime.
  • The package does not contain secrets, local credentials, .env files, .git directories, virtual environments, caches, logs, or IDE files.
  • The package does not contain executables or bundled binaries, or I explained why they are required below.
  • The plugin README includes setup steps, usage instructions, required APIs or credentials, connection requirements, and the source repository link.
  • The plugin includes PRIVACY.md or a hosted privacy policy, and manifest.yaml references it.
  • All user-facing text is primarily in English, with any localized README files following the i18n guidance.

Security and privacy notes

None

Local validation

Validated locally by adjusting the execution block within qdrant.py and verifying that hybrid routing now properly directs to Qdrant's query APIs instead of degrading to plain text vectors.

Reviewer notes

None

@github-actions github-actions Bot added the risk: low Low-risk Marketplace submission label Jul 14, 2026

@crazywoola crazywoola left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❌ Request Changes

Decision: Request changes

Failed Checks

Check Status Detail Required action
Project structure ❌ Fail Missing files: manifest.yaml, README.md, PRIVACY.md. Present: . _assets/: no. Include all required files in the package: manifest.yaml, README.md, PRIVACY.md, and _assets/.
Manifest parsing ❌ Fail manifest.yaml not found: /var/folders/vc/vfsgl8611qn508whmstl644w0000gn/T/pr-review-helper-zrbvoh5w/unpacked_plugin/manifest.yaml Resolve the failing check and push an updated package.
README language ❌ Fail README.md not found in plugin package. Remove Chinese characters from README.md and use the multilingual README pattern: https://docs.dify.ai/en/develop-plugin/features-and-specs/plugin-types/multilingual-readme#multilingual-readme
PRIVACY.md ❌ Fail PRIVACY.md not found in plugin package. A privacy policy file is required for marketplace submission. Add a non-empty PRIVACY.md file to the plugin package.
dify_plugin version ❌ Fail dify_plugin must be installed and >= 0.9.0, but it was not found. Use dify_plugin >= 0.9.0 in the packaged plugin environment.
Packaging test ❌ Fail Command failed (1): /var/folders/vc/vfsgl8611qn508whmstl644w0000gn/T/pr-review-helper-zrbvoh5w/.venv/bin/python /var/folders/vc/vfsgl8611qn508whmstl644w0000gn/T/pr-review-helper-zrbvoh5w/toolkit/uploader/upload-package.py -d /var/folders/vc/vfsgl8611qn508whms… Fix the plugin so upload-package.py --test passes.

Full Check Results

Check Status Detail Required action
PR content language ✅ Pass PR title/body CJK ratio=0.0% (zh=0, en=2057, ignored_zh=0, allowed_zh<=0) None.
Project structure ❌ Fail Missing files: manifest.yaml, README.md, PRIVACY.md. Present: . _assets/: no. Include all required files in the package: manifest.yaml, README.md, PRIVACY.md, and _assets/.
Manifest parsing ❌ Fail manifest.yaml not found: /var/folders/vc/vfsgl8611qn508whmstl644w0000gn/T/pr-review-helper-zrbvoh5w/unpacked_plugin/manifest.yaml Resolve the failing check and push an updated package.
README language ❌ Fail README.md not found in plugin package. Remove Chinese characters from README.md and use the multilingual README pattern: https://docs.dify.ai/en/develop-plugin/features-and-specs/plugin-types/multilingual-readme#multilingual-readme
PRIVACY.md ❌ Fail PRIVACY.md not found in plugin package. A privacy policy file is required for marketplace submission. Add a non-empty PRIVACY.md file to the plugin package.
Dependency install ✅ Pass requirements.txt not found; skipped. None.
dify_plugin version ❌ Fail dify_plugin must be installed and >= 0.9.0, but it was not found. Use dify_plugin >= 0.9.0 in the packaged plugin environment.
Install test ✅ Pass requirements.txt not found; skipped. None.
Packaging test ❌ Fail Command failed (1): /var/folders/vc/vfsgl8611qn508whmstl644w0000gn/T/pr-review-helper-zrbvoh5w/.venv/bin/python /var/folders/vc/vfsgl8611qn508whmstl644w0000gn/T/pr-review-helper-zrbvoh5w/toolkit/uploader/upload-package.py -d /var/folders/vc/vfsgl8611qn508whms… Fix the plugin so upload-package.py --test passes.

Next steps

  • Project structure: Include all required files in the package: manifest.yaml, README.md, PRIVACY.md, and _assets/.
  • Manifest parsing: Resolve the failing check and push an updated package.
  • README language: Remove Chinese characters from README.md and use the multilingual README pattern: https://docs.dify.ai/en/develop-plugin/features-and-specs/plugin-types/multilingual-readme#multilingual-readme
  • PRIVACY.md: Add a non-empty PRIVACY.md file to the plugin package.
  • dify_plugin version: Use dify_plugin >= 0.9.0 in the packaged plugin environment.
  • Packaging test: Fix the plugin so upload-package.py --test passes.

Please address these issues and push an update.

fix: repackage plugin with flat structure and english readme。

@crazywoola crazywoola left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❌ Request Changes

Decision: Request changes

Failed Checks

Check Status Detail Required action
dify_plugin version ❌ Fail dify_plugin version must be >= 0.9.0; found 0.7.4. Use dify_plugin >= 0.9.0 in the packaged plugin environment.

Full Check Results

Check Status Detail Required action
PR content language ✅ Pass PR title/body CJK ratio=0.0% (zh=0, en=2057, ignored_zh=0, allowed_zh<=0) None.
Project structure ✅ Pass All expected files present: manifest.yaml, README.md, PRIVACY.md. _assets/: yes. None.
Manifest author ✅ Pass author is valid. None.
Icon validation ✅ Pass icon exists: _assets/icon.svg None.
Version check ✅ Pass version 0.0.1 is available. None.
README language ✅ Pass README.md CJK ratio=0.0% (zh=0, en=5481, allowed_zh<=0) None.
PRIVACY.md ✅ Pass PRIVACY.md exists and is non-empty. None.
Dependency install ✅ Pass requirements installed successfully. None.
dify_plugin version ❌ Fail dify_plugin version must be >= 0.9.0; found 0.7.4. Use dify_plugin >= 0.9.0 in the packaged plugin environment.
Install test ✅ Pass plugin install test passed. None.
Packaging test ✅ Pass packaging check passed. None.

Next steps

  • dify_plugin version: Use dify_plugin >= 0.9.0 in the packaged plugin environment.

Please address these issues and push an update.

@crazywoola crazywoola left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❌ Request Changes

Decision: Request changes

Failed Checks

Check Status Detail Required action
dify_plugin version ❌ Fail dify_plugin version must be >= 0.9.0; found 0.7.4. Use dify_plugin >= 0.9.0 in the packaged plugin environment.

Full Check Results

Check Status Detail Required action
PR content language ✅ Pass PR title/body CJK ratio=0.0% (zh=0, en=2057, ignored_zh=0, allowed_zh<=0) None.
Project structure ✅ Pass All expected files present: manifest.yaml, README.md, PRIVACY.md. _assets/: yes. None.
Manifest author ✅ Pass author is valid. None.
Icon validation ✅ Pass icon exists: _assets/icon.svg None.
Version check ✅ Pass version 0.0.1 is available. None.
README language ✅ Pass README.md CJK ratio=0.0% (zh=0, en=5481, allowed_zh<=0) None.
PRIVACY.md ✅ Pass PRIVACY.md exists and is non-empty. None.
Dependency install ✅ Pass requirements installed successfully. None.
dify_plugin version ❌ Fail dify_plugin version must be >= 0.9.0; found 0.7.4. Use dify_plugin >= 0.9.0 in the packaged plugin environment.
Install test ✅ Pass plugin install test passed. None.
Packaging test ✅ Pass packaging check passed. None.

Next steps

  • dify_plugin version: Use dify_plugin >= 0.9.0 in the packaged plugin environment.

Please address these issues and push an update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk: low Low-risk Marketplace submission

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[yaxuanm/qdrant] Hybrid Search fails on named-vector collections (dense/sparse)

2 participants