[dreamwidth/dreamwidth] ba7e09: Add t/search-manticore.t: end-to-end test for Sphi...
Branch: refs/heads/main Home: https://github.com/dreamwidth/dreamwidth Commit: ba7e09ed3116998f6a745752a3a9bc840415912d https://github.com/dreamwidth/dreamwidth/commit/ba7e09ed3116998f6a745752a3a9bc840415912d Author: Mark Smith mark@dreamwidth.org Date: 2026-04-23 (Thu, 23 Apr 2026)
Changed paths: A t/search-manticore.t
Log Message:
Add t/search-manticore.t: end-to-end test for Sphinx::Search against Manticore
Validates the read path of sphinx-search-gm will work when retargeted
at
lj::MANTICORE — specifically that Sphinx::Search's binary protocol
is accepted on Manticore port 3312, that the filter semantics match
what we expect, and that BuildExcerpts works.
The test creates a throwaway RT table (dw1_selftest) in Manticore via
SphinxQL CREATE TABLE, populates it with a curated set of docs covering
each test scenario, runs queries, and drops the table at END. Skips
entirely if
lj::MANTICORE isn't configured, so CI without a Manticore
instance won't fail.
Covers 15 test cases: 1. Baseline keyword match via Sphinx::Search 2. Phrase match (SPH_MATCH_PHRASE with quoted query) 3. Public entry visible in global search; other entries excluded 4. Private entry hidden by security_bits filter 5. Private entry visible with ignore_security path 6. Friends-only entry: matching allowmask bit returns doc 7. Friends-only entry: non-matching allowmask bit excludes doc 8. is_deleted=1 filtered out 9. allow_global_search=0 excluded from global 10. Journal-scoped search (journalid filter) 11. Comments excluded when SetFilterRange('jtalkid', 0, 0) 12. Comments included when that filter isn't applied 13. Sort by date_posted, ASC and DESC 14. BuildExcerpts returns highlighted keyword snippets 15. Defensive SetFilter('security_bits', [0], 1) exclusion (protects against malformed docs with a 0 in their MVA)
Co-Authored-By: Claude Opus 4.7 (1M context) noreply@anthropic.com
To unsubscribe from these emails, change your notification settings at https://github.com/dreamwidth/dreamwidth/settings/notifications
