def _build_search_index(self):
        logger.info("Checking if full sphinx index build required")
        check_files = [
            '/var/lib/sphinxsearch/data/document.spp',
        ]
        needs_init = False
        for check_f in check_files:
            with hide(*fab_quiet):
                check_result = sudo('ls %s' % check_f)
            if check_result.failed:
                needs_init = True
                break

        if not needs_init:
            logger.info("Sphinx indexes already exist")
            return False

        logger.info("Building full sphinxsearch index")
        with hide(*fab_output_hides):
            # Chown relevant directories to belong to policystat.
            sudo(
                'chown -R %s '
                '/var/lib/sphinxsearch /var/log/sphinxsearch'
                '' % F_CHOWN
            )

            with hide(*fab_quiet):
                # Stop searchd
                sudo('stop sphinxsearch')
                sudo('killall searchd')

            # Build the main index then the delta
            index_result = sudo_bg(
                'indexer document && indexer document_delta',
                user='policystat',
            )
            if index_result.failed:
                logger.critical(
                    "Error building sphinx indexes. Result: %s",
                    index_result,
                )

        return True
Read graph in GraphML format from string.
dataset/ETHPy150Open winhamwr/neckbeard/neckbeard/brain_wrinkles/pstat/app.py/AppServerProvisioner._build_search_index--crossover with--dataset/ETHPy150Open gkno/gkno_launcher/src/networkx/readwrite/graphml.py/parse_graphml