Receive doc as a query. See which documents need to be indexed.