本文整理汇总了Java中org.apache.solr.util.SolrPluginUtils.setDefaults方法的典型用法代码示例。如果您正苦于以下问题:Java SolrPluginUtils.setDefaults方法的具体用法?Java SolrPluginUtils.setDefaults怎么用?Java SolrPluginUtils.setDefaults使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.solr.util.SolrPluginUtils
的用法示例。
在下文中一共展示了SolrPluginUtils.setDefaults方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getInstance
import org.apache.solr.util.SolrPluginUtils; //导入方法依赖的package包/类
@Override
public UpdateRequestProcessor getInstance(SolrQueryRequest req,
SolrQueryResponse rsp, UpdateRequestProcessor next) {
// Process defaults, appends and invariants if we got a request
if(req != null) {
SolrPluginUtils.setDefaults(req, defaults, appends, invariants);
}
return new TikaLanguageIdentifierUpdateProcessor(req, rsp, next);
}
示例2: getInstance
import org.apache.solr.util.SolrPluginUtils; //导入方法依赖的package包/类
@Override
public UpdateRequestProcessor getInstance(SolrQueryRequest req,
SolrQueryResponse rsp, UpdateRequestProcessor next) {
// Process defaults, appends and invariants if we got a request
if(req != null) {
SolrPluginUtils.setDefaults(req, defaults, appends, invariants);
}
return new LangDetectLanguageIdentifierUpdateProcessor(req, rsp, next);
}
示例3: getInstance
import org.apache.solr.util.SolrPluginUtils; //导入方法依赖的package包/类
@Override
public UpdateRequestProcessor getInstance(SolrQueryRequest req, SolrQueryResponse rsp, UpdateRequestProcessor next) {
if (req != null) {
SolrPluginUtils.setDefaults(req, defaults, appends, invariants);
}
return new MultiLangDetectLanguageIdentifierUpdateProcessor(req, rsp, next);
}
开发者ID:smalldirector,项目名称:solr-multilingual-analyzer,代码行数:8,代码来源:MultiLangDetectLanguageIdentifierUpdateProcessorFactory.java
示例4: handleRequest
import org.apache.solr.util.SolrPluginUtils; //导入方法依赖的package包/类
@Override
public void handleRequest(SolrQueryRequest req, SolrQueryResponse rsp) {
numRequests.incrementAndGet();
TimerContext timer = requestTimes.time();
try {
SolrPluginUtils.setDefaults(req,defaults,appends,invariants);
rsp.setHttpCaching(httpCaching);
handleRequestBody( req, rsp );
// count timeouts
NamedList header = rsp.getResponseHeader();
if(header != null) {
Object partialResults = header.get("partialResults");
boolean timedOut = partialResults == null ? false : (Boolean)partialResults;
if( timedOut ) {
numTimeouts.incrementAndGet();
rsp.setHttpCaching(false);
}
}
} catch (Exception e) {
if (e instanceof SolrException) {
SolrException se = (SolrException)e;
if (se.code() == SolrException.ErrorCode.CONFLICT.code) {
// TODO: should we allow this to be counted as an error (numErrors++)?
} else {
SolrException.log(SolrCore.log,e);
}
} else {
SolrException.log(SolrCore.log,e);
if (e instanceof SyntaxError) {
e = new SolrException(SolrException.ErrorCode.BAD_REQUEST, e);
}
}
rsp.setException(e);
numErrors.incrementAndGet();
}
finally {
timer.stop();
}
}