本文整理汇总了Java中org.apache.solr.common.util.NamedList.getAll方法的典型用法代码示例。如果您正苦于以下问题:Java NamedList.getAll方法的具体用法?Java NamedList.getAll怎么用?Java NamedList.getAll使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.solr.common.util.NamedList
的用法示例。
在下文中一共展示了NamedList.getAll方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: inform
import org.apache.solr.common.util.NamedList; //导入方法依赖的package包/类
public void inform(SolrCore core) {
super.inform(core);
suggestionService = new SuggestionService(core,this.getInitArgs());
//set default args
NamedList args = (NamedList)this.getInitArgs().get("defaults");
SUGGESTION = args.get(SuggestionRequestParams.SUGGESTION) != null ?
Boolean.parseBoolean((String)args.get(SuggestionRequestParams.SUGGESTION)) : SUGGESTION;
TERM_LIMIT = args.get(SuggestionRequestParams.SUGGESTION_TERM_LIMIT) != null ?
Integer.parseInt((String)args.get(SuggestionRequestParams.SUGGESTION_TERM_LIMIT)) : TERM_LIMIT;
LIMIT = args.get(SuggestionRequestParams.SUGGESTION_LIMIT) != null ?
Integer.parseInt((String)args.get(SuggestionRequestParams.SUGGESTION_LIMIT)) : LIMIT;
LIMIT_TYPE = args.get(SuggestionRequestParams.SUGGESTION_LIMIT_TYPE) != null ?
LimitType.parse((String) args.get(SuggestionRequestParams.SUGGESTION_LIMIT_TYPE), LIMIT_TYPE) : LIMIT_TYPE;
DF = args.get(SuggestionRequestParams.SUGGESTION_DF) != null ?
(String) args.get(SuggestionRequestParams.SUGGESTION_DF) : DF;
STRATEGY = args.get(SuggestionRequestParams.SUGGESTION_STRATEGY) != null ?
Strategy.parse((String)args.get(SuggestionRequestParams.SUGGESTION_STRATEGY), STRATEGY) :STRATEGY;
List<String> fields = args.getAll(SuggestionRequestParams.SUGGESTION_FIELD) != null ?
args.getAll(SuggestionRequestParams.SUGGESTION_FIELD) : Collections.emptyList();
if(!fields.isEmpty()) {
FIELDS = fields.toArray(new String[fields.size()]);
}
List<String> multivalue_fields = args.getAll(SuggestionRequestParams.SUGGESTION_MULTIVALUE_FIELD) != null ?
args.getAll(SuggestionRequestParams.SUGGESTION_MULTIVALUE_FIELD) : Collections.emptyList();
if(!multivalue_fields.isEmpty()) {
MULTIVALUE_FIELDS = fields.toArray(new String[multivalue_fields.size()]);
}
List<String> fqs = args.getAll(CommonParams.FQ) != null ?
args.getAll(CommonParams.FQ) : Collections.emptyList();
if(!fqs.isEmpty()) {
FQS = fqs.toArray(new String[fields.size()]);
}
}