本文整理汇总了Java中org.elasticsearch.index.VersionType.fromValue方法的典型用法代码示例。如果您正苦于以下问题:Java VersionType.fromValue方法的具体用法?Java VersionType.fromValue怎么用?Java VersionType.fromValue使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.elasticsearch.index.VersionType
的用法示例。
在下文中一共展示了VersionType.fromValue方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: readFrom
import org.elasticsearch.index.VersionType; //导入方法依赖的package包/类
@Override
public void readFrom(StreamInput in) throws IOException {
super.readFrom(in);
type = in.readString();
id = in.readString();
routing = in.readOptionalString();
parent = in.readOptionalString();
preference = in.readOptionalString();
refresh = in.readBoolean();
storedFields = in.readOptionalStringArray();
realtime = in.readBoolean();
this.versionType = VersionType.fromValue(in.readByte());
this.version = in.readLong();
fetchSourceContext = in.readOptionalWriteable(FetchSourceContext::new);
}
示例2: TermVectorsRequest
import org.elasticsearch.index.VersionType; //导入方法依赖的package包/类
/**
* Constructs a new term vector request for a document that will be fetch
* from the provided index. Use {@link #type(String)} and
* {@link #id(String)} to specify the document to load.
*/
public TermVectorsRequest(TermVectorsRequest other) {
super(other.index());
this.id = other.id();
this.type = other.type();
if (other.doc != null) {
this.doc = new BytesArray(other.doc().toBytesRef(), true);
this.xContentType = other.xContentType;
}
this.flagsEnum = other.getFlags().clone();
this.preference = other.preference();
this.routing = other.routing();
this.parent = other.parent();
if (other.selectedFields != null) {
this.selectedFields = new HashSet<>(other.selectedFields);
}
if (other.perFieldAnalyzer != null) {
this.perFieldAnalyzer = new HashMap<>(other.perFieldAnalyzer);
}
this.realtime = other.realtime();
this.version = other.version();
this.versionType = VersionType.fromValue(other.versionType().getValue());
this.filterSettings = other.filterSettings();
}
示例3: readFrom
import org.elasticsearch.index.VersionType; //导入方法依赖的package包/类
@Override
public void readFrom(StreamInput in) throws IOException {
super.readFrom(in);
type = in.readOptionalString();
id = in.readOptionalString();
routing = in.readOptionalString();
parent = in.readOptionalString();
if (in.getVersion().before(Version.V_6_0_0_alpha1_UNRELEASED)) {
in.readOptionalString(); // timestamp
in.readOptionalWriteable(TimeValue::new); // ttl
}
source = in.readBytesReference();
opType = OpType.fromId(in.readByte());
version = in.readLong();
versionType = VersionType.fromValue(in.readByte());
pipeline = in.readOptionalString();
isRetry = in.readBoolean();
autoGeneratedTimestamp = in.readLong();
if (in.getVersion().onOrAfter(Version.V_5_3_0_UNRELEASED)) {
contentType = in.readOptionalWriteable(XContentType::readFrom);
} else {
contentType = XContentFactory.xContentType(source);
}
}
示例4: readFrom
import org.elasticsearch.index.VersionType; //导入方法依赖的package包/类
@Override
public void readFrom(StreamInput in) throws IOException {
id = in.readString();
int assignmentsSize = in.readVInt();
if (assignmentsSize > 0) {
updateAssignments = new Symbol[assignmentsSize];
for (int i = 0; i < assignmentsSize; i++) {
updateAssignments[i] = Symbol.fromStream(in);
}
}
int missingAssignmentsSize = in.readVInt();
if (missingAssignmentsSize > 0) {
this.insertValues = new Object[missingAssignmentsSize];
for (int i = 0; i < missingAssignmentsSize; i++) {
insertValues[i] = insertValuesStreamer[i].readValueFrom(in);
}
}
this.version = Version.readVersion(in).id;
versionType = VersionType.fromValue(in.readByte());
opType = IndexRequest.OpType.fromId(in.readByte());
if (in.readBoolean()) {
source = in.readBytesReference();
}
}
示例5: readFrom
import org.elasticsearch.index.VersionType; //导入方法依赖的package包/类
@Override
public void readFrom(StreamInput in) throws IOException {
index = in.readString();
type = in.readOptionalString();
id = in.readString();
routing = in.readOptionalString();
int size = in.readVInt();
if (size > 0) {
fields = new String[size];
for (int i = 0; i < size; i++) {
fields[i] = in.readString();
}
}
version = in.readLong();
versionType = VersionType.fromValue(in.readByte());
fetchSourceContext = FetchSourceContext.optionalReadFromStream(in);
}
示例6: TermVectorsRequest
import org.elasticsearch.index.VersionType; //导入方法依赖的package包/类
/**
* Constructs a new term vector request for a document that will be fetch
* from the provided index. Use {@link #type(String)} and
* {@link #id(String)} to specify the document to load.
*/
public TermVectorsRequest(TermVectorsRequest other) {
super(other.index());
this.id = other.id();
this.type = other.type();
if (this.doc != null) {
this.doc = other.doc().copyBytesArray();
}
this.flagsEnum = other.getFlags().clone();
this.preference = other.preference();
this.routing = other.routing();
if (other.selectedFields != null) {
this.selectedFields = new HashSet<>(other.selectedFields);
}
if (other.perFieldAnalyzer != null) {
this.perFieldAnalyzer = new HashMap<>(other.perFieldAnalyzer);
}
this.realtime = other.realtime();
this.version = other.version();
this.versionType = VersionType.fromValue(other.versionType().getValue());
this.startTime = other.startTime();
this.filterSettings = other.filterSettings();
}
示例7: readFrom
import org.elasticsearch.index.VersionType; //导入方法依赖的package包/类
@Override
public void readFrom(StreamInput in) throws IOException {
index = in.readString();
type = in.readOptionalString();
id = in.readString();
routing = in.readOptionalString();
parent = in.readOptionalString();
storedFields = in.readOptionalStringArray();
version = in.readLong();
versionType = VersionType.fromValue(in.readByte());
fetchSourceContext = in.readOptionalWriteable(FetchSourceContext::new);
}
示例8: readFrom
import org.elasticsearch.index.VersionType; //导入方法依赖的package包/类
@Override
public void readFrom(StreamInput in) throws IOException {
super.readFrom(in);
type = in.readString();
id = in.readString();
routing = in.readOptionalString();
parent = in.readOptionalString();
version = in.readLong();
versionType = VersionType.fromValue(in.readByte());
}
示例9: readFrom
import org.elasticsearch.index.VersionType; //导入方法依赖的package包/类
@Override
public void readFrom(StreamInput in) throws IOException {
super.readFrom(in);
waitForActiveShards = ActiveShardCount.readFrom(in);
type = in.readString();
id = in.readString();
routing = in.readOptionalString();
parent = in.readOptionalString();
if (in.readBoolean()) {
script = new Script(in);
}
retryOnConflict = in.readVInt();
refreshPolicy = RefreshPolicy.readFrom(in);
if (in.readBoolean()) {
doc = new IndexRequest();
doc.readFrom(in);
}
fields = in.readOptionalStringArray();
fetchSourceContext = in.readOptionalWriteable(FetchSourceContext::new);
if (in.readBoolean()) {
upsertRequest = new IndexRequest();
upsertRequest.readFrom(in);
}
docAsUpsert = in.readBoolean();
version = in.readLong();
versionType = VersionType.fromValue(in.readByte());
detectNoop = in.readBoolean();
scriptedUpsert = in.readBoolean();
}
示例10: readFrom
import org.elasticsearch.index.VersionType; //导入方法依赖的package包/类
public MappingMetaData readFrom(StreamInput in) throws IOException {
String type = in.readString();
CompressedXContent source = CompressedXContent.readCompressedString(in);
// id
Id id = new Id(in.readBoolean() ? in.readString() : null);
// routing
Routing routing = new Routing(in.readBoolean(), in.readBoolean() ? in.readString() : null);
// timestamp
boolean enabled = in.readBoolean();
String path = in.readOptionalString();
String format = in.readString();
String defaultTimestamp = in.readOptionalString();
Boolean ignoreMissing = null;
ignoreMissing = in.readOptionalBoolean();
final Timestamp timestamp = new Timestamp(enabled, path, format, defaultTimestamp, ignoreMissing);
final boolean hasParentField = in.readBoolean();
final long mappingVersion = in.readLong();
ParsedVersion version = new ParsedVersion(null, VersionType.INTERNAL);
boolean hasVersionPath = in.readBoolean();
if (hasVersionPath) {
String versionPath = in.readString();
VersionType versionType = VersionType.fromValue(in.readByte());
version = new ParsedVersion(versionPath, versionType);
}
return new MappingMetaData(type, source, id, routing, timestamp, hasParentField, version, mappingVersion);
}
示例11: readFrom
import org.elasticsearch.index.VersionType; //导入方法依赖的package包/类
@Override
public void readFrom(StreamInput in) throws IOException {
super.readFrom(in);
type = in.readString();
id = in.readString();
routing = in.readOptionalString();
preference = in.readOptionalString();
refresh = in.readBoolean();
int size = in.readInt();
if (size >= 0) {
fields = new String[size];
for (int i = 0; i < size; i++) {
fields[i] = in.readString();
}
}
byte realtime = in.readByte();
if (realtime == 0) {
this.realtime = false;
} else if (realtime == 1) {
this.realtime = true;
}
this.ignoreErrorsOnGeneratedFields = in.readBoolean();
this.versionType = VersionType.fromValue(in.readByte());
this.version = in.readLong();
fetchSourceContext = FetchSourceContext.optionalReadFromStream(in);
}
示例12: readFrom
import org.elasticsearch.index.VersionType; //导入方法依赖的package包/类
@Override
public void readFrom(StreamInput in) throws IOException {
super.readFrom(in);
type = in.readString();
id = in.readString();
routing = in.readOptionalString();
refresh = in.readBoolean();
version = in.readLong();
versionType = VersionType.fromValue(in.readByte());
}
示例13: readFrom
import org.elasticsearch.index.VersionType; //导入方法依赖的package包/类
@Override
public void readFrom(StreamInput in) throws IOException {
super.readFrom(in);
scriptLang = in.readString();
id = in.readString();
this.versionType = VersionType.fromValue(in.readByte());
this.version = in.readLong();
}
示例14: readFrom
import org.elasticsearch.index.VersionType; //导入方法依赖的package包/类
@Override
public void readFrom(StreamInput in) throws IOException {
super.readFrom(in);
scriptLang = in.readString();
id = in.readString();
version = in.readLong();
versionType = VersionType.fromValue(in.readByte());
}
示例15: readFrom
import org.elasticsearch.index.VersionType; //导入方法依赖的package包/类
@Override
public void readFrom(StreamInput in) throws IOException {
super.readFrom(in);
scriptLang = in.readString();
id = in.readOptionalString();
source = in.readBytesReference();
opType = IndexRequest.OpType.fromId(in.readByte());
version = in.readLong();
versionType = VersionType.fromValue(in.readByte());
}