本文整理了Java中org.elasticsearch.common.xcontent.XContentBuilder.unknownValue()
方法的一些代码示例,展示了XContentBuilder.unknownValue()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XContentBuilder.unknownValue()
方法的具体详情如下:
包路径:org.elasticsearch.common.xcontent.XContentBuilder
类名称:XContentBuilder
方法名:unknownValue
暂无
代码示例来源:origin: com.strapdata.elasticsearch/elasticsearch
public XContentBuilder value(Object value) throws IOException {
unknownValue(value);
return this;
}
代码示例来源:origin: org.elasticsearch/elasticsearch-x-content
public XContentBuilder value(Object value) throws IOException {
unknownValue(value, true);
return this;
}
代码示例来源:origin: com.strapdata.elasticsearch/elasticsearch
public XContentBuilder map(Map<String, ?> values) throws IOException {
if (values == null) {
return nullValue();
}
// checks that the map does not contain references to itself because
// iterating over map entries will cause a stackoverflow error
ensureNoSelfReferences(values);
startObject();
for (Map.Entry<String, ?> value : values.entrySet()) {
field(value.getKey());
unknownValue(value.getValue());
}
endObject();
return this;
}
代码示例来源:origin: org.elasticsearch/elasticsearch-x-content
private XContentBuilder map(Map<String, ?> values, boolean ensureNoSelfReferences) throws IOException {
if (values == null) {
return nullValue();
}
// checks that the map does not contain references to itself because
// iterating over map entries will cause a stackoverflow error
if (ensureNoSelfReferences) {
ensureNoSelfReferences(values);
}
startObject();
for (Map.Entry<String, ?> value : values.entrySet()) {
field(value.getKey());
// pass ensureNoSelfReferences=false as we already performed the check at a higher level
unknownValue(value.getValue(), false);
}
endObject();
return this;
}
代码示例来源:origin: com.strapdata.elasticsearch/elasticsearch
private XContentBuilder value(Iterable<?> values) throws IOException {
if (values == null) {
return nullValue();
}
if (values instanceof Path) {
//treat as single value
value((Path) values);
} else {
// checks that the iterable does not contain references to itself because
// iterating over entries will cause a stackoverflow error
ensureNoSelfReferences(values);
startArray();
for (Object value : values) {
unknownValue(value);
}
endArray();
}
return this;
}
代码示例来源:origin: org.elasticsearch/elasticsearch-x-content
private XContentBuilder value(Iterable<?> values, boolean ensureNoSelfReferences) throws IOException {
if (values == null) {
return nullValue();
}
if (values instanceof Path) {
//treat as single value
value((Path) values);
} else {
// checks that the iterable does not contain references to itself because
// iterating over entries will cause a stackoverflow error
if (ensureNoSelfReferences) {
ensureNoSelfReferences(values);
}
startArray();
for (Object value : values) {
// pass ensureNoSelfReferences=false as we already performed the check at a higher level
unknownValue(value, false);
}
endArray();
}
return this;
}
内容来源于网络,如有侵权,请联系作者删除!