0

Is there a way to quickly determine if a search matches anything? Something like a HEAD request - don't send a body, just send a "total" or the like. A search with total=0 isn't a 404...or should it be?

Chris Grenz
  • 161
  • 9
  • I thought a search with _count=0 would suffice for this, but Grahame's server, Spark, and WildFHIR return results. `http://spark-dstu2.furore.com/fhir/Patient?_count=0` returns entries. – Chris Grenz Oct 09 '15 at 16:25

2 Answers2

1

We probably should make clear whether _count=0 is legal or not. Can you make a change request?

At the moment, there isn't a way to submit a query and indicate that no rows can come back. Certainly documenting that as a use of _count=0 would be a possibility, but there was no intention of supporting that when we introduced _count.

Lloyd McKenzie
  • 6,345
  • 1
  • 13
  • 10
1

there is an answer to this: _summary=count will return the number of matches without return any actual matches

Grahame Grieve
  • 3,538
  • 3
  • 15
  • 17