Fixed indexing resource when it's not published or deleted