當前位置: 首頁>>代碼示例>>Java>>正文


Java StreamOutput.writeOptionalVInt方法代碼示例

本文整理匯總了Java中org.elasticsearch.common.io.stream.StreamOutput.writeOptionalVInt方法的典型用法代碼示例。如果您正苦於以下問題:Java StreamOutput.writeOptionalVInt方法的具體用法?Java StreamOutput.writeOptionalVInt怎麽用?Java StreamOutput.writeOptionalVInt使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.elasticsearch.common.io.stream.StreamOutput的用法示例。


在下文中一共展示了StreamOutput.writeOptionalVInt方法的10個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: writeTo

import org.elasticsearch.common.io.stream.StreamOutput; //導入方法依賴的package包/類
@Override
public void writeTo(StreamOutput out) throws IOException {
    out.writeString(field);
    out.writeOptionalString(suggestMode);
    out.writeOptionalFloat(accuracy);
    out.writeOptionalVInt(size);
    out.writeOptionalString(sort);
    out.writeOptionalString(stringDistance);
    out.writeOptionalVInt(maxEdits);
    out.writeOptionalVInt(maxInspections);
    out.writeOptionalFloat(maxTermFreq);
    out.writeOptionalVInt(prefixLength);
    out.writeOptionalVInt(minWordLength);
    out.writeOptionalFloat(minDocFreq);
    out.writeOptionalString(preFilter);
    out.writeOptionalString(postFilter);
}
 
開發者ID:justor,項目名稱:elasticsearch_my,代碼行數:18,代碼來源:DirectCandidateGeneratorBuilder.java

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

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

示例4: writeTo

import org.elasticsearch.common.io.stream.StreamOutput; //導入方法依賴的package包/類
@Override
public final void writeTo(StreamOutput out) throws IOException {
    out.writeString(field);
    out.writeOptionalString(text);
    out.writeOptionalString(prefix);
    out.writeOptionalString(regex);
    out.writeOptionalString(analyzer);
    out.writeOptionalVInt(size);
    out.writeOptionalVInt(shardSize);
    doWriteTo(out);
}
 
開發者ID:justor,項目名稱:elasticsearch_my,代碼行數:12,代碼來源:SuggestionBuilder.java

示例5: writeTo

import org.elasticsearch.common.io.stream.StreamOutput; //導入方法依賴的package包/類
@Override
public void writeTo(StreamOutput out) throws IOException {
    out.writeString(term);
    out.writeInt(startOffset);
    out.writeInt(endOffset);
    out.writeVInt(position);
    if (out.getVersion().onOrAfter(Version.V_5_2_0_UNRELEASED)) {
        out.writeOptionalVInt(positionLength > 1 ? positionLength : null);
    }
    out.writeOptionalString(type);
    if (out.getVersion().onOrAfter(Version.V_2_2_0)) {
        out.writeGenericValue(attributes);
    }
}
 
開發者ID:justor,項目名稱:elasticsearch_my,代碼行數:15,代碼來源:AnalyzeResponse.java

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

示例7: writeTo

import org.elasticsearch.common.io.stream.StreamOutput; //導入方法依賴的package包/類
public void writeTo(StreamOutput out) throws IOException {
    out.writeOptionalVInt(maxNumTerms);
    out.writeOptionalVInt(minTermFreq);
    out.writeOptionalVInt(maxTermFreq);
    out.writeOptionalVInt(minDocFreq);
    out.writeOptionalVInt(maxDocFreq);
    out.writeOptionalVInt(minWordLength);
    out.writeOptionalVInt(maxWordLength);
}
 
開發者ID:justor,項目名稱:elasticsearch_my,代碼行數:10,代碼來源:TermVectorsRequest.java

示例8: writeTo

import org.elasticsearch.common.io.stream.StreamOutput; //導入方法依賴的package包/類
@Override
public void writeTo(StreamOutput out) throws IOException {
    out.writeException(reason);
    out.writeOptionalString(index);
    out.writeOptionalVInt(shardId);
    out.writeOptionalString(nodeId);
}
 
開發者ID:justor,項目名稱:elasticsearch_my,代碼行數:8,代碼來源:ScrollableHitSource.java

示例9: writeTo

import org.elasticsearch.common.io.stream.StreamOutput; //導入方法依賴的package包/類
/**
 * write common parameters to {@link StreamOutput}
 */
@Override
public final void writeTo(StreamOutput out) throws IOException {
    out.writeOptionalStringArray(preTags);
    out.writeOptionalStringArray(postTags);
    out.writeOptionalVInt(fragmentSize);
    out.writeOptionalVInt(numOfFragments);
    out.writeOptionalString(highlighterType);
    out.writeOptionalString(fragmenter);
    boolean hasQuery = highlightQuery != null;
    out.writeBoolean(hasQuery);
    if (hasQuery) {
        out.writeNamedWriteable(highlightQuery);
    }
    out.writeOptionalWriteable(order);
    out.writeOptionalBoolean(highlightFilter);
    out.writeOptionalBoolean(forceSource);
    if (out.getVersion().onOrAfter(Version.V_5_4_0_UNRELEASED)) {
        out.writeOptionalWriteable(boundaryScannerType);
    }
    out.writeOptionalVInt(boundaryMaxScan);
    boolean hasBounaryChars = boundaryChars != null;
    out.writeBoolean(hasBounaryChars);
    if (hasBounaryChars) {
        out.writeString(String.valueOf(boundaryChars));
    }
    if (out.getVersion().onOrAfter(Version.V_5_4_0_UNRELEASED)) {
        boolean hasBoundaryScannerLocale = boundaryScannerLocale != null;
        out.writeBoolean(hasBoundaryScannerLocale);
        if (hasBoundaryScannerLocale) {
            out.writeString(boundaryScannerLocale.toLanguageTag());
        }
    }
    out.writeOptionalVInt(noMatchSize);
    out.writeOptionalVInt(phraseLimit);
    boolean hasOptions = options != null;
    out.writeBoolean(hasOptions);
    if (hasOptions) {
        out.writeMap(options);
    }
    out.writeOptionalBoolean(requireFieldMatch);
    doWriteTo(out);
}
 
開發者ID:justor,項目名稱:elasticsearch_my,代碼行數:46,代碼來源:AbstractHighlighterBuilder.java

示例10: writeTo

import org.elasticsearch.common.io.stream.StreamOutput; //導入方法依賴的package包/類
@Override
public final void writeTo(StreamOutput out) throws IOException {
    out.writeOptionalVInt(this.windowSize);
    doWriteTo(out);
}
 
開發者ID:justor,項目名稱:elasticsearch_my,代碼行數:6,代碼來源:RescoreBuilder.java


注:本文中的org.elasticsearch.common.io.stream.StreamOutput.writeOptionalVInt方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。