In a java application I want to find out, whether my index is empty or not (containing zero documents, or containing at least one documents).
I have the feeling, that counting all documents (by sending a search request with size=0) is not readable and might not be optimal in performance.
Is there a dedicated way for to check, whether an index is empty?