當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。