当前位置: 首页>>代码示例>>Java>>正文


Java VersionType.fromValue方法代码示例

本文整理汇总了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);
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:17,代码来源:GetRequest.java

示例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();
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:29,代码来源:TermVectorsRequest.java

示例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);
    }
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:25,代码来源:IndexRequest.java

示例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();
    }
}
 
开发者ID:baidu,项目名称:Elasticsearch,代码行数:25,代码来源:ShardUpsertRequest.java

示例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);
}
 
开发者ID:baidu,项目名称:Elasticsearch,代码行数:19,代码来源:MultiGetRequest.java

示例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();
}
 
开发者ID:baidu,项目名称:Elasticsearch,代码行数:28,代码来源:TermVectorsRequest.java

示例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);
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:14,代码来源:MultiGetRequest.java

示例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());
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:11,代码来源:DeleteRequest.java

示例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();
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:30,代码来源:UpdateRequest.java

示例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);
}
 
开发者ID:baidu,项目名称:Elasticsearch,代码行数:31,代码来源:MappingMetaData.java

示例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);
}
 
开发者ID:baidu,项目名称:Elasticsearch,代码行数:29,代码来源:GetRequest.java

示例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());
}
 
开发者ID:baidu,项目名称:Elasticsearch,代码行数:11,代码来源:DeleteRequest.java

示例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();
}
 
开发者ID:baidu,项目名称:Elasticsearch,代码行数:9,代码来源:GetIndexedScriptRequest.java

示例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());
}
 
开发者ID:baidu,项目名称:Elasticsearch,代码行数:9,代码来源:DeleteIndexedScriptRequest.java

示例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());
}
 
开发者ID:baidu,项目名称:Elasticsearch,代码行数:12,代码来源:PutIndexedScriptRequest.java


注:本文中的org.elasticsearch.index.VersionType.fromValue方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。