In a large set of entries across multiple sections, how can I loop through each section type in the set?
Try using the group filter

{% set entries = craft.entries.search(query).order('score') %}

{% for sectionName, sectionEntries in entries | group('section.name') %}
    &lt;h2&gt;{{ sectionName }}&lt;/h2&gt;

    &lt;ul&gt;
        {% for entry in sectionEntries %}
            &lt;li&gt;{{ entry.title }}&lt;/li&gt;
        {% endfor %}
    &lt;/ul&gt;
{% endfor %}