本文整理汇总了Java中org.apache.lucene.search.FieldCache.IntParser类的典型用法代码示例。如果您正苦于以下问题:Java IntParser类的具体用法?Java IntParser怎么用?Java IntParser使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IntParser类属于org.apache.lucene.search.FieldCache包,在下文中一共展示了IntParser类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: getValueSource
import org.apache.lucene.search.FieldCache.IntParser; //导入依赖的package包/类
@Override
public ValueSource getValueSource(String name) {
Object o = map.get(name);
if (o == null) {
throw new IllegalArgumentException("Invalid reference '" + name + "'");
} else if (o instanceof Expression) {
return ((Expression)o).getValueSource(this);
} else if (o instanceof ValueSource) {
return ((ValueSource)o);
}
SortField field = (SortField) o;
switch(field.getType()) {
case INT:
return new IntFieldSource(field.getField(), (IntParser) field.getParser());
case LONG:
return new LongFieldSource(field.getField(), (LongParser) field.getParser());
case FLOAT:
return new FloatFieldSource(field.getField(), (FloatParser) field.getParser());
case DOUBLE:
return new DoubleFieldSource(field.getField(), (DoubleParser) field.getParser());
case SCORE:
return getScoreValueSource();
default:
throw new UnsupportedOperationException();
}
}
开发者ID:europeana,项目名称:search,代码行数:27,代码来源:SimpleBindings.java
示例2: getValueSource
import org.apache.lucene.search.FieldCache.IntParser; //导入依赖的package包/类
@Override
public ValueSource getValueSource(String name) {
Object o = map.get(name);
if (o == null) {
throw new IllegalArgumentException("Invalid reference '" + name + "'");
} else if (o instanceof Expression) {
return ((Expression)o).getValueSource(this);
}
SortField field = (SortField) o;
switch(field.getType()) {
case INT:
return new IntFieldSource(field.getField(), (IntParser) field.getParser());
case LONG:
return new LongFieldSource(field.getField(), (LongParser) field.getParser());
case FLOAT:
return new FloatFieldSource(field.getField(), (FloatParser) field.getParser());
case DOUBLE:
return new DoubleFieldSource(field.getField(), (DoubleParser) field.getParser());
case SCORE:
return getScoreValueSource();
default:
throw new UnsupportedOperationException();
}
}
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:25,代码来源:SimpleBindings.java
示例3: IntComparator
import org.apache.lucene.search.FieldCache.IntParser; //导入依赖的package包/类
public IntComparator(int numHits, String field, FieldCache.Parser parser, Integer missingValue) {
super(field, missingValue);
values = new int[numHits];
this.parser = (IntParser) parser;
}
开发者ID:lamsfoundation,项目名称:lams,代码行数:6,代码来源:FieldComparator.java
示例4: IntComparator
import org.apache.lucene.search.FieldCache.IntParser; //导入依赖的package包/类
IntComparator(int numHits, String field, FieldCache.Parser parser, Integer missingValue) {
super(field, missingValue);
values = new int[numHits];
this.parser = (IntParser) parser;
}
开发者ID:pkarmstr,项目名称:NYBC,代码行数:6,代码来源:FieldComparator.java
注:本文中的org.apache.lucene.search.FieldCache.IntParser类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论