Add: definition to check if index hast a document