๐ Linked Issue
Closes #866
โ Type of Change
- ๐ Documentation (updates to docs or README)
- ๐ Bug fix (non-breaking change that fixes an issue)
- ๐ Enhancement (improves existing functionality)
- โจ New feature (non-breaking change that adds functionality)
- ๐งน Chore (build process or auxiliary tooling)
- โ ๏ธ Breaking change (fix or feature that changes existing behaviour)
๐ Description
With exact: true
, the search currently returns documents whose terms partially match the query instead of only those with an exact match.
Why it happens
- The search code first tokenises the
term
.
- For each token, it then checks the radix tree for that same token.
Unfortunetly, neither filters
nor facets
allow a strict equality between a property value and the full term. Below my proposal.
๐ ๏ธ Proposed Solution
- Keep the current token-level matching.
- Rename the internal
exact
flag to something explicit (e.g. exactToken
; open to suggestions).
- Apply the public
exact
option only when comparing the entire property value to the entire normalised term. (like implemented in this PR)
โ
Status
- Implementation complete
- Tests updated
- Documentation updated
@algora-pbc /claim #866