本文整理匯總了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;
}