Here's some code to make anonymous elasticsearch possible for the released_publications system.