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


Java StreamOutput.writeOptionalBoolean方法代码示例

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


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

示例1: writeTo

import org.elasticsearch.common.io.stream.StreamOutput; //导入方法依赖的package包/类
@Override
public void writeTo(StreamOutput out) throws IOException {
    hits.writeTo(out);
    if (aggregations == null) {
        out.writeBoolean(false);
    } else {
        out.writeBoolean(true);
        aggregations.writeTo(out);
    }
    if (suggest == null) {
        out.writeBoolean(false);
    } else {
        out.writeBoolean(true);
        suggest.writeTo(out);
    }
    out.writeBoolean(timedOut);
    out.writeOptionalBoolean(terminatedEarly);
    out.writeOptionalWriteable(profileResults);
    out.writeVInt(numReducePhases);
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:21,代码来源:InternalSearchResponse.java

示例2: doWriteTo

import org.elasticsearch.common.io.stream.StreamOutput; //导入方法依赖的package包/类
@Override
protected void doWriteTo(StreamOutput out) throws IOException {
    out.writeGenericValue(value);
    out.writeVInt(fieldsBoosts.size());
    for (Map.Entry<String, Float> fieldsEntry : fieldsBoosts.entrySet()) {
        out.writeString(fieldsEntry.getKey());
        out.writeFloat(fieldsEntry.getValue());
    }
    type.writeTo(out);
    operator.writeTo(out);
    out.writeOptionalString(analyzer);
    out.writeVInt(slop);
    out.writeOptionalWriteable(fuzziness);
    out.writeVInt(prefixLength);
    out.writeVInt(maxExpansions);
    out.writeOptionalString(minimumShouldMatch);
    out.writeOptionalString(fuzzyRewrite);
    out.writeOptionalBoolean(useDisMax);
    out.writeOptionalFloat(tieBreaker);
    out.writeBoolean(lenient);
    out.writeOptionalFloat(cutoffFrequency);
    zeroTermsQuery.writeTo(out);
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:24,代码来源:MultiMatchQueryBuilder.java

示例3: writeTo

import org.elasticsearch.common.io.stream.StreamOutput; //导入方法依赖的package包/类
@Override
public void writeTo(StreamOutput out) throws IOException {
    out.writeString(name);
    out.writeBoolean(committed);
    out.writeBoolean(search);
    out.writeInt(docCount);
    out.writeInt(delDocCount);
    out.writeLong(sizeInBytes);
    out.writeOptionalString(version.toString());
    out.writeOptionalBoolean(compound);
    out.writeOptionalString(mergeId);
    out.writeLong(memoryInBytes);
    
    boolean verbose = ramTree != null;
    out.writeBoolean(verbose);
    if (verbose) {
        writeRamTree(out, ramTree);
    }
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:20,代码来源:Segment.java

示例4: writeTo

import org.elasticsearch.common.io.stream.StreamOutput; //导入方法依赖的package包/类
@Override
public void writeTo(StreamOutput out) throws IOException {
    super.writeTo(out);
    out.writeByte(searchType.id());
    out.writeVInt(indices.length);
    for (String index : indices) {
        out.writeString(index);
    }
    out.writeOptionalString(routing);
    out.writeOptionalString(preference);
    out.writeOptionalWriteable(scroll);
    out.writeOptionalWriteable(source);
    out.writeStringArray(types);
    indicesOptions.writeIndicesOptions(out);
    out.writeOptionalBoolean(requestCache);
    out.writeVInt(batchedReduceSize);
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:18,代码来源:SearchRequest.java

示例5: writeTo

import org.elasticsearch.common.io.stream.StreamOutput; //导入方法依赖的package包/类
@Override
public void writeTo(StreamOutput out) throws IOException {
    out.writeVInt(offset);
    out.writeVInt(limit);
    Symbol.toStream(outputs, out);
    if (isOrdered()) {
        out.writeVInt(reverseFlags.length);
        for (boolean reverseFlag : reverseFlags) {
            out.writeBoolean(reverseFlag);
        }
        for (Symbol symbol : orderBy) {
            Symbol.toStream(symbol, out);
        }
        for (Boolean nullFirst : nullsFirst) {
            out.writeOptionalBoolean(nullFirst);
        }
    } else {
        out.writeVInt(0);
    }
}
 
开发者ID:baidu,项目名称:Elasticsearch,代码行数:21,代码来源:TopNProjection.java

示例6: doWriteTo

import org.elasticsearch.common.io.stream.StreamOutput; //导入方法依赖的package包/类
@Override
protected void doWriteTo(StreamOutput out) throws IOException {
    out.writeOptionalString(format);
    gapPolicy.writeTo(out);
    out.writeVInt(window);
    out.writeNamedWriteable(model);
    out.writeVInt(predict);
    out.writeOptionalBoolean(minimize);
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:10,代码来源:MovAvgPipelineAggregationBuilder.java

示例7: writeTo

import org.elasticsearch.common.io.stream.StreamOutput; //导入方法依赖的package包/类
@Override
public void writeTo(StreamOutput out) throws IOException {
    out.writeText(text);
    out.writeFloat(score);
    out.writeOptionalText(highlighted);
    out.writeOptionalBoolean(collateMatch);
}
 
开发者ID:baidu,项目名称:Elasticsearch,代码行数:8,代码来源:Suggest.java

示例8: writeTo

import org.elasticsearch.common.io.stream.StreamOutput; //导入方法依赖的package包/类
@Override
public void writeTo(StreamOutput out) throws IOException {
    out.writeVInt(reverseFlags.length);
    for (boolean reverseFlag : reverseFlags) {
        out.writeBoolean(reverseFlag);
    }
    for (Symbol symbol : orderBySymbols) {
        Symbol.toStream(symbol, out);
    }
    for (Boolean nullFirst : nullsFirst) {
        out.writeOptionalBoolean(nullFirst);
    }
}
 
开发者ID:baidu,项目名称:Elasticsearch,代码行数:14,代码来源:OrderBy.java

示例9: doWriteTo

import org.elasticsearch.common.io.stream.StreamOutput; //导入方法依赖的package包/类
@Override
public void doWriteTo(StreamOutput out) throws IOException {
    out.writeFloat(maxErrors);
    out.writeFloat(realWordErrorLikelihood);
    out.writeFloat(confidence);
    out.writeOptionalVInt(gramSize);
    out.writeOptionalNamedWriteable(model);
    out.writeBoolean(forceUnigrams);
    out.writeVInt(tokenLimit);
    out.writeOptionalString(preTag);
    out.writeOptionalString(postTag);
    out.writeString(separator);
    if (collateQuery != null) {
        out.writeBoolean(true);
        collateQuery.writeTo(out);
    } else {
        out.writeBoolean(false);
    }
    out.writeMapWithConsistentOrder(collateParams);
    out.writeOptionalBoolean(collatePrune);
    out.writeVInt(this.generators.size());
    for (Entry<String, List<CandidateGenerator>> entry : this.generators.entrySet()) {
        out.writeString(entry.getKey());
        List<CandidateGenerator> generatorsList = entry.getValue();
        out.writeVInt(generatorsList.size());
        for (CandidateGenerator generator : generatorsList) {
            generator.writeTo(out);
        }
    }
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:31,代码来源:PhraseSuggestionBuilder.java

示例10: innerWriteTo

import org.elasticsearch.common.io.stream.StreamOutput; //导入方法依赖的package包/类
protected void innerWriteTo(StreamOutput out, boolean asKey) throws IOException {
    out.writeString(index);
    out.writeVInt(shardId);
    out.writeByte(searchType.id());
    if (!asKey) {
        out.writeVInt(numberOfShards);
    }
    if (scroll == null) {
        out.writeBoolean(false);
    } else {
        out.writeBoolean(true);
        scroll.writeTo(out);
    }
    out.writeBytesReference(source);
    out.writeBytesReference(extraSource);
    out.writeStringArray(types);
    out.writeStringArrayNullable(filteringAliases);
    if (!asKey) {
        out.writeVLong(nowInMillis);
    }

    out.writeBytesReference(templateSource);
    boolean hasTemplate = template != null;
    out.writeBoolean(hasTemplate);
    if (hasTemplate) {
        template.writeTo(out);
    }
    out.writeOptionalBoolean(requestCache);
}
 
开发者ID:baidu,项目名称:Elasticsearch,代码行数:30,代码来源:ShardSearchLocalRequest.java

示例11: writeTo

import org.elasticsearch.common.io.stream.StreamOutput; //导入方法依赖的package包/类
@Override
public void writeTo(StreamOutput out) throws IOException {
    super.writeTo(out);
    out.writeByte(searchType.id());

    out.writeVInt(indices.length);
    for (String index : indices) {
        out.writeString(index);
    }

    out.writeOptionalString(routing);
    out.writeOptionalString(preference);

    if (scroll == null) {
        out.writeBoolean(false);
    } else {
        out.writeBoolean(true);
        scroll.writeTo(out);
    }
    out.writeBytesReference(source);
    out.writeBytesReference(extraSource);
    out.writeStringArray(types);
    indicesOptions.writeIndicesOptions(out);

    out.writeBytesReference(templateSource);
    boolean hasTemplate = template != null;
    out.writeBoolean(hasTemplate);
    if (hasTemplate) {
        template.writeTo(out);
    }

    out.writeOptionalBoolean(requestCache);
}
 
开发者ID:baidu,项目名称:Elasticsearch,代码行数:34,代码来源:SearchRequest.java

示例12: writeTo

import org.elasticsearch.common.io.stream.StreamOutput; //导入方法依赖的package包/类
@Override
public void writeTo(StreamOutput out) throws IOException {
    out.writeString(type());
    source().writeTo(out);
    // id
    if (id().hasPath()) {
        out.writeBoolean(true);
        out.writeString(id().path());
    } else {
        out.writeBoolean(false);
    }
    // routing
    out.writeBoolean(routing().required());
    if (routing().hasPath()) {
        out.writeBoolean(true);
        out.writeString(routing().path());
    } else {
        out.writeBoolean(false);
    }
    // timestamp
    out.writeBoolean(timestamp().enabled());
    out.writeOptionalString(timestamp().path());
    out.writeString(timestamp().format());
    out.writeOptionalString(timestamp().defaultTimestamp());
    out.writeOptionalBoolean(timestamp().ignoreMissing());
    out.writeBoolean(hasParentField());
    // mappingVersion
    out.writeLong(mappingVersion());

    if (version().hasPath()) {
        out.writeBoolean(true);
        out.writeString(version().path());
        out.writeByte(version().versionType().getValue());
    } else {
        out.writeBoolean(false);
    }
}
 
开发者ID:baidu,项目名称:Elasticsearch,代码行数:38,代码来源:MappingMetaData.java

示例13: writeTo

import org.elasticsearch.common.io.stream.StreamOutput; //导入方法依赖的package包/类
@Override
public void writeTo(StreamOutput out) throws IOException {
    out.writeString(type());
    source().writeTo(out);
    // routing
    out.writeBoolean(routing().required());
    if (out.getVersion().before(Version.V_6_0_0_alpha1_UNRELEASED)) {
        // timestamp
        out.writeBoolean(false); // enabled
        out.writeString(DateFieldMapper.DEFAULT_DATE_TIME_FORMATTER.format());
        out.writeOptionalString("now"); // 5.x default
        out.writeOptionalBoolean(null);
    }
    out.writeBoolean(hasParentField());
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:16,代码来源:MappingMetaData.java

示例14: writeTo

import org.elasticsearch.common.io.stream.StreamOutput; //导入方法依赖的package包/类
@Override
public void writeTo(StreamOutput out) throws IOException {
    out.writeOptionalString(path); // total aggregates do not have a path
    out.writeOptionalString(mount);
    out.writeOptionalString(type);
    out.writeLong(total);
    out.writeLong(free);
    out.writeLong(available);
    out.writeOptionalBoolean(spins);
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:11,代码来源:FsInfo.java

示例15: writeTo

import org.elasticsearch.common.io.stream.StreamOutput; //导入方法依赖的package包/类
@Override
public void writeTo(StreamOutput out) throws IOException {
    checkVersion(out.getVersion());
    super.writeTo(out);
    out.writeOptionalString(index);
    out.writeOptionalVInt(shard);
    out.writeOptionalBoolean(primary);
    out.writeOptionalString(currentNode);
    out.writeBoolean(includeYesDecisions);
    out.writeBoolean(includeDiskInfo);
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:12,代码来源:ClusterAllocationExplainRequest.java


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