Partial matches and OR for plain-language questions
For human review. This came from a usage review of knolo-box. A human maintainer will review and implement this manually. No code or PRs come with this issue. No version bump or npm publish is requested.
Summary
Search requires every term to match. Ordinary plain-language questions and OR-style queries therefore return empty results even when several of the terms are present in the image. Stopwords are not dropped, quoted phrases are not first-class, and there is no fallback to the best partial matches.
Steps to reproduce
- Build a knolo-box image that contains content about posting or integrating with a named service, plus other skills.
- Call
knolo_searchwith a natural-language question such as "how do I post to a named service" (several content words plus stopwords). - Observe an empty result set even though some of the content words appear in the image.
- Call
knolo_searchwith an OR-style multi-term query. Observe empty results when not every branch is present in one chunk.
Expected behavior
- Drop common stopwords from unquoted queries.
- Support OR between terms or groups, and support quoted phrases as exact sequences.
- When nothing matches all remaining terms, fall back to the best partial matches and include a clear note in the response (and ideally the receipt) that the result is a partial match.
- Keep empty results only when no term matches at all.
Why it matters
Agents ask full questions, not keyword bags. All-terms-required turns those questions into silent failures and pushes callers back to guessing filenames instead of using Knolo.
Acceptance criteria
- Natural-language questions with stopwords return relevant hits when the content words are present.
- OR queries return hits that match any branch, with deterministic ordering.
- Quoted phrases require contiguous matches.
- Partial-match fallback is labeled in the tool response and covered by a fixture test.
Related
- Whole-word / minimum term length follow-up (file alongside this issue if present)
- #79 / #87:
@knolo/mcpsearch tools
A human maintainer will review and implement this manually.