本文整理汇总了Java中org.apache.solr.search.ValueSourceParser类的典型用法代码示例。如果您正苦于以下问题:Java ValueSourceParser类的具体用法?Java ValueSourceParser怎么用?Java ValueSourceParser使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ValueSourceParser类属于org.apache.solr.search包,在下文中一共展示了ValueSourceParser类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: initValueSourceParsers
import org.apache.solr.search.ValueSourceParser; //导入依赖的package包/类
/** Configure the ValueSource (function) plugins */
private void initValueSourceParsers() {
initPlugins(valueSourceParsers,ValueSourceParser.class);
// default value source parsers
for (Map.Entry<String, ValueSourceParser> entry : ValueSourceParser.standardValueSourceParsers.entrySet()) {
try {
String name = entry.getKey();
if (null == valueSourceParsers.get(name)) {
ValueSourceParser valueSourceParser = entry.getValue();
valueSourceParsers.put(name, valueSourceParser);
valueSourceParser.init(null);
}
} catch (Exception e) {
throw new SolrException(SolrException.ErrorCode.SERVER_ERROR, e);
}
}
}
示例2: initValueSourceParsers
import org.apache.solr.search.ValueSourceParser; //导入依赖的package包/类
/** Configure the ValueSource (function) plugins */
private void initValueSourceParsers() {
initPlugins(valueSourceParsers, ValueSourceParser.class);
// default value source parsers
for(Map.Entry<String, ValueSourceParser> entry : ValueSourceParser.standardValueSourceParsers.entrySet()) {
try {
String name = entry.getKey();
if(null == valueSourceParsers.get(name)) {
ValueSourceParser valueSourceParser = entry.getValue();
valueSourceParsers.put(name, valueSourceParser);
valueSourceParser.init(null);
}
} catch(Exception e) {
throw new SolrException(SolrException.ErrorCode.SERVER_ERROR, e);
}
}
}
示例3: testConstruction
import org.apache.solr.search.ValueSourceParser; //导入依赖的package包/类
public void testConstruction() throws Exception {
SolrCore core = h.getCore();
assertTrue("core is null and it shouldn't be", core != null);
QParserPlugin parserPlugin = core.getQueryPlugin(QParserPlugin.DEFAULT_QTYPE);
assertTrue("parserPlugin is null and it shouldn't be", parserPlugin != null);
assertTrue("parserPlugin is not an instanceof " + FooQParserPlugin.class, parserPlugin instanceof FooQParserPlugin);
ValueSourceParser vsp = core.getValueSourceParser("boost");
assertTrue("vsp is null and it shouldn't be", vsp != null);
assertTrue("vsp is not an instanceof " + DummyValueSourceParser.class, vsp instanceof DummyValueSourceParser);
}
示例4: getValueSourceParser
import org.apache.solr.search.ValueSourceParser; //导入依赖的package包/类
public ValueSourceParser getValueSourceParser(String parserName) {
return valueSourceParsers.get(parserName);
}
示例5: getValueSourceParser
import org.apache.solr.search.ValueSourceParser; //导入依赖的package包/类
public ValueSourceParser getValueSourceParser(String parserName) {
return valueSourceParsers.get(parserName);
}