Search sections in the configuration which name starts with the provided search criteria
        :param searched_sections:
        :return: a dict containing the found sections and their parameters
172497
def _search_sections(self, searched_sections=''):
        
        found_sections = {}
        # Get the daemons related properties
        for section in self.config.sections():
            if not section.startswith(searched_sections):
                continue

            if section not in found_sections:
                found_sections.update({section: {'imported_from': self.configuration_file}})
            for (key, value) in self.config.items(section):
                found_sections[section].update({key: value})
        return found_sections
290761
def _do_search(self):
        
        if self._results_cache is None:
            response = self.raw()
            results = self.to_python(response.get('hits', {}).get('hits', []))
            self._results_cache = DictSearchResults(
                self.type, response, results, None)
        return self._results_cache
208109
def search(cls, query, search_opts=None):
        

        if search_opts is None:
            search_opts = {}

        xmlrpc = XMLRPCConnection()
        try:
            search_result = xmlrpc.connection.search_vrf(
                {
                    'query': query,
                    'search_options': search_opts,
                    'auth': AuthOptions().options
                })
        except xmlrpclib.Fault as xml_fault:
            raise _fault_to_exception(xml_fault)
        result = dict()
        result['result'] = []
        result['search_options'] = search_result['search_options']
        for v in search_result['result']:
            result['result'].append(VRF.from_dict(v))

        return result
703002
def all(self, sort=None, **kwargs):
        
        sortStr = ''
        if sort is not None:
            sortStr = '?sort=' + sort
        
        key = '/library/sections/%s/all%s' % (self.key, sortStr)
        return self.fetchItems(key, **kwargs)
1103519
def get_section_config(self, section):
        

        if section not in self._config:
            return self._config["DEFAULT"]
        return self._config[section]
1064972
def search_topics(self, keyword, sort='relevance', start=0):
        
        xml = self.api.xml(API_GROUP_SEARCH_TOPICS % (start, sort, keyword))
        return build_list_result(self._parse_topic_table(xml), xml)
915947
def search(self, using=None):
        
        return Search(
            using=using or self._using,
            index=self._name,
            doc_type=self._doc_types
        )
1167912
def process_config_section(cls, config_section, storage):
        
        # -- CONCEPT:
        # if not storage:
        #     # -- INIT DATA: With default parts.
        #     storage.update(dict(_PERSONS={}))

        schema = cls.select_config_schema_for(config_section.name)
        if not schema:
            message = "No schema found for: section=%s"
            raise LookupError(message % config_section.name)

        # -- PARSE AND STORE CONFIG SECTION:
        section_storage = cls.select_storage_for(config_section.name, storage)
        section_data = parse_config_section(config_section, schema)
        section_storage.update(section_data)
73892
def section(self, section):
        
        # check if the named section exists
        if self.config.has_section(section):
            return (True, self.config.items(section))
        return (False, 'Section: ' + section + ' does not exist')
1278215
def search(self):
        """"""

        matches = []
        for pattern in Config.patterns:
            matches += self.termfinder(pattern)

        return sorted(set(matches), key=int)
1255511
def parse_section_entry_points(self, section_options):
        
        parsed = self._parse_section_to_dict(section_options, self._parse_list)
        self['entry_points'] = parsed
526917
def search_tags(self, tag_name):

        

        response = self._req('/browse/tags/search', {
            "tag_name":tag_name
        })

        tags = list()

        for item in response['results']:
            tags.append(item['tag_name'])

        return tags
987722
def _search_url_titles(self, title):
        
        # make the search
        logger.info('Searching title name for %r', title)
        r = self.session.get(self.server_url + 'subtitle/search/', params={'q': title}, timeout=10)
        r.raise_for_status()

        # check for redirections
        if r.history and all([h.status_code == 302 for h in r.history]):
            logger.debug('Redirected to the subtitles page')
            links = [r.url]
        else:
            # get the suggestions (if needed)
            soup = ParserBeautifulSoup(r.content, ['lxml', 'html.parser'])
            links = [link.attrs['href'] for link in soup.select('#processes div.generalWindowTop a')]
            logger.debug('Found %d suggestions', len(links))

        url_titles = defaultdict(list)
        for link in links:
            parts = link.split('/')
            url_titles[parts[-3]].append(parts[-2])

        return url_titles
1052398
def searches(self):
        
        return self._get_object(
            regex=re.compile(
                r'((?<=\n)|(?<=^))(?P<title>\[Searches\]:) *(?P<tagString>( *?@\S*(\(.*?\))?)+)?(?P<content>(\n(    |\t).*)*)', re.UNICODE),
            objectType="searchBlock",
            content=None
        )
943126
def sort(self, search):
        
        if self._sort:
            search = search.sort(*self._sort)
        return search
1220381
def get_reference_section_beginning(fulltext):
    """"""
    sect_start = {
        'start_line': None,
        'end_line': None,
        'title_string': None,
        'marker_pattern': None,
        'marker': None,
        'how_found_start': None,
    }

    # Find start of refs section:
    sect_start = find_reference_section(fulltext)
    if sect_start is not None:
        sect_start['how_found_start'] = 1
    else:
        # No references found - try with no title option
        sect_start = find_reference_section_no_title_via_brackets(fulltext)
        if sect_start is not None:
            sect_start['how_found_start'] = 2
        # Try weaker set of patterns if needed
        if sect_start is None:
            # No references found - try with no title option (with weaker
            # patterns..)
            sect_start = find_reference_section_no_title_via_dots(fulltext)
            if sect_start is not None:
                sect_start['how_found_start'] = 3
            if sect_start is None:
                # No references found - try with no title option (with even
                # weaker patterns..)
                sect_start = find_reference_section_no_title_via_numbers(
                    fulltext)
                if sect_start is not None:
                    sect_start['how_found_start'] = 4

    if sect_start:
        current_app.logger.debug('* title %r' % sect_start['title_string'])
        current_app.logger.debug('* marker %r' % sect_start['marker'])
        current_app.logger.debug('* title_marker_same_line %s'
                                 % sect_start['title_marker_same_line'])
    else:
        current_app.logger.debug('* could not find references section')
    return sect_start
43185
def spotlight_search_route(context, request):
    
    catalogs = [
        CATALOG_ANALYSIS_REQUEST_LISTING,
        "portal_catalog",
        "bika_setup_catalog",
        "bika_catalog",
        "bika_catalog_worksheet_listing"
    ]

    search_results = []
    for catalog in catalogs:
        search_results.extend(search(catalog=catalog))

    # extract the data from all the brains
    items = map(get_brain_info, search_results)

    return {
        "count": len(items),
        "items": sorted(items, key=itemgetter("title")),
    }