Selecting a number and a date does not prove that a query requires both conditions. Check the filter combination rules and keep authorisation independent of optional search controls.
Describe the intended set before writing parameters
A useful requirement might be: records received yesterday for number A, inside the current authorised workspace. Those are three restrictions that should all hold. If numbers A and B are both allowed candidates, group that choice before combining it with the date window and workspace boundary.
Query tools have specific boolean semantics. Elasticsearch, for example, documents its own conjunction and disjunction mechanisms, but an SMS API need not expose the same language. Read the service’s combination rules, defaults and empty-value behaviour. Where documentation is incomplete, use permitted test data to establish the behaviour instead of experimenting against other users’ resources.

A small fixture set exposes an overly broad query
| Fixture | Expected for “A and this day” |
|---|---|
| A, inside the day | Included |
| A, outside the day | Excluded |
| B, inside the day | Excluded |
| Unauthorised workspace | Never returned |
If the middle two fixtures appear, check whether the filters were joined with OR or whether a missing parameter removed a restriction. Also check the time field: received time and last-updated time can select different sets. Retain the effective request values with the test result, not just a screenshot of the visible controls.
Saved searches deserve a separate check after parameter names or defaults change. A bookmark can carry an older query even when the current form looks correct. Validate the effective conditions on load and make an invalid saved filter visible instead of silently running a broader default search.
A search field is not an access boundary
Removing the number filter must not broaden the response beyond the caller’s authorised resources. A hidden selection, a disabled option or a default browser value cannot enforce that server-side requirement. Test the API’s actual response within the approved test scope, including requests with optional filters absent.

When a legitimate search returns nothing, keep the permission scope fixed while checking the address, field mapping and date interpretation. Clearing everything at once makes it harder to learn which condition caused the mismatch. It can also produce a broad result that looks reassuring without answering the original question.
If downloads and lists use separate query implementations, compare their record identities under the same intended filters. Equal counts do not prove equal membership. One path might include a record the other omits while still producing the same total.
Before release, cover defaults, explicit empty values, multiple selected numbers, date boundaries and invalid parameters. If the interface resets a filter during navigation, display the current effective scope. A user should not have to remember whether yesterday’s date selection survived opening a new view before trusting the records on screen.
Reference: Elasticsearch: boolean queries. Its syntax illustrates combination rules; it is not a claim about the implementation of any particular SMS inbox.
