本文整理汇总了Java中org.elasticsearch.search.SearchHitField.value方法的典型用法代码示例。如果您正苦于以下问题:Java SearchHitField.value方法的具体用法?Java SearchHitField.value怎么用?Java SearchHitField.value使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.elasticsearch.search.SearchHitField
的用法示例。
在下文中一共展示了SearchHitField.value方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getFieldValueOrNull
import org.elasticsearch.search.SearchHitField; //导入方法依赖的package包/类
protected String getFieldValueOrNull(SearchHit searchHit, String fieldName)
{
final SearchHitField searchHitField = searchHit.field(fieldName);
if (searchHitField != null && searchHitField.value() != null) {
return searchHitField.value().toString();
}
return null;
}
示例2: getDoubleFieldValueOrNull
import org.elasticsearch.search.SearchHitField; //导入方法依赖的package包/类
protected Double getDoubleFieldValueOrNull(SearchHit searchHit, String fieldName)
{
final SearchHitField searchHitField = searchHit.field(fieldName);
if (searchHitField != null && searchHitField.value() != null) {
return Double.valueOf(searchHitField.value().toString());
}
return null;
}
示例3: getFieldValueOrNull
import org.elasticsearch.search.SearchHitField; //导入方法依赖的package包/类
protected String getFieldValueOrNull(final SearchHit searchHit, final String fieldName)
{
final SearchHitField searchHitField = searchHit.field(fieldName);
if (searchHitField != null && searchHitField.value() != null)
{
return searchHitField.value().toString();
}
return null;
}
示例4: getDoubleFieldValueOrNull
import org.elasticsearch.search.SearchHitField; //导入方法依赖的package包/类
protected Double getDoubleFieldValueOrNull(final SearchHit searchHit, final String fieldName)
{
final SearchHitField searchHitField = searchHit.field(fieldName);
if (searchHitField != null && searchHitField.value() != null)
{
return Double.valueOf(searchHitField.value().toString());
}
return null;
}
示例5: getFieldValueOrNull
import org.elasticsearch.search.SearchHitField; //导入方法依赖的package包/类
protected String getFieldValueOrNull(final SearchHit searchHit,
final String fieldName) {
final SearchHitField searchHitField = searchHit.field(fieldName);
if (searchHitField != null && searchHitField.value() != null) {
return searchHitField.value().toString();
}
return null;
}
示例6: getDoubleFieldValueOrNull
import org.elasticsearch.search.SearchHitField; //导入方法依赖的package包/类
protected Double getDoubleFieldValueOrNull(final SearchHit searchHit,
final String fieldName) {
final SearchHitField searchHitField = searchHit.field(fieldName);
if (searchHitField != null && searchHitField.value() != null) {
return Double.valueOf(searchHitField.value().toString());
}
return null;
}
示例7: read
import org.elasticsearch.search.SearchHitField; //导入方法依赖的package包/类
@Override
public Long read(SearchHit hit) {
SearchHitField field = hit.getFields().get(
TimestampFieldMapper.NAME);
if (field != null && !field.values().isEmpty()) {
return field.value();
}
return null;
}