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


Java StreamOutput.writeFloat方法代码示例

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


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

示例1: writeTo

import org.elasticsearch.common.io.stream.StreamOutput; //导入方法依赖的package包/类
@Override
public void writeTo(StreamOutput out) throws IOException {
    if (out.getVersion().onOrAfter(Version.V_5_1_1_UNRELEASED)) {
        out.writeOptionalVInt(sliceId);
    }
    out.writeVLong(total);
    out.writeVLong(updated);
    out.writeVLong(created);
    out.writeVLong(deleted);
    out.writeVInt(batches);
    out.writeVLong(versionConflicts);
    out.writeVLong(noops);
    out.writeVLong(bulkRetries);
    out.writeVLong(searchRetries);
    throttled.writeTo(out);
    out.writeFloat(requestsPerSecond);
    out.writeOptionalString(reasonCancelled);
    throttledUntil.writeTo(out);
    if (out.getVersion().onOrAfter(Version.V_5_1_1_UNRELEASED)) {
        out.writeVInt(sliceStatuses.size());
        for (StatusOrException sliceStatus : sliceStatuses) {
            out.writeOptionalWriteable(sliceStatus);
        }
    }
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:26,代码来源:BulkByScrollTask.java

示例2: writeFieldDoc

import org.elasticsearch.common.io.stream.StreamOutput; //导入方法依赖的package包/类
public static void writeFieldDoc(StreamOutput out, FieldDoc fieldDoc) throws IOException {
    out.writeVInt(fieldDoc.fields.length);
    for (Object field : fieldDoc.fields) {
        writeSortValue(out, field);
    }
    out.writeVInt(fieldDoc.doc);
    out.writeFloat(fieldDoc.score);
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:9,代码来源:Lucene.java

示例3: 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:justor,项目名称:elasticsearch_my,代码行数:8,代码来源:Suggest.java

示例4: doWriteTo

import org.elasticsearch.common.io.stream.StreamOutput; //导入方法依赖的package包/类
@Override
public void doWriteTo(StreamOutput out) throws IOException {
    suggestMode.writeTo(out);
    out.writeFloat(accuracy);
    sort.writeTo(out);
    stringDistance.writeTo(out);
    out.writeVInt(maxEdits);
    out.writeVInt(maxInspections);
    out.writeFloat(maxTermFreq);
    out.writeVInt(prefixLength);
    out.writeVInt(minWordLength);
    out.writeFloat(minDocFreq);
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:14,代码来源:TermSuggestionBuilder.java

示例5: 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

示例6: doWriteTo

import org.elasticsearch.common.io.stream.StreamOutput; //导入方法依赖的package包/类
@Override
public void doWriteTo(StreamOutput out) throws IOException {
    out.writeNamedWriteable(queryBuilder);
    scoreMode.writeTo(out);
    out.writeFloat(rescoreQueryWeight);
    out.writeFloat(queryWeight);
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:8,代码来源:QueryRescorerBuilder.java

示例7: writeTo

import org.elasticsearch.common.io.stream.StreamOutput; //导入方法依赖的package包/类
@Override
public void writeTo(StreamOutput out) throws IOException {
    super.writeTo(out);
    out.writeByte(percolatorTypeId);
    out.writeVLong(requestedSize);
    out.writeVLong(count);
    out.writeVInt(matches.length);
    for (BytesRef match : matches) {
        out.writeBytesRef(match);
    }
    out.writeVLong(scores.length);
    for (float score : scores) {
        out.writeFloat(score);
    }
    out.writeVInt(hls.size());
    for (Map<String, HighlightField> hl : hls) {
        out.writeVInt(hl.size());
        for (Map.Entry<String, HighlightField> entry : hl.entrySet()) {
            out.writeString(entry.getKey());
            entry.getValue().writeTo(out);
        }
    }
    out.writeOptionalStreamable(aggregations);
    if (pipelineAggregators == null) {
        out.writeBoolean(false);
    } else {
        out.writeBoolean(true);
        out.writeVInt(pipelineAggregators.size());
        for (PipelineAggregator pipelineAggregator : pipelineAggregators) {
            out.writeBytesReference(pipelineAggregator.type().stream());
            pipelineAggregator.writeTo(out);
        }
    }
}
 
开发者ID:baidu,项目名称:Elasticsearch,代码行数:35,代码来源:PercolateShardResponse.java

示例8: doWriteTo

import org.elasticsearch.common.io.stream.StreamOutput; //导入方法依赖的package包/类
@Override
protected void doWriteTo(StreamOutput out) throws IOException {
    out.writeString(queryText);
    out.writeInt(fieldsAndWeights.size());
    for (Map.Entry<String, Float> entry : fieldsAndWeights.entrySet()) {
        out.writeString(entry.getKey());
        out.writeFloat(entry.getValue());
    }
    out.writeInt(flags);
    out.writeOptionalString(analyzer);
    defaultOperator.writeTo(out);
    if (out.getVersion().before(Version.V_5_1_1_UNRELEASED)) {
        out.writeBoolean(true); // lowercase_expanded_terms
    }
    out.writeBoolean(settings.lenient());
    if (out.getVersion().onOrAfter(Version.V_5_1_1_UNRELEASED)) {
        out.writeBoolean(lenientSet);
    }
    out.writeBoolean(settings.analyzeWildcard());
    if (out.getVersion().before(Version.V_5_1_1_UNRELEASED)) {
        out.writeString(Locale.ROOT.toLanguageTag()); // locale
    }
    out.writeOptionalString(minimumShouldMatch);
    if (out.getVersion().onOrAfter(Version.V_5_1_1_UNRELEASED)) {
        out.writeOptionalString(settings.quoteFieldSuffix());
        out.writeOptionalBoolean(useAllFields);
    }
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:29,代码来源:SimpleQueryStringBuilder.java

示例9: writeExplanation

import org.elasticsearch.common.io.stream.StreamOutput; //导入方法依赖的package包/类
public static void writeExplanation(StreamOutput out, Explanation explanation) throws IOException {
    out.writeBoolean(explanation.isMatch());
    out.writeString(explanation.getDescription());
    Explanation[] subExplanations = explanation.getDetails();
    out.writeVInt(subExplanations.length);
    for (Explanation subExp : subExplanations) {
        writeExplanation(out, subExp);
    }
    if (explanation.isMatch()) {
        out.writeFloat(explanation.getValue());
    }
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:13,代码来源:Lucene.java

示例10: doWriteTo

import org.elasticsearch.common.io.stream.StreamOutput; //导入方法依赖的package包/类
@Override
protected void doWriteTo(StreamOutput out) throws IOException {
    out.writeNamedWriteable(query);
    out.writeList(Arrays.asList(filterFunctionBuilders));
    out.writeFloat(maxBoost);
    out.writeOptionalFloat(minScore);
    out.writeOptionalWriteable(boostMode);
    scoreMode.writeTo(out);
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:10,代码来源:FunctionScoreQueryBuilder.java

示例11: writeTo

import org.elasticsearch.common.io.stream.StreamOutput; //导入方法依赖的package包/类
@Override
public void writeTo(StreamOutput out) throws IOException {
    out.writeText(id);
    out.writeText(index);
    out.writeFloat(score);
    if (hl != null) {
        out.writeVInt(hl.size());
        for (Map.Entry<String, HighlightField> entry : hl.entrySet()) {
            out.writeString(entry.getKey());
            entry.getValue().writeTo(out);
        }
    } else {
        out.writeVInt(0);
    }
}
 
开发者ID:baidu,项目名称:Elasticsearch,代码行数:16,代码来源:PercolateResponse.java

示例12: writeTo

import org.elasticsearch.common.io.stream.StreamOutput; //导入方法依赖的package包/类
@Override
public void writeTo(StreamOutput out) throws IOException {
    super.writeTo(out);
    out.writeStringArray(cols);
    out.writeBoolean(includeTypes);
    out.writeFloat(duration);
    if (includeTypes) {
        out.writeVInt(colTypes.length);
        for (DataType colType : colTypes) {
            DataTypes.toStream(colType, out);
        }
    }
}
 
开发者ID:baidu,项目名称:Elasticsearch,代码行数:14,代码来源:SQLBaseResponse.java

示例13: doWriteTo

import org.elasticsearch.common.io.stream.StreamOutput; //导入方法依赖的package包/类
@Override
protected void doWriteTo(StreamOutput out) throws IOException {
    out.writeString(this.fieldName);
    out.writeGenericValue(this.text);
    highFreqOperator.writeTo(out);
    lowFreqOperator.writeTo(out);
    out.writeOptionalString(analyzer);
    out.writeOptionalString(lowFreqMinimumShouldMatch);
    out.writeOptionalString(highFreqMinimumShouldMatch);
    out.writeBoolean(disableCoord);
    out.writeFloat(cutoffFrequency);
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:13,代码来源:CommonTermsQueryBuilder.java

示例14: writeTo

import org.elasticsearch.common.io.stream.StreamOutput; //导入方法依赖的package包/类
@Override
public void writeTo(StreamOutput out) throws IOException {
    super.writeTo(out);
    out.writeFloat(requestsPerSecond);
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:6,代码来源:RethrottleRequest.java

示例15: writeTo

import org.elasticsearch.common.io.stream.StreamOutput; //导入方法依赖的package包/类
@Override
public void writeTo(StreamOutput out) throws IOException {
    super.writeTo(out);
    out.writeFloat(minValue);
    out.writeFloat(maxValue);
}
 
开发者ID:baidu,项目名称:Elasticsearch,代码行数:7,代码来源:FieldStats.java


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