fix(index): extract magic numbers 50 and 30 to named constants#91
fix(index): extract magic numbers 50 and 30 to named constants#91
Conversation
Replace hardcoded context window sizes in extract_highlight() with named constants HIGHLIGHT_PRE_CONTEXT_CHARS and HIGHLIGHT_POST_CONTEXT_CHARS to improve readability and avoid magic numbers.
|
Warning Rate limit exceeded
To keep reviews running without waiting, you can enable usage-based add-on for your organization. This allows additional reviews beyond the hourly cap. Account admins can enable it under billing. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Review rate limit: 0/1 reviews remaining, refill in 27 minutes and 46 seconds.Comment |
Summary
50and30inextract_highlight()to named constantsHIGHLIGHT_PRE_CONTEXT_CHARSandHIGHLIGHT_POST_CONTEXT_CHARSTest plan
cargo test --package cloudsearch-index -- highlight_positions_case_insensitive— passescargo clippy --package cloudsearch-index --all-targets— clean