Fix for #2837 by checking if all the indices were missing and failing that.

setting ignore_indices=missing will fail your query if all the indices are missing as opposed to making your query run against everything.. fixes #2837