Only create index if entity is published.