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


Java StreamInput.readOptionalBoolean方法代码示例

本文整理汇总了Java中org.elasticsearch.common.io.stream.StreamInput.readOptionalBoolean方法的典型用法代码示例。如果您正苦于以下问题:Java StreamInput.readOptionalBoolean方法的具体用法?Java StreamInput.readOptionalBoolean怎么用?Java StreamInput.readOptionalBoolean使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.elasticsearch.common.io.stream.StreamInput的用法示例。


在下文中一共展示了StreamInput.readOptionalBoolean方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: MultiMatchQueryBuilder

import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
/**
 * Read from a stream.
 */
public MultiMatchQueryBuilder(StreamInput in) throws IOException {
    super(in);
    value = in.readGenericValue();
    int size = in.readVInt();
    fieldsBoosts = new TreeMap<>();
    for (int i = 0; i < size; i++) {
        fieldsBoosts.put(in.readString(), in.readFloat());
    }
    type = Type.readFromStream(in);
    operator = Operator.readFromStream(in);
    analyzer = in.readOptionalString();
    slop = in.readVInt();
    fuzziness = in.readOptionalWriteable(Fuzziness::new);
    prefixLength = in.readVInt();
    maxExpansions = in.readVInt();
    minimumShouldMatch = in.readOptionalString();
    fuzzyRewrite = in.readOptionalString();
    useDisMax = in.readOptionalBoolean();
    tieBreaker = in.readOptionalFloat();
    lenient = in.readBoolean();
    cutoffFrequency = in.readOptionalFloat();
    zeroTermsQuery = MatchQuery.ZeroTermsQuery.readFromStream(in);
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:27,代码来源:MultiMatchQueryBuilder.java

示例2: readFrom

import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
@Override
public void readFrom(StreamInput in) throws IOException {
    name = in.readString();
    generation = Long.parseLong(name.substring(1), Character.MAX_RADIX);
    committed = in.readBoolean();
    search = in.readBoolean();
    docCount = in.readInt();
    delDocCount = in.readInt();
    sizeInBytes = in.readLong();
    version = Lucene.parseVersionLenient(in.readOptionalString(), null);
    compound = in.readOptionalBoolean();
    mergeId = in.readOptionalString();
    memoryInBytes = in.readLong();
    if (in.readBoolean()) {
        // verbose mode
        ramTree = readRamTree(in);
    }
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:19,代码来源:Segment.java

示例3: MappingMetaData

import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
public MappingMetaData(StreamInput in) throws IOException {
    type = in.readString();
    source = CompressedXContent.readCompressedString(in);
    // routing
    routing = new Routing(in.readBoolean());
    if (in.getVersion().before(Version.V_6_0_0_alpha1_UNRELEASED)) {
        // timestamp
        boolean enabled = in.readBoolean();
        if (enabled) {
            throw new IllegalArgumentException("_timestamp may not be enabled");
        }
        in.readString(); // format
        in.readOptionalString(); // defaultTimestamp
        in.readOptionalBoolean(); // ignoreMissing
    }
    hasParentField = in.readBoolean();
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:18,代码来源:MappingMetaData.java

示例4: readFrom

import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
@Override
public IndexWarmersMetaData readFrom(StreamInput in) throws IOException {
    Entry[] entries = new Entry[in.readVInt()];
    for (int i = 0; i < entries.length; i++) {
        String name = in.readString();
        String[] types = in.readStringArray();
        BytesReference source = null;
        if (in.readBoolean()) {
            source = in.readBytesReference();
        }
        Boolean queryCache;
        queryCache = in.readOptionalBoolean();
        entries[i] = new Entry(name, types, queryCache, source);
    }
    return new IndexWarmersMetaData(entries);
}
 
开发者ID:baidu,项目名称:Elasticsearch,代码行数:17,代码来源:IndexWarmersMetaData.java

示例5: MovAvgPipelineAggregationBuilder

import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
/**
 * Read from a stream.
 */
public MovAvgPipelineAggregationBuilder(StreamInput in) throws IOException {
    super(in, NAME);
    format = in.readOptionalString();
    gapPolicy = GapPolicy.readFrom(in);
    window = in.readVInt();
    model = in.readNamedWriteable(MovAvgModel.class);
    predict = in.readVInt();
    minimize = in.readOptionalBoolean();
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:13,代码来源:MovAvgPipelineAggregationBuilder.java

示例6: readFromWithId

import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
public void readFromWithId(long id, StreamInput in) throws IOException {
    this.id = id;
    from = in.readVInt();
    size = in.readVInt();
    int numSortFieldsPlus1 = in.readVInt();
    if (numSortFieldsPlus1 == 0) {
        sortValueFormats = null;
    } else {
        sortValueFormats = new DocValueFormat[numSortFieldsPlus1 - 1];
        for (int i = 0; i < sortValueFormats.length; ++i) {
            sortValueFormats[i] = in.readNamedWriteable(DocValueFormat.class);
        }
    }
    topDocs = readTopDocs(in);
    if (hasAggs = in.readBoolean()) {
        aggregations = InternalAggregations.readAggregations(in);
    }
    pipelineAggregators = in.readNamedWriteableList(PipelineAggregator.class).stream().map(a -> (SiblingPipelineAggregator) a)
            .collect(Collectors.toList());
    if (in.readBoolean()) {
        suggest = Suggest.readSuggest(in);
    }
    searchTimedOut = in.readBoolean();
    terminatedEarly = in.readOptionalBoolean();
    profileShardResults = in.readOptionalWriteable(ProfileShardResult::new);
    hasProfileResults = profileShardResults != null;
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:28,代码来源:QuerySearchResult.java

示例7: readFrom

import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
@Override
public void readFrom(StreamInput in) throws IOException {
    text = in.readText();
    score = in.readFloat();
    highlighted = in.readOptionalText();
    collateMatch = in.readOptionalBoolean();
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:8,代码来源:Suggest.java

示例8: PhraseSuggestionBuilder

import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
/**
 * Read from a stream.
 */
public PhraseSuggestionBuilder(StreamInput in) throws IOException {
    super(in);
    maxErrors = in.readFloat();
    realWordErrorLikelihood = in.readFloat();
    confidence = in.readFloat();
    gramSize = in.readOptionalVInt();
    model = in.readOptionalNamedWriteable(SmoothingModel.class);
    forceUnigrams = in.readBoolean();
    tokenLimit = in.readVInt();
    preTag = in.readOptionalString();
    postTag = in.readOptionalString();
    separator = in.readString();
    if (in.readBoolean()) {
        collateQuery = new Script(in);
    }
    collateParams = in.readMap();
    collatePrune = in.readOptionalBoolean();
    int generatorsEntries = in.readVInt();
    for (int i = 0; i < generatorsEntries; i++) {
        String type = in.readString();
        int numberOfGenerators = in.readVInt();
        List<CandidateGenerator> generatorsList = new ArrayList<>(numberOfGenerators);
        for (int g = 0; g < numberOfGenerators; g++) {
            DirectCandidateGeneratorBuilder generator = new DirectCandidateGeneratorBuilder(in);
            generatorsList.add(generator);
        }
        generators.put(type, generatorsList);
    }
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:33,代码来源:PhraseSuggestionBuilder.java

示例9: readFrom

import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
@Override
public void readFrom(StreamInput in) throws IOException {
    hits = SearchHits.readSearchHits(in);
    if (in.readBoolean()) {
        aggregations = InternalAggregations.readAggregations(in);
    }
    if (in.readBoolean()) {
        suggest = Suggest.readSuggest(in);
    }
    timedOut = in.readBoolean();
    terminatedEarly = in.readOptionalBoolean();
    profileResults = in.readOptionalWriteable(SearchProfileShardResults::new);
    numReducePhases = in.readVInt();
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:15,代码来源:InternalSearchResponse.java

示例10: readFrom

import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
@Override
public void readFrom(StreamInput in) throws IOException {
    path = in.readOptionalString();
    mount = in.readOptionalString();
    type = in.readOptionalString();
    total = in.readLong();
    free = in.readLong();
    available = in.readLong();
    spins = in.readOptionalBoolean();
    limit = in.readLong();
    limitFree = in.readLong();
    esUsed = in.readLong();
}
 
开发者ID:baidu,项目名称:Elasticsearch,代码行数:14,代码来源:FsInfo.java

示例11: SimpleQueryStringBuilder

import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
/**
 * Read from a stream.
 */
public SimpleQueryStringBuilder(StreamInput in) throws IOException {
    super(in);
    queryText = in.readString();
    int size = in.readInt();
    Map<String, Float> fields = new HashMap<>();
    for (int i = 0; i < size; i++) {
        String field = in.readString();
        Float weight = in.readFloat();
        fields.put(field, weight);
    }
    fieldsAndWeights.putAll(fields);
    flags = in.readInt();
    analyzer = in.readOptionalString();
    defaultOperator = Operator.readFromStream(in);
    if (in.getVersion().before(Version.V_5_1_1_UNRELEASED)) {
        in.readBoolean(); // lowercase_expanded_terms
    }
    settings.lenient(in.readBoolean());
    if (in.getVersion().onOrAfter(Version.V_5_1_1_UNRELEASED)) {
        this.lenientSet = in.readBoolean();
    }
    settings.analyzeWildcard(in.readBoolean());
    if (in.getVersion().before(Version.V_5_1_1_UNRELEASED)) {
        in.readString(); // locale
    }
    minimumShouldMatch = in.readOptionalString();
    if (in.getVersion().onOrAfter(Version.V_5_1_1_UNRELEASED)) {
        settings.quoteFieldSuffix(in.readOptionalString());
        useAllFields = in.readOptionalBoolean();
    }
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:35,代码来源:SimpleQueryStringBuilder.java

示例12: Path

import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
/**
 * Read from a stream.
 */
public Path(StreamInput in) throws IOException {
    path = in.readOptionalString();
    mount = in.readOptionalString();
    type = in.readOptionalString();
    total = in.readLong();
    free = in.readLong();
    available = in.readLong();
    spins = in.readOptionalBoolean();
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:13,代码来源:FsInfo.java

示例13: readFrom

import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
@Override
public void readFrom(StreamInput in) throws IOException {
    checkVersion(in.getVersion());
    super.readFrom(in);
    this.index = in.readOptionalString();
    this.shard = in.readOptionalVInt();
    this.primary = in.readOptionalBoolean();
    this.currentNode = in.readOptionalString();
    this.includeYesDecisions = in.readBoolean();
    this.includeDiskInfo = in.readBoolean();
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:12,代码来源:ClusterAllocationExplainRequest.java

示例14: readFrom

import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的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

示例15: readFrom

import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
@Override
public void readFrom(StreamInput in) throws IOException {
    offset = in.readVInt();
    limit = in.readVInt();

    outputs = Symbol.listFromStream(in);

    int numOrderBy = in.readVInt();

    if (numOrderBy > 0) {
        reverseFlags = new boolean[numOrderBy];

        for (int i = 0; i < reverseFlags.length; i++) {
            reverseFlags[i] = in.readBoolean();
        }

        orderBy = new ArrayList<>(numOrderBy);
        for (int i = 0; i < reverseFlags.length; i++) {
            orderBy.add(Symbol.fromStream(in));
        }

        nullsFirst = new Boolean[numOrderBy];
        for (int i = 0; i < numOrderBy; i++) {
            nullsFirst[i] = in.readOptionalBoolean();
        }
    }
}
 
开发者ID:baidu,项目名称:Elasticsearch,代码行数:28,代码来源:TopNProjection.java


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