當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。