Add a query and corresponding result (or error) to the mock backend, meaning that if it receives a forward search for
through forward_search (or its asynchronous
variants), the mock backend will return the given
error to the caller.
If a set of
params is added to the backend multiple times, the most recently provided
will be used.
Exactly one of
error must be set. Empty result sets are represented as a
result set to return for the query, or
error to return for the query, or
query parameters to respond to, in the same format as accepted by search