HAPI FHIR 3.0.0 search _count implementation change?


#1

Wondering if anyone has encountered or knows about changes to the HAPI implementation of the search API _count parameter between release 2.5 and 3.0.0?

With HAPI 2.5, when searching for resources, _count specifies how many “primary” resources I want returned, not including any resources included via _include parameter. For example, if I search for ProcedureRequest resources with _count=10 and an _include on ProcedureRequest.subject, I might get back a Bundle containing 10 ProcedureRequests and 10 Patients.

With 3.0.0, it seems that the _count now covers all returned resources. So, for the same search I might get back 7 ProcedureRequests and 3 Patients - no more than 10 resources total.

Seems like this will make it significantly more difficult to implement paging features. Is this an intentional change, and can it be reversed via configuration? Or, a bug?