Stream: implementers
Topic: How to respond to overly broad query
Jorge de la Garza (Nov 22 2016 at 20:58):
How should a server respond to a query that selects too many resources? We have paging implemented, so we will only actually return 20 or so resources at a time, but even with paging it hardly seems appropriate to respond to a query that selects 100K results, for example.
I have a feeling the answer will be, "That's up to you as a server", in which case we would probably just return 1,000 or so results (paged, of course). Is there some way we can reflect to the client that this search has been truncated? An OperationOutcome, perhaps? What would the code be?
Vadim Peretokin (Nov 22 2016 at 23:54):
If you think they're asking for too much, you can return an OperationOutcome with the too-costly code
Vadim Peretokin (Nov 22 2016 at 23:55):
That wouldn't exactly be a truncated search though, that would be a refusal to search
Grahame Grieve (Nov 23 2016 at 05:33):
you can send a too-costly after a set of results. A client could only understand that as 'too costly to continue'
Last updated: Apr 12 2022 at 19:14 UTC