Repository navigation
fix: exclude compiled artifacts from chunk lists - #18382
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan includes up to 10 reviews per rolling hour; 9 remain after this review. 📝 WalkthroughWalkthroughThe chunk list query now excludes records with an existing ChangesChunk list filtering
Estimated code review effort: 1 (Trivial) | ~5 minutes Merge Risk: ⚪ Minimal · up to This change narrowly excludes compiled artifacts from ordinary chunk lists while keeping pagination and totals aligned; no actionable merge-blocking risk remains beyond normal checks and review. Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
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. Comment |
wangq8
left a comment
There was a problem hiding this comment.
LGTM, thanks for the fix.
Verified the change against the Python implementation: list_chunks in api/apps/restful_apis/chunk_api.py uses the same "must_not": {"exists": "compile_kwd"} filter, so this correctly aligns Go behavior with Python.
Also confirmed the engine implementations handle the must_not + exists pair:
- elasticsearch/chunk.go builds a proper
bool.must_notexistsclause - infinity handles
must_not existsviaNOT (field != '') - oceanbase and serenedb both have explicit
must_not/exists handling
One minor note (non-blocking): the Infinity path relies on compile_kwd having an empty-string default so that NOT (compile_kwd != '') matches ordinary chunks. This is consistent with existing patterns (e.g. dataset_structure_graph.go), so no change needed — just flagging the assumption for future reference.
Test coverage looks adequate for the filter construction.
What problem does this PR solve?
The Go document chunks API included Wiki pages, sections, and other compiled artifacts in ordinary chunk lists. This PR excludes chunks containing
compile_kwd, aligning the Go behavior, pagination, and total count with the Python implementation.Type of change