本文整理了Java中org.elasticsearch.common.settings.Settings.getAsStructuredMap()
方法的一些代码示例,展示了Settings.getAsStructuredMap()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Settings.getAsStructuredMap()
方法的具体详情如下:
包路径:org.elasticsearch.common.settings.Settings
类名称:Settings
方法名:getAsStructuredMap
[英]The settings as a structured java.util.Map.
[中]将这些设置设置为结构化java。util。地图
代码示例来源:origin: org.elasticsearch/elasticsearch
@Override
public XContentBuilder toXContent(XContentBuilder builder, Params params) throws IOException {
Settings settings = SettingsFilter.filterSettings(params, this);
if (!params.paramAsBoolean("flat_settings", false)) {
for (Map.Entry<String, Object> entry : settings.getAsStructuredMap().entrySet()) {
builder.field(entry.getKey(), entry.getValue());
}
} else {
for (Map.Entry<String, Object> entry : settings.settings.entrySet()) {
builder.field(entry.getKey(), entry.getValue());
}
}
return builder;
}
代码示例来源:origin: apache/servicemix-bundles
@Override
public XContentBuilder toXContent(XContentBuilder builder, Params params) throws IOException {
Settings settings = SettingsFilter.filterSettings(params, this);
if (!params.paramAsBoolean("flat_settings", false)) {
for (Map.Entry<String, Object> entry : settings.getAsStructuredMap().entrySet()) {
builder.field(entry.getKey(), entry.getValue());
}
} else {
for (Map.Entry<String, Object> entry : settings.settings.entrySet()) {
builder.field(entry.getKey(), entry.getValue());
}
}
return builder;
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.elasticsearch
@Override
public XContentBuilder toXContent(XContentBuilder builder, Params params) throws IOException {
Settings settings = SettingsFilter.filterSettings(params, this);
if (!params.paramAsBoolean("flat_settings", false)) {
for (Map.Entry<String, Object> entry : settings.getAsStructuredMap().entrySet()) {
builder.field(entry.getKey(), entry.getValue());
}
} else {
for (Map.Entry<String, Object> entry : settings.settings.entrySet()) {
builder.field(entry.getKey(), entry.getValue());
}
}
return builder;
}
代码示例来源:origin: harbby/presto-connectors
@Override
public XContentBuilder toXContent(XContentBuilder builder, Params params) throws IOException {
Settings settings = SettingsFilter.filterSettings(params, this);
if (!params.paramAsBoolean("flat_settings", false)) {
for (Map.Entry<String, Object> entry : settings.getAsStructuredMap().entrySet()) {
builder.field(entry.getKey(), entry.getValue());
}
} else {
for (Map.Entry<String, String> entry : settings.getAsMap().entrySet()) {
builder.field(entry.getKey(), entry.getValue(), XContentBuilder.FieldCaseConversion.NONE);
}
}
return builder;
}
代码示例来源:origin: com.strapdata.elasticsearch/elasticsearch
@Override
public XContentBuilder toXContent(XContentBuilder builder, Params params) throws IOException {
Settings settings = SettingsFilter.filterSettings(params, this);
if (!params.paramAsBoolean("flat_settings", false)) {
for (Map.Entry<String, Object> entry : settings.getAsStructuredMap().entrySet()) {
builder.field(entry.getKey(), entry.getValue());
}
} else {
for (Map.Entry<String, String> entry : settings.getAsMap().entrySet()) {
builder.field(entry.getKey(), entry.getValue());
}
}
return builder;
}
代码示例来源:origin: io.fabric8.insight/insight-elasticsearch
try {
Settings settings = IndicesManagementService.this.settings.getByPrefix("insight.indices.management.");
Set<String> repositories = settings.getByPrefix("repository.").getAsStructuredMap().keySet();
int opened = settings.getAsInt("opened", 7);
int closed = settings.getAsInt("closed", 14);
内容来源于网络,如有侵权,请联系作者删除!