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


Java StreamOutput.writeOptionalStringArray方法代码示例

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


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

示例1: writeTo

import org.elasticsearch.common.io.stream.StreamOutput; //导入方法依赖的package包/类
@Override
public void writeTo(StreamOutput out) throws IOException {
    out.writeOptionalString(index);
    out.writeOptionalString(type);
    out.writeBoolean(doc != null);
    if (doc != null) {
        out.writeGenericValue(doc);
        if (out.getVersion().onOrAfter(Version.V_5_3_0_UNRELEASED)) {
            xContentType.writeTo(out);
        }
    } else {
        out.writeString(id);
    }
    out.writeOptionalStringArray(fields);
    out.writeGenericValue(perFieldAnalyzer);
    out.writeOptionalString(routing);
    out.writeLong(version);
    versionType.writeTo(out);
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:20,代码来源:MoreLikeThisQueryBuilder.java

示例2: doWriteTo

import org.elasticsearch.common.io.stream.StreamOutput; //导入方法依赖的package包/类
@Override
protected void doWriteTo(StreamOutput out) throws IOException {
    out.writeOptionalStringArray(fields);
    out.writeStringArray(likeTexts);
    out.writeList(Arrays.asList(likeItems));
    out.writeStringArray(unlikeTexts);
    out.writeList(Arrays.asList(unlikeItems));
    out.writeVInt(maxQueryTerms);
    out.writeVInt(minTermFreq);
    out.writeVInt(minDocFreq);
    out.writeVInt(maxDocFreq);
    out.writeVInt(minWordLength);
    out.writeVInt(maxWordLength);
    out.writeOptionalStringArray(stopWords);
    out.writeOptionalString(analyzer);
    out.writeString(minimumShouldMatch);
    out.writeGenericValue(boostTerms);
    out.writeBoolean(include);
    out.writeBoolean(failOnUnsupportedField);
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:21,代码来源:MoreLikeThisQueryBuilder.java

示例3: writeTo

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

    out.writeBoolean(refresh);
    out.writeOptionalStringArray(storedFields);
    out.writeBoolean(realtime);
    out.writeByte(versionType.getValue());
    out.writeLong(version);
    out.writeOptionalWriteable(fetchSourceContext);
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:17,代码来源:GetRequest.java

示例4: writeTo

import org.elasticsearch.common.io.stream.StreamOutput; //导入方法依赖的package包/类
@Override
public void writeTo(StreamOutput out) throws IOException {
    super.writeTo(out);
    out.writeString(type);
    out.writeString(id);
    out.writeOptionalString(routing);
    out.writeOptionalString(preference);
    out.writeNamedWriteable(query);
    filteringAlias.writeTo(out);
    out.writeOptionalStringArray(storedFields);
    out.writeOptionalWriteable(fetchSourceContext);
    out.writeVLong(nowInMillis);
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:14,代码来源:ExplainRequest.java

示例5: writeTo

import org.elasticsearch.common.io.stream.StreamOutput; //导入方法依赖的package包/类
@Override
public void writeTo(StreamOutput out) throws IOException {
    out.writeString(index);
    out.writeOptionalString(type);
    out.writeString(id);
    out.writeOptionalString(routing);
    out.writeOptionalString(parent);
    out.writeOptionalStringArray(storedFields);
    out.writeLong(version);
    out.writeByte(versionType.getValue());

    out.writeOptionalWriteable(fetchSourceContext);
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:14,代码来源:MultiGetRequest.java

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

示例7: doWriteTo

import org.elasticsearch.common.io.stream.StreamOutput; //导入方法依赖的package包/类
@Override
protected  void doWriteTo(StreamOutput out) throws IOException {
    out.writeString(name);
    out.writeVInt(fragmentOffset);
    out.writeOptionalStringArray(matchedFields);
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:7,代码来源:HighlightBuilder.java

示例8: writeTo

import org.elasticsearch.common.io.stream.StreamOutput; //导入方法依赖的package包/类
@Override
public void writeTo(StreamOutput out) throws IOException {
    super.writeTo(out);
    waitForActiveShards.writeTo(out);
    out.writeString(type);
    out.writeString(id);
    out.writeOptionalString(routing);
    out.writeOptionalString(parent);
    boolean hasScript = script != null;
    out.writeBoolean(hasScript);
    if (hasScript) {
        script.writeTo(out);
    }
    out.writeVInt(retryOnConflict);
    refreshPolicy.writeTo(out);
    if (doc == null) {
        out.writeBoolean(false);
    } else {
        out.writeBoolean(true);
        // make sure the basics are set
        doc.index(index);
        doc.type(type);
        doc.id(id);
        doc.writeTo(out);
    }
    out.writeOptionalStringArray(fields);
    out.writeOptionalWriteable(fetchSourceContext);
    if (upsertRequest == null) {
        out.writeBoolean(false);
    } else {
        out.writeBoolean(true);
        // make sure the basics are set
        upsertRequest.index(index);
        upsertRequest.type(type);
        upsertRequest.id(id);
        upsertRequest.writeTo(out);
    }
    out.writeBoolean(docAsUpsert);
    out.writeLong(version);
    out.writeByte(versionType.getValue());
    out.writeBoolean(detectNoop);
    out.writeBoolean(scriptedUpsert);
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:44,代码来源:UpdateRequest.java


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