def create_entry_for_section(
        self, section: ContentSection, toc: TableOfContents, abs_url: str
    ) -> None:
        """
        Given a section on the page, the table of contents and
        the absolute url for the page create an entry in the
        index.
        """
        toc_item = self._find_toc_by_id(toc, section.id)

        text = ' '.join(section.text) if self.config['indexing'] == 'full' else ''
        if toc_item is not None:
            self._add_entry(title=toc_item.title, text=text, loc=abs_url + toc_item.url)

        Given a section on the page, the table of contents and
        the absolute url for the page create an entry in the
        index.
        
mkdocs/contrib/search/search_index.py