You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
search: multiple terms are OR, but the help text documents AND #425
Under the documented AND semantics the second command would return nothing, since neither recipe contains both terms.
Cause
cooklang-find's count_matches sums each term's occurrence count and keeps any file scoring above zero, so any single matching term is enough.
Question for maintainers
This is really two things, and only the first is unambiguous:
The documentation was wrong. That is being corrected in the library-extraction branch — the help text and docs/search.md now describe OR.
Whether the behaviour should change to match the original documented intent is a product decision. Narrowing on additional terms is the more common convention and is what the help text promised, but changing it would alter results for existing users.
Filing so the second question gets decided deliberately rather than settled by whichever text someone reads first.
Noticed while extracting search into a library crate, where the semantics had to be pinned by tests.
Activity
feat(search): require every term to match