Construct the ``Search`` object.
965617
def build_search(self):
        
        s = self.search()
        s = self.query(s, self._query)
        s = self.filter(s)
        if self.fields:
            s = self.highlight(s)
        s = self.sort(s)
        self.aggregate(s)
        return s
1213796
def search_line(line, search, searchtype):
    """"""
    if searchtype == 're' or searchtype == 'word':
        return re.search(search, line)  #, re.IGNORECASE)
    elif searchtype == 'pos':
        return searcher.search_out(line, search)
    elif searchtype == 'hyper':
        return searcher.hypernym_search(line, search)
1211277
def search(self, keyword, count=30):
        
        kwargs = {}
        kwargs['search_value'] = keyword
        root = self.root_directory
        entries = root._load_entries(func=self._req_files_search,
                                     count=count, page=1, **kwargs)

        res = []
        for entry in entries:
            if 'pid' in entry:
                res.append(_instantiate_directory(self, entry))
            else:
                res.append(_instantiate_file(self, entry))
        return res
1271291
def search(self, filterstr, attrlist):
        """"""
        return self._paged_search_ext_s(self.settings.BASE, ldap.SCOPE_SUBTREE, filterstr=filterstr,
                                        attrlist=attrlist, page_size=self.settings.PAGE_SIZE)
582688
def search(q, **kwargs):
    ''''''
    data = {'q': q}
    for key, value in kwargs.items():
        if value:
            if type(value) == bool:
                data[key] = 'on'
            else:
                data[key] = value
    return _unpaginated('search/?' + urlencode(data))
780400
def OnSearch(self, event):
        """"""

        search_string = self.search.GetValue()

        if search_string not in self.search_history:
            self.search_history.append(search_string)
        if len(self.search_history) > 10:
            self.search_history.pop(0)

        self.menu = self.make_menu()
        self.search.SetMenu(self.menu)

        search_flags = self.search_options + ["FIND_NEXT"]

        post_command_event(self, self.FindMsg, text=search_string,
                           flags=search_flags)

        self.search.SetFocus()
1202178
def create_search(pretty, **kw):
    ''''''
    req = search_req_from_opts(**kw)
    cl = clientv1()
    echo_json_response(call_and_wrap(cl.create_search, req), pretty)
404176
def search(cls, term, weights=None, with_score=False, score_alias='score',
               explicit_ordering=False):
        """"""
        return cls._search(
            term,
            weights,
            with_score,
            score_alias,
            cls.rank,
            explicit_ordering)
323788
def add_query(self, key_val={}):
        

        q = Q("match", **key_val)
        self.search = self.search.query(q)
        return self
1364772
def search_simple(self, index,itype, key, search_term):
        '''
        
        '''
        request = self.session
        url = 'http://%s:%s/%s/%s/_search?q=%s:%s' % (self.host,self.port,index,itype,key,search_term)
        response = request.get(url)

        return response
236512
def search(self, q, **kw):
        """"""
        url = '{base_url}/search/{stream}'.format(**vars(self))

        params = {
            'q': q,
        }
        params.update(self.params)
        params.update(kw)

        response = self.session.get(url, params=params)
        response.raise_for_status()
        return response.json()
507487
def query(self, search, query):
        
        if query:
            if self.fields:
                return search.query('multi_match', fields=self.fields, query=query)
            else:
                return search.query('multi_match', query=query)
        return search
114190
def search_prospects(self, search_type, query, offset=None, orgoffset=None):
        
        
        params = {'q': query}
        if offset and orgoffset:
            params['orgOffset'] = orgoffset
            params['timeOffset'] = offset
          
        return self._call('search/%s' % search_type, params)
930554
def find(self):
        """"""
        options = self.find_options.get_options()
        if options is None:
            return
        self.stop_and_reset_thread(ignore_results=True)
        self.search_thread = SearchThread(self)
        self.search_thread.sig_finished.connect(self.search_complete)
        self.search_thread.sig_current_file.connect(
            lambda x: self.status_bar.set_label_path(x, folder=False)
        )
        self.search_thread.sig_current_folder.connect(
            lambda x: self.status_bar.set_label_path(x, folder=True)
        )
        self.search_thread.sig_file_match.connect(
            self.result_browser.append_result
        )
        self.search_thread.sig_out_print.connect(
            lambda x: sys.stdout.write(str(x) + "\n")
        )
        self.status_bar.reset()
        self.result_browser.clear_title(
            self.find_options.search_text.currentText())
        self.search_thread.initialize(*options)
        self.search_thread.start()
        self.find_options.ok_button.setEnabled(False)
        self.find_options.stop_button.setEnabled(True)
        self.status_bar.show()
321643
def _instant_search(self):
        
        _keys = []
        for k,v in self.searchables.iteritems():
            if self.string in v:
                _keys.append(k)
        self.candidates.append(_keys)
1288499
def search(term, category=Categories.ALL, pages=1, sort=None, order=None):
	""""""
	s = Search()
	s.search(term=term, category=category, pages=pages, sort=sort, order=order)
	return s
161434
def search(self, filter, attributes=None):
        """"""
        if attributes is None:
            attributes = ['*']

        if filter is None:
            filter = ["(objectclass=*)"]

        # Convert filter list into an LDAP-consumable format
        filterstr = "(&{})".format(''.join(filter))
        self.conn.search(
            search_base=self.basedn,
            search_filter=filterstr,
            search_scope=ldap3.SUBTREE,
            attributes=attributes)
        return self.conn.entries