Skip to content

Fix invalid query string (e.g. ?) will error search - #18217

Merged
wangq8 merged 1 commit into
infiniflow:mainfrom
wangq8:bugfix/fix-invalid-query-error-search
Aug 13, 2026
Merged

wangq8 merged 1 commit into
infiniflow:mainfrom
wangq8:bugfix/fix-invalid-query-error-search

Conversation

@wangq8

@wangq8 wangq8 commented Aug 13, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

@dosubot dosubot Bot added size:S This PR changes 10-29 lines, ignoring generated files. 🐞 bug Something isn't working, pull request that fix bug. labels Aug 13, 2026
@wangq8 wangq8 added the ci Continue Integration label Aug 13, 2026
@wangq8
wangq8 requested a review from qinling0210 August 13, 2026 07:52
@coderabbitai

coderabbitai Bot commented Aug 13, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 615555e2-1ddb-4891-80d0-e6ec42b4226e

📥 Commits

Reviewing files that changed from the base of the PR and between 9dae986 and 989c39e.

📒 Files selected for processing (1)
  • rag/nlp/search.py

📝 Walkthrough

Walkthrough

Search expression construction now omits empty full-text expressions in text-only searches, hybrid searches, and the fallback hybrid path. Vector and fusion expressions remain active when no text expression exists.

Changes

Search expression filtering

Layer / File(s) Summary
Conditional expression construction
rag/nlp/search.py
Text-only and hybrid search calls now include full-text expressions only when they exist. The fallback hybrid search uses the same filtering logic while retaining vector and fusion expressions.

Estimated code review effort: 2 (Simple) | ~10 minutes

Mergeability Score: ⚪ Minimal · up to 989c3

This is a localized query-handling fix with no actionable merge-blocking risk remaining after normal checks and review.

Suggested reviewers: kevinhush, cleanjunc, deadtrickster

Poem

A rabbit checks the search array,
No empty text slips in there.
Dense and fusion still run true,
Fallback paths follow through.
Clean results hop with care!

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning The pull request has no description, so it does not provide the required summary or background context. Add a Summary section that explains the search error, the cause, and how the change prevents invalid full-text expressions.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title identifies the main change: preventing search errors caused by invalid or empty query strings.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Aug 13, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.65%. Comparing base (401f943) to head (989c39e).
⚠️ Report is 14 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #18217   +/-   ##
=======================================
  Coverage   90.65%   90.65%           
=======================================
  Files          10       10           
  Lines         717      717           
  Branches      118      118           
=======================================
  Hits          650      650           
  Misses         39       39           
  Partials       28       28           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@qinling0210 qinling0210 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@wangq8
wangq8 merged commit bedc395 into infiniflow:main Aug 13, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🐞 bug Something isn't working, pull request that fix bug. ci Continue Integration size:S This PR changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants