            end
          )
   end
+  defp update_relations(document), do: document
 end

    |> Enum.map(&(update_in(&1, [:doc], fn doc -> format_document(doc) end)))
  end

  defp update_relations(document) do
    if not Map.has_key?(document.resource, :relations), do: document, else:
      document
      |> update_in([:resource, :relations],
           fn rel -> for {k, v} <- rel, into: %{} do

defmodule Core.CorePropertiesAtomizing do
  import Core.Utils

  @core_properties [:groups, :relations, :shortDescription, :id, :type, :category, :identifier, :geometry, :gazId,
