当前位置: 首页>>代码示例>>Java>>正文


Java SearchHitField.value方法代码示例

本文整理汇总了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;
}
 
开发者ID:jaibeermalik,项目名称:elasticsearch-tutorial,代码行数:9,代码来源:ProductQueryServiceImpl.java

示例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;
}
 
开发者ID:jaibeermalik,项目名称:elasticsearch-tutorial,代码行数:9,代码来源:ProductQueryServiceImpl.java

示例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;
}
 
开发者ID:jaibeermalik,项目名称:elasticsearch-akka,代码行数:10,代码来源:ProductQueryServiceImpl.java

示例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;
}
 
开发者ID:jaibeermalik,项目名称:elasticsearch-akka,代码行数:10,代码来源:ProductQueryServiceImpl.java

示例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;
}
 
开发者ID:jaibeermalik,项目名称:searchanalytics-bigdata,代码行数:9,代码来源:ProductQueryServiceImpl.java

示例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;
}
 
开发者ID:jaibeermalik,项目名称:searchanalytics-bigdata,代码行数:9,代码来源:ProductQueryServiceImpl.java

示例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;
}
 
开发者ID:crate,项目名称:elasticsearch-inout-plugin,代码行数:10,代码来源:FieldReader.java


注:本文中的org.elasticsearch.search.SearchHitField.value方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。