 
 
     persona_ids = from(c in Persona, where: is_nil(c.elastic) or c.elastic == false,
-                                       limit: ^limit,
-                                       select: c.id)
+                                     limit: ^limit,
+                                     select: c.id)
     |> Repo.all()
 
     for id <- persona_ids, do: Persona.update_search_index(id)


    Logger.info("=== Indexed #{length(podcast_ids)} podcasts ===")


    episode_ids = from(c in Episode, where: is_nil(c.elastic) or c.elastic == false,
                                       limit: ^episode_limit,
                                       select: c.id)
    |> Repo.all()

    for id <- episode_ids, do: Episode.update_search_index(id)

    from(c in Episode, where: c.id in ^episode_ids)
    |> Repo.update_all(set: [elastic: true])

    Logger.info("=== Indexed #{length(episode_ids)} episodes ===")

    Logger.info("=== Indexing finished ===")
  end



    podcast_ids = from(c in Podcast, where: is_nil(c.elastic) or c.elastic == false,
                                     limit: ^limit,
                                     select: c.id)
    |> Repo.all()

    for id <- podcast_ids, do: Podcast.update_search_index(id)
