本文整理匯總了Java中org.elasticsearch.common.xcontent.support.XContentMapValues.filter方法的典型用法代碼示例。如果您正苦於以下問題:Java XContentMapValues.filter方法的具體用法?Java XContentMapValues.filter怎麽用?Java XContentMapValues.filter使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.elasticsearch.common.xcontent.support.XContentMapValues
的用法示例。
在下文中一共展示了XContentMapValues.filter方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: getFilter
import org.elasticsearch.common.xcontent.support.XContentMapValues; //導入方法依賴的package包/類
/**
* Returns a filter function that expects the source map as an input and returns
* the filtered map.
*/
public Function<Map<String, ?>, Map<String, Object>> getFilter() {
if (filter == null) {
filter = XContentMapValues.filter(includes, excludes);
}
return filter;
}
示例2: SourceFieldMapper
import org.elasticsearch.common.xcontent.support.XContentMapValues; //導入方法依賴的package包/類
private SourceFieldMapper(boolean enabled, String[] includes, String[] excludes, Settings indexSettings) {
super(NAME, Defaults.FIELD_TYPE.clone(), Defaults.FIELD_TYPE, indexSettings); // Only stored.
this.enabled = enabled;
this.includes = includes;
this.excludes = excludes;
final boolean filtered = (includes != null && includes.length > 0) || (excludes != null && excludes.length > 0);
this.filter = enabled && filtered && fieldType().stored() ? XContentMapValues.filter(includes, excludes) : null;
this.complete = enabled && includes == null && excludes == null;
}
示例3: filter
import org.elasticsearch.common.xcontent.support.XContentMapValues; //導入方法依賴的package包/類
public Object filter(String[] includes, String[] excludes) {
return XContentMapValues.filter(loadSourceIfNeeded(), includes, excludes);
}