hapifhir / hapi-fhir

🔥 HAPI FHIR - Java API for HL7 FHIR Clients and Servers
http://hapifhir.io
Apache License 2.0
2.04k stars 1.33k forks source link

Total is incorrect when using fulltext in combination with regular SearchParameter #6434

Open jdar8 opened 2 weeks ago

jdar8 commented 2 weeks ago

When performing a search that uses _total=accurate that intersects a JPA search and a fulltext search, the total returned is incorrect.

It turns out that we actually don't support this. We should block `_total=accurate` on queries that intersect JPA and Fulltext, as it is impossible to calculate the true total. It should return a 400 with an explanation error.