Check the Object or Document if Exist

Hi everyone, How to check all of the document if exist. 
I query all of the data have Document Id and I want to check all of that using in the single query

  Discussion posts and replies are publicly visible