本文整理汇总了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);
}