Throw a more meaningful message when no document is specified for indexing