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
The search index indexes all documents by their fields, with an additional advanced feature of prefixing the search with the field name. For example, this doc:
{
"name": "gareth"
}
Will by indexed by: "gareth", "name:gareth".
The idea is users can search for "name:gar" to ignore docs with a value starting with "garage" in another field. The problem is when someone searches for "nam" then every doc with a "name" field is returned.
To Reproduce
Steps to reproduce the behavior:
Go to Contacts tab
Search for "nam"
See all contacts returned
Expected behavior
Only a subset of contacts should be returned - those with a field value that starts with "nam".
Describe the bug
The search index indexes all documents by their fields, with an additional advanced feature of prefixing the search with the field name. For example, this doc:
Will by indexed by: "gareth", "name:gareth".
The idea is users can search for "name:gar" to ignore docs with a value starting with "garage" in another field. The problem is when someone searches for "nam" then every doc with a "name" field is returned.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Only a subset of contacts should be returned - those with a field value that starts with "nam".
Screenshots
Environment
Additional context
Raised on the forum: https://forum.communityhealthtoolkit.org/t/unexpected-search-results/3288/16
The text was updated successfully, but these errors were encountered: