Constructs a :class:`~bloop.search.PreparedSearch`.
166390
def prepare(self):
        """"""
        p = PreparedSearch()
        p.prepare(
            engine=self.engine,
            mode=self.mode,
            model=self.model,
            index=self.index,
            key=self.key,
            filter=self.filter,
            projection=self.projection,
            consistent=self.consistent,
            forward=self.forward,
            parallel=self.parallel
        )
        return p
501523
private void doCreate() throws SearchException, PageException {
	required("collection", action, "collection", collection);
	required("collection", action, "path", path);
	getSearchEngine().createCollection(collection, path, language, SearchEngine.DENY_OVERWRITE);
    }
991868
def _build_search_values(self, kwargs):
        
        criteria = {}
        for key in self._search_by:
            if getattr(self, key, None):
                criteria[key] = getattr(self, key)
            elif key in kwargs and kwargs.get(key):
                criteria[key] = kwargs.get(key)
        return criteria
621105
def _constructor(cls, mapping, configuration):
        
        attr = cls(mapping)
        attr._setattr('_sequence_type', configuration)

        return attr
160076
def _new_percolator(spec, search_pattern):
    """"""
    if spec and search_pattern:
        query = query_string_parser(search_pattern=search_pattern).to_dict()
        for index in current_search.mappings.keys():
            # Create the percolator doc_type in the existing index for >= ES5
            # TODO: Consider doing this only once in app initialization
            percolator_doc_type = _get_percolator_doc_type(index)
            _create_percolator_mapping(index, percolator_doc_type)
            current_search_client.index(
                index=index, doc_type=percolator_doc_type,
                id='oaiset-{}'.format(spec),
                body={'query': query}
            )
897815
private void constructContentMapper() {
        // Initialize the request resolver
        String contentMapperClassName = getParam(INIT_CONTENT_MAPPER_CLASS_NAME);
        Logger.getLogger(getClass()).debug("WebDAV Servlet content mapper class name = " + contentMapperClassName);
        if (contentMapperClassName == null) {
            this.contentMapper = new DefaultContentMapper();
        } else {
            try {
                Class<? extends ContentMapper> clazz = Class.forName(contentMapperClassName).asSubclass(ContentMapper.class);
                this.contentMapper = clazz.newInstance();
            } catch (Exception ex) {
                throw new IllegalStateException(ex);
            }
        }
        Logger.getLogger(getClass()).debug("WebDAV Servlet using content mapper class = " + contentMapper.getClass().getName());
        this.contentMapper.initialize(getServletContext());
    }
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)
290325
@Override
    public Search build() {
        return new Search(filter.stream().map(ConditionBuilder::build).collect(toList()),
                          query.stream().map(ConditionBuilder::build).collect(toList()),
                          sort.stream().map(SortFieldBuilder::build).collect(toList()),
                          paging == null ? null : IndexPagingState.fromByteBuffer(ByteBufferUtils.byteBuffer(paging)),
                          refresh);
    }
1246468
public ClassFileBuilder prepare() throws SupportException {
        if (mPrimaryKey == null) {
            throw new IllegalStateException("Primary key not defined");
        }

        // Clear the cached result, if any
        mStorableClass = null;

        mClassFileGenerator = new StorableClassFileBuilder(
             mClassNameProvider,
             mLoader,
             SyntheticStorableBuilder.class,
             mEvolvable);
        ClassFile cf = mClassFileGenerator.getClassFile();

        for (SyntheticProperty prop : mPropertyList) {
            definePropertyBeanMethods(cf, prop);
        }

        definePrimaryKey(cf);
        defineAlternateKeys(cf);
        defineIndexes(cf);

        return mClassFileGenerator;
    }
1033232
private List<CmsResultItemBean> buildSearchResultList(
        List<CmsGallerySearchResult> searchResult,
        CmsGallerySearchResult presetResult) {

        ArrayList<CmsResultItemBean> list = new ArrayList<CmsResultItemBean>();
        if ((searchResult == null) || (searchResult.size() == 0)) {
            return list;
        }
        CmsObject cms = getCmsObject();
        for (CmsGallerySearchResult sResult : searchResult) {
            try {
                CmsResultItemBean bean = buildSingleSearchResultItem(cms, sResult, presetResult);
                list.add(bean);
            } catch (Exception e) {
                logError(e);
            }
        }
        return list;
    }
1082516
def prepare(query, params):
    
    def repl(match):
        name = match.group(1)[1:]
        if name in params:
            return marshal(params[name])
        return ":%s" % name

    new, count = re.subn(_param_re, repl, query)

    if len(params) > count:
        raise cql.ProgrammingError("More keywords were provided "
                                   "than parameters")
    return new
490245
public ConstructorFilter build() {
        if(filters.isEmpty()) {
            throw new IllegalStateException("No filter specified.");
        }
        if(filters.size() == 1) {
            return filters.get(0);
        }
        ConstructorFilter[] methodFilters = new ConstructorFilter[filters.size()];
        filters.toArray(methodFilters);
        return new ConstructorFilterList(methodFilters);
    }
372842
String buildPreparedStatementName(String methodName) {
		String name = methodName + "PreparedStatement" + preparedStatementNames.size();

		preparedStatementNames.add(name);
		return name;
	}
420958
def create(index_name, body, force, verbose):
    """"""
    result = current_search_client.indices.create(
        index=index_name,
        body=json.load(body),
        ignore=[400] if force else None,
    )
    if verbose:
        click.echo(json.dumps(result))
364088
public function initializeSearchComponent()
    {
        if ($this->seachRequest->getContextTypoScriptConfiguration()->getEnabledDebugMode()) {
            $this->queryBuilder->startFrom($this->query)->useDebug(true);
        }
    }
478384
def prepare(cls, *args, **kwargs):
        
        cls.args = args
        cls.kwargs = kwargs
        cls.prepared = True
728593
public Query<T> build() {
    QueryBean<T> queryBean = new QueryBean<T>();
    queryBean.setStatement(genStatement());
    queryBean.setParams(getParams());
    if (null != limit) {
      queryBean.setLimit(new PageLimit(limit.getPageIndex(), limit.getPageSize()));
    }
    queryBean.setCountStatement(genCountStatement());
    queryBean.setCacheable(cacheable);
    queryBean.setLang(getLang());
    return queryBean;
  }